[Help Needed] Textarea to PHP

zerodtk

Regular Member
Joined
Jan 23, 2009
Messages
233
Reaction score
86
hey guys,

so here's the situation...

I just finished a web scraper, written in PHP, however I'm stucked at the easiest part of all -.-'

please don't ask how, or why, I can't make this part work :D lol
so
let's say we create a small form like

PHP:
<form action="post.php" method="POST" />
<textarea name="texta" id="texta" /></textarea>
<input type="submit" name="submit" />
</form>
and let's create the post.php file which looks like this

PHP:
<?php

echo $_POST['texta'];

?>
it should work right? well, it shows absolutely nothing...
any idea why? it drives me crazy -.-'

the worst part of all, is that I have made like 1000 forms like this and never had a problem...now, it won't work :/

thanks in advance,
z
 
The first thing I noticed:

<textarea name="texta" id="texta" /></textarea>


Correction:

<textarea name="texta" id="texta"></textarea>
 
hah, yeah =D still not workin tho
 
It should work, lemme try.

EDIT: It is working. Try again. :)

EDIT 2: Also remove the forward slash while opening the form tag. --> <form action="post.php" method="POST" />
 
Last edited:
Looks like it should work. how about changing
Code:
<form action="post.php" method="POST" />

to
Code:
<form action="post.php" method="post" />

 
It should work.
Is error reporting enabled on your server? May show something.
 
Really weird, lol. The form is passing POST data normally (I copied your source to my page and tested) and working fine on my end. Try printing all the POST data in post.php.

PHP:
<?php

echo "<pre>";
print_r($_POST);
echo "</pre>";

?>
 
it says

Fatal error: Call to undefined function p() in /home/**/public_html/postdev.php on line 3

lol?:D
 
it says

Fatal error: Call to undefined function p() in /home/**/public_html/postdev.php on line 3

lol?:D

In other words it's not your form that is having the problem, it's passing the data to your scraper that isn't working.

We will need more info to help.
 
well, the standalone test script still won't work, however, I have added everything I wanted to the main scraper and guess what..it works like charm..not sure what the problem is tho..but it works perfectly!

thank you all for your time and patience! keep up the good work guys!

regards,
z
 
create a phpinfo.php fle containing
Code:
<?php phpinfo(); ?>
then send your form POST request to the php file as so
Code:
<form action="phpinfo.php" method="post">

then scroll down all the way to the bottom and see what POST and REQUESTS it got.

If you see nothing then it's a web server issue
 
Back
Top