Jump to content

PHP/mysql problem


rejvenn

Recommended Posts

dakle pokusavam da napravim php/mysql guestbook uz pomoc ovog tutoriala:

http://www.phpeasystep.com/phptu/15.html

napravio sam sva tri php fajla, pokrenuo xammp, napravio bazu i tabelu

i kad pokusam da posaljem nesto iskoci:

Notice: Undefined variable: name in C:\xampp\htdocs\projekat\addguestbook.php on line 14

Notice: Undefined variable: email in C:\xampp\htdocs\projekat\addguestbook.php on line 14

Notice: Undefined variable: comment in C:\xampp\htdocs\projekat\addguestbook.php on line 14

Successful

i onda se u viewguestbook pojavi entry ali samo sa id brojem bez podataka koje bi trebao da prikaže

3449x83.jpg

u addguestbook.php to je ova linija

$sql="INSERT INTO $tbl_name(name, email, comment, datetime)VALUES('$name', '$email', '$comment', '$datetime')";

halp?

someday a real rain will come and wash all this scum off the streets

Link to comment
Share on other sites

ocigledno je da su ti $name, $email i $comment variable prazne

probaj pre te linije da ubacis ovu:

extract($_POST);

The people can always be brought to the bidding of the leaders. That is easy. All you have to do is tell them they are being attacked and denounce the pacifists for lack of patriotism and exposing the country to danger. It works the same way in any country.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...