different php?
Posted by: shahramsfamily (---.dsl.hstntx.swbell.net)
Date: May 14, 2006 03:34PM

I have a test php script running on a server but decided to install wamp to test locally;

the exact same script however will not run properly on the wamp server.

Can anyone help? I've already switched on the short php tags in the ini file
Thanks for your help

here is the script
<?php
$user="xxx";
$password="xxx";
$database="xxx";
$Account_Username=$_POST['Account_Username'];
$Account_Password=$_POST['Account_Password'];
$Account_PasswordConfirm=$_POST['Account_PasswordConfirm'];
$Contact_FirstName=$_POST['Contact_FirstName'];
$Contact_LastName=$_POST['Contact_LastName'];
$Contact_MiddleInitial=$_POST['Contact_MiddleInitial'];
$Contact_Title=$_POST['Contact_Title'];
$Contact_Organization=$_POST['Contact_Organization'];
$Contact_StreetAddress=$_POST['Contact_StreetAddress'];
$Contact_Address2=$_POST['Contact_Address2'];
$Contact_City=$_POST['Contact_City'];
$Contact_State=$_POST['Contact_State'];
$Contact_ZipCode=$_POST['Contact_ZipCode'];
$Contact_Country=$_POST['Contact_Country'];
$Contact_HomePhone=$_POST['Contact_HomePhone'];
$Contact_FAX=$_POST['Contact_FAX'];
$Contact_Email=$_POST['Contact_Email'];
$Contact_URL=$_POST['Contact_URL'];
$profile=$_POST['profile'];


mysql_connect("localhost",$user,$password);
@mysql_select_db($database) or die( "Unable to select database"winking smiley;
$query = "INSERT INTO contacts VALUES ('','$Account_Username','$Account_Password','$Account_PasswordConfirm','$Contact_FirstName','$Contact_LastName','$Contact_MiddleInitial','$Contact_Title','$Contact_Organization','$Contact_StreetAddress','$Contact_Address2','$Contact_City','$Contact_State','$Contact_ZipCode','$Contact_Country','$Contact_HomePhone','$Contact_FAX','$Contact_Email','$Contact_URL','$profile')";
mysql_query($query);



echo "Thanks for your Pre-Registration!<br/>";
echo "You submitted the following information:<br/>";


foreach ($_POST as $key => $value){
echo ": $value <br />\n";
}




mysql_close();
?>

Options: ReplyQuote
Re: different php?
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: May 15, 2006 12:17AM

are you getting any error messages?

Options: ReplyQuote
Re: different php?
Posted by: shahramsfamily (---.dsl.hstntx.swbell.net)
Date: May 15, 2006 01:11AM

No error messages, in fact the file nicely continues with the html that comes after this php piece.
the thing is that nothing ends up in the mysql dbase.

I'm guessing something might be up with either the mysql statement or with the INSERT command.

the strange thing is that the identical script on the live server works fine.

thanks for your help
PP

Options: ReplyQuote
Re: different php?
Posted by: shahramsfamily (---.dsl.hstntx.swbell.net)
Date: May 15, 2006 06:14AM

Ah, solved the issue, by switching to php 4.2.2

pp

Options: ReplyQuote


Sorry, only registered users may post in this forum.