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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem: Compiling PHP on local PC

Status
Not open for further replies.

alsaffar

Programmer
Oct 25, 2001
165
KW
Hi there,

My problem can be solved only by those who're compiling their scripts on their local PC.

I'm using:

Apache 2.0.4
PHP 4.2.2
MySQL 3.23.51
OS: Windows XP Pro

I just started compiling my php scripts on my local PC instead of uploading them and testing them on the web. The restreiving from my tables is fine but the insertion is not.

These are a test files:

1. Test.html :

<FORM NAME=Registration ACTION=&quot;Test.php&quot; METHOD=&quot;POST&quot;>
<input type=&quot;text&quot; name=&quot;signUserName&quot; size=&quot;30&quot;>
<input type=&quot;password&quot; name=&quot;signPassword&quot; size=&quot;30&quot;>
</FORM>

2. Test.php :

<?php
Print &quot;<HTML><BODY>&quot;;
Print &quot;UserName: $signUserName<BR>&quot;;
Print &quot;Password: $signPassword<BR>&quot;;
Print &quot;</BODY></HTML>&quot;;
?>

When I executed the test.html from my local PC, it went to the php file and showed nothing but:

UserName:
Password:

The values in the text boxes didn't moved from the html file to the php files, but when I teseted these scripts when I uploaded them, and they are working fine!

What is wrong? What I'm missing?

Another question; Can use cookies in my local PC when I'm not connected to the internet using only Apache? And what about the script if it has to send mail?

Please for any clarification just ask.

Ali
 
Sounds to me like your local copy of PHP is configured with registar_globals set to off.

Try using $_POST[&quot;signUserName&quot;] instead of $signUserName and see what happens. ______________________________________________________________________
TANSTAAFL!
 
And to answer your second question, yes, you can use cookies locally too. //Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top