Hi,
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
$id=$_POST['id'];
$url=$_POST['url'];
// Insert data into mysql
$sql="INSERT INTO $tbl_name(id, url)VALUES('$id','$url')";
$result=mysql_query($sql);
// close connection
mysql_close();
?>
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
<?php
session_start();
if(!session_is_registered(id)){
header("location:main_login.php");
}
$session['views']=1;
?>
thanks in advance
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
$id=$_POST['id'];
$url=$_POST['url'];
// Insert data into mysql
$sql="INSERT INTO $tbl_name(id, url)VALUES('$id','$url')";
$result=mysql_query($sql);
// close connection
mysql_close();
?>
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
<?php
session_start();
if(!session_is_registered(id)){
header("location:main_login.php");
}
$session['views']=1;
?>
thanks in advance
Comment