THIS CODE IS TO DISPLAY THE DATA FROM THE DATABASE AFTER THE FORM HAS BEEN SUBMITTED.
THE PROBLEM I'M HAVING HERE IS THAT WHEN I SUBMIT THE FORM THE LINK IS NOT WORKING.
IT GIVES ME THIS : http://yourweb.com/test2.php?id= INSTEAD OF : http://yourweb.com/test2.php?id=23
HOW CAN I FIX THIS?
THANK YOU!
<?php
if (isset($_POST['mytext'])) {
$myt = $_POST['mytext'];
$mymysql = mysql_connect("","","") or die ("can't connect");
mysql_select_db("", $mymysql );
$sql = "INSERT INTO content (content) VALUES ('$myt')";
mysql_query( $sql, $mymysql );
$sql = mysql_insert_id();
$row = mysql_query($sql, $mymysql);
$myid=$row['id'];
mysql_close ($mymysql);
echo "<a href='http://yourweb.com/test2.php?id='.$myid>Link</a>";
}
?>