Re: PHP & "POST"

[email protected] (Seung Hwan Kang) Sat, 19 Apr 2003 19:36:40 +1000
Newsgroups php.lang
Message-ID <[email protected]>
couple of things to catch up!!!

Dennis Martin Ong wrote:
> Hope this helps...
> 
> <html>
> <head>
> </head>
> <?php
// let's check, it's came from an original form.
if (strtolower($_POST["mode"]) == "add")
{
   // Variable to get the data from the textarea
   $frmPost = $_POST["strTxtarea"];
}
else
{
   echo "Possible POSTING attack..!";
}
// and so on..!
> ?>
> <body>
> //
> <form action="post.php" method="post" enctype="multipart/form-data"
> name="frmPost" id="frmPost">
> 
>   <p>
>     <textarea name="strTxtarea" cols="32" rows="10"></textarea>
> </p>
>   <p>
>     <label>
       <input type="hidden" name="mode" value="add">
>     <input type="submit" name="strSubmit" value="Submit Text">
>     </label>
> </p>
> </form>
> <p><?php echo $frmPost?>&nbsp;</p>
> </body>
> </html>
> 
> 
> "Samura1" <[email protected]> wrote in message
> news:[email protected]...
> 
>>Hey guys,
>>I want to know how to retrieve data from POST (form) ...
>>
>>What I want to do is...
>>
>>I've got a textarea for ppl to enter large amount of text (essay), and I
> 
> let
> 
>>ppl submit it (using POST), then insert these data into mySQL.
>>
>>I get it working if I use GET (I only know how to use GET, dunno about
> 
> POST)
> 
>>with small amount of words (say 1600 characters), but when there are more
>>than 2000 characters, the submit button doesn't work. And I found that it
> 
> is
> 
>>becoz GET does not allow too large amount of text appear in the URL...
>>
>>So anyone can teach me how to get data from POST? I read some web sites
> 
> but
> 
>>still have no idea how to do it ... I think I need an example...
>>
>>Please help
>>
>>
> 
> 
>