there seems to be a problem with adding records to my database.
heres the code.
//this redirects the logged in user to the create php whereas the idnum of the user is already
//echoed in a textbox.
<?php
$result1 = mysql_query("select * from info where idnum = ".$_SESSION['valid'],$conn);
while($row = mysql_fetch_assoc($result1))
{
echo "<center><a href=\"create.php?idnum=$row[idnum]\">start new glob</a></center>";
}
?>
//now this code is for adding the records. but somehow this doesnt seem to work.
//my tbglobs table allows duplicate idnum's . but then again theres no problem with
//that. thing is i cant add data to my data base.
<form name="create" action="create.php" method="POST">
<input name="globtitle" type="text" style="position:absolute;width:229px;left:525px;top:280px;z-index:1">
<textarea name="globarea" style="position:absolute;left:464px;top:338px;width:290px;height:238px;z-index:2"></textarea>\
<input name="createglob" type="submit" value="create glob" style="position:absolute;left:663px;top:585px;z-index:3">
<input type="text" name="textid" value=<?php echo $_GET['idnum'];?>>
</form>
<?php
if(isset($_POST['createglob']))
{
$id = $_POST['textid'];
$title=$_POST['globtitle'];
$content=$_POST['globarea'];
$resulta = mysql_query("INSERT into tbglobs (idnum,title,content) VALUES ('$id','$title','$content')");
//$result=mysql_query("INSERT INTO tbglobs(idnum,title,content) VALUES('$id','$title','$content')",$conn);
echo "glob successfully added!";
}
?>
thanks for your help!
very much appreciated!
:)