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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

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.