Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why would this not work?

Status
Not open for further replies.

CodeStalker

Technical User
Aug 30, 2005
3
US
I have created an input form in HTML that passes values to a PHP page. I have tested this process and it works perfectly when I load it onto a server at work.
When I load the same two pages into my personal website it does not work. The receiving .php form opens but no values have been passed.
As a side note, on my personal website I am running a PHP based forum that works with no problems.

The hosting company for my personal website is telling me that I have a scripting problem and cant offer any help.

Any suggestions?
 
It's probably a register_globals Enabled vs. Disabled.

How do you reference variables coming from the form. If you don't use $_POST, $_GET, or $_REQUEST, change to that method and your scripts will work no matter where you run them.

See for more information.
 
Lets say that you're trying to send information like email to the .php-file. <input name="email" type="text" id="email">

I suppose you're using method="POST" in the form.

In the .php file define this first:

$email = $_POST['email'];

if you're using method="GET" then do this:

$email = $_GET['email'];

after this you can:
<?php print $email; ?>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top