:evil: damnit! :evil:
now I'm getting pissed.
am I just to dumb to get this or what?
I've been to many different tutorials and I never get this thing working... I just want to enter some data into a database, how hard can it be???
I posted a topic a while ago with some php code that didn't work... and now I've been looking at some other solutions to the problem... a few look a lot like and this is one of them..
this is inserted to a html page:
--------------------------------
<form name="links" method="post" action="add_links.php">
<p>Title :
<input type="text" name="title">
<br>
<br>
URL :
<input type="text" name="url">
</p>
<p>
<input type="submit" name="Submit" value="Submit">
</p></form>
--------------------------------
and is linked to add_links.php
add_links.php looks like this:
--------------------------------
<?php
$db = mysql_connect("localhost","user","password");
mysql_select_db (database name);
$query = "INSERT INTO links(title , url)
VALUES('$title','$url')";
$result = mysql_query($query);
echo ("Link entered.");
?>
--------------------------------
now, what happens is that the database is updated (wich is a step in the right direction). but only the $id is updated... nothing else is entered into the database... I had a similar code and the same thing happened there.. only the id was entered...
--------------------------------
the table "links":
(
id mediumint(10) NOT NULL auto_increment,
title varchar(80),
url varchar(80),
PRIMARY KEY (id)
)
--------------------------------
and if you wanna know, I'm not just looking to steal some code, I wanna know how it works.
thanks



thanks...
