Jump to content

simple thing, won't work


messi1

Recommended Posts

hi guys,

 

i'm learning some php, and trying some things. but i can't seem to get this to work.

<html>
<title>simple thing</title>
<body>

<form action= 'blog.php' method = 'GET'>
author: <input type='text' name="writer" /> <br/>
article: <textarea rows="25" cols='60' name="article"></textarea>
<input type="submit" value="send" />
</form>
</body>
<hr />
</html>

<?php
$writer = $_GET ['writer'];
print "writer is " . $writer;

?>

 

i want to get rid of the error. it works, but it show this error. have I used the $_GET correctly? I tried using isset() and empty(), but I think I didn't used those correctly. could you guys tell me how to fix this small thing.

 

the error: http://i.imgur.com/DC8by.png

 

it runs perfect, when I run it in phpED, but when running the file directly "like: http://localhost/blog.php" it gives the error. I also read somewhere this has to do with the version of php. php4 would ignore the error, and php5 shows the error. would you explain that a bit more, please?

 

thank you

 

Link to comment
https://forums.phpfreaks.com/topic/230456-simple-thing-wont-work/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.