hi iam using a local host and the programme is to add data to the database but when i go to the data base to check the data in the joke text i don’t find any thing and the data just blank any help.
<html>
<body>
<form action ="<?php echo $_SERVER['PHP_SELF'];?> "method ="POST">
<textarea name="joketext" rows="10 " cols="40">
</textarea>
<input type="submit" value="GO"/>
</form>
<?php
error_reporting(E_ALL ^ E_NOTICE);
$dbcnx=mysql_connect('localhost','root','');
if(!$dbcnx){
exit ( "unable to connect to the the data base server");
}
if (!@ mysql_select_db ('ijdb')){
exit('unable to locate the joke database at this time');
}
if (isset ($_POST['joketext'])){
$joketext=$_POST['joketext '];
echo "$joketext";
}
$sql ="INSERT INTO joke SET
joketext='$joketext',
jokedate=CURDATE()";
if (@mysql_query($sql )){
echo 'your joke has been added';
}
else{
echo "error adding submitted joke ";
}
?>
</body>
</html>
on the local host
id joketext jokedate
13 2010-08-12
14 2010-08-12
15 2010-08-12
16 2010-08-12
17 2010-08-12
18 2010-08-12
as you see it is ablank(no data) under the joke text even if i add jusst the id and the joke text increase
thanks in advance