» Quick Links
You can make money on these forums
We Share profits with you
Google
Google Adsense
Google Adwords
YPN
Yahoo
MSN Search
Web Directories
Web Hosting
Web Hosting Offers
Hosting News
Suggestions
Link Building
Domain Names
PHP Forums
MySQL Forums
» More Links
OSP News
Reseller Hosting
Shared Hosting
Dedicated Servers
Google Adsense
Search Engine Marketing
Link Development
Affiliate Marketing


» Advertising
Multiple DC PR Check

Free SEO Tools


Go Back   Webmaster Forums > Website Developement / Programming > PHP Programming and Tips

PHP Programming and Tips Discuss about PHP programming and Share Tips. Ask questions about Scripting and Errors.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-12-2006, 09:08 AM
love love is offline
Junior Member
 
Join Date: Aug 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
love is on a distinguished road
Default POST question...

Hi

When I run the following code with "Hello" as input:

PHP Code:
<html>
<head>
<title></title>
</head>
<body>
<?
echo $_POST[test];
echo "<br>";
?>
<form method="POST" action="./test.php">
<input type="text" name="test">
<input type="submit" value="Get It!">
</form>
</body>
</html>

It echos back "Hellotest=Hello". In other words, the POST array looks like this: Array ( [test] => Hellotest=Hello ). Shouldn't it be just "Hello"?

Bye -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Revenue Sharing Ads ( ?):
  #2  
Old 08-12-2006, 09:10 AM
valentino valentino is offline
OSP Starters
 
Join Date: Aug 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
valentino is on a distinguished road
Default

Try this code

<?php
echo $_POST[test];
echo "<br>";
?>

<html>
<head>
<title></title>
</head>
<body>
<form method="POST" action="./test.php">
<input type="text" name="test">
<input type="submit" value="Get It!">
</form>
</body>
</html>

<?php echo $_POST[test]; echo "<br>";?> <html> <head> <title></title> </head> <body> <form method="POST" action="./test.php"> <input type="text" name="test"> <input type="submit" value="Get It!"> </form> </body></html>

Also It is best to use full php tags (<?php) in -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
forum post count troubles, cant see content termpapers Suggestions & Feedback 1 09-06-2007 03:39 AM
Question about combining two DB records into one ASP Table richardson ASP forums and Tips 1 08-29-2006 01:35 PM
Question about combining two DB records into one ASP Table richardson ASP forums and Tips 0 08-29-2006 01:34 PM
Ask Questions, Share Knowledge, Make Money vibrant General Talk 1 08-28-2006 01:05 PM
Easy Money......Seriously lexussc Google 0 06-09-2006 03:07 AM


All times are GMT. The time now is 06:50 PM.