Hi ,
I installed apache,php, mysql ( https://help.ubuntu.com/community/ApacheMySQLPHP )
After installing when i submit the form i can't get the form values. all values r empty.
plz help me to resolve this problem?
Hi ,
I installed apache,php, mysql ( https://help.ubuntu.com/community/ApacheMySQLPHP )
After installing when i submit the form i can't get the form values. all values r empty.
plz help me to resolve this problem?
Jump to PostYou need to insert url for form action.
<?php print "<pre>"; print_r($_POST); print_r($_REQUEST); print "</pre>"; print "<form action='<destination-url>.php' method='post'> <input type='text' name='inputname'> <input type='submit' name='test'> </form>"; ?>
Jump to PostCopy the following code into the file called "sample.php" It should work.
<?php print "<pre>"; print_r($_POST); print_r($_REQUEST); print "</pre>"; print "<form action='sample.php' method='post'> <input type='text' name='inputname'> <input type='submit' name='test'> </form>"; ?>
You might want to show us some code, and use code tags when you do
Hi,
Thanks for your reply.
plz check the below simple code.. i can't get values from $_POST & $_REQUEST
<?php
print "<pre>";
print_r($_POST);
print_r($_REQUEST);
print "</pre>";
print "<form action='' method='post'>
<input type='text' name='inputname'>
<input type='submit' name='test'>
</form>";
You need to insert url for form action.
<?php
print "<pre>";
print_r($_POST);
print_r($_REQUEST);
print "</pre>";
print "<form action='<destination-url>.php' method='post'>
<input type='text' name='inputname'>
<input type='submit' name='test'>
</form>";
?>
Yes. i tried it too, but no luck.
Copy the following code into the file called "sample.php" It should work.
<?php
print "<pre>";
print_r($_POST);
print_r($_REQUEST);
print "</pre>";
print "<form action='sample.php' method='post'>
<input type='text' name='inputname'>
<input type='submit' name='test'>
</form>";
?>
here, try this sample...
********this is your index.php
<form action="welcome.php" method="post">
Name: <input type="text" name="fname" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>
*******this one's your welcome.php
Welcome <?php echo $_POST["fname"]; ?>!<br />
You are <?php echo $_POST["age"]; ?> years old.
</form>
Thanks xuexue,PoA and ShawnCplus.
I think the problem was php/apache. i re-installed php and apache. now everything is working.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.