Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
04-06-2009, 10:22 AM #1
- Join Date
- Jan 2009
- Thanked 0 Times in 0 Posts
Posted into table but can't see it
I have posted data into a table and I can see it has added a record but can't actually view the contents.
// Get values from form
// Insert data into mysql
$sql="INSERT INTO $tbl_name(id, url)VALUES('$id','$url')";
// close connection
The id that I am trying to get is the username of the person that is currently using the site. Here is the code I am using
thanks in advance
04-06-2009, 02:14 PM #2
- Join Date
- Mar 2007
- Thanked 2,224 Times in 2,211 Posts
How did you assume it posted into table? Add some error checks and make sure that there is no error in your query.I have posted data into a table and I can see it has added a record but can't actually view the contents.
I think you are missing a space inPHP Code:
$result=mysql_query($sql) or die(mysql_error());
Code:$sql="INSERT INTO $tbl_name(id, url)VALUE
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)