Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Beginning PHP
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning PHP Beginning-level PHP discussions. More advanced coders should post to the Pro PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 12th, 2003, 01:28 AM
Authorized User
 
Join Date: Aug 2003
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default POST method not working

Dear Experts,

I have created a form to print a value name field.

<?
if(isset($_GET['submit'])) {

    print("<br>");
    print($_GET["name"]);

}
else
{
    print("<br>not submitted");
}
?>

I'm using GET method here, but I dont want to use GET method but want to use POST method instead.

When changed to POST method it is giving error Undefined index

register_globals is set to OFF
request_method is set to GET

How do I change the request method to POST?

Please help.

regards,
ganesh

Reply With Quote
  #2 (permalink)  
Old August 12th, 2003, 04:15 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 101
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Moharo
Default

check if you have specified the submit method in your form (<form method="post" action="any.php">)

then rewrite the code to:

<?
if(isset($_POST["submit"]) && isset ($_POST["name"])) {
     print("<br>");
     print($_POST["name"]);

}

else print ("<br>not submitted");
?>

i think this should work

:D:D:D:D

the genuine genius
Reply With Quote
  #3 (permalink)  
Old February 18th, 2006, 08:35 AM
Registered User
 
Join Date: Jan 2006
Location: Mumbai, , India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i m facing similar problem.
$_GET method works fine
$_POST is not working

Ashraf Ahmed
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
post method franta1346 Reporting Services 0 July 23rd, 2007 12:08 AM
using post method urgently skyman763 General .NET 0 February 13th, 2005 10:42 AM
about post and get method csc820203 HTML Code Clinic 1 August 2nd, 2004 02:13 PM
Post Method? zhenwe1 Servlets 0 January 25th, 2004 01:17 PM
POST method not working in LINUX Server , but work cnilashis Beginning PHP 2 August 19th, 2003 09:13 AM



All times are GMT -4. The time now is 10:45 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.