PHP script is not working after server move.
I have this simple script that i was working on another server before i moved and it doesnt seem to work anymore. I haven't changed anything besides the server. It connects to the database, but when I click on my submit button to activate the "if statement" nothing happens. Anyone know what i did wrong?
<?
mysql_connect ("localhost", "xxxx", "xxxx") or die ('Cannot connect to the database because: ' . mysql_error());
mysql_select_db ("xxxx") or die ('Unable to select database');
$stuff = mysql_query("SELECT CID, First, Last, Email, last_sent, join_date FROM Newsletter");
$cur_date = date("Y/m/d");
if ($asdf == "Send") {
while ($row = mysql_fetch_array($stuff, MYSQL_ASSOC))
{
echo "<b>Success:</b> $row[CID] | $row[Email] | $row[First] | $row[Last] | $row[last_sent] | $cur_date<BR><BR>";
}
}
?>
<html><body>
<form name="form1" method="post">
<input type="submit" name="asdf" value="Send">
</form>
</body></html>
mysql_connect ("localhost", "xxxx", "xxxx") or die ('Cannot connect to the database because: ' . mysql_error());
mysql_select_db ("xxxx") or die ('Unable to select database');
$stuff = mysql_query("SELECT CID, First, Last, Email, last_sent, join_date FROM Newsletter");
$cur_date = date("Y/m/d");
if ($asdf == "Send") {
while ($row = mysql_fetch_array($stuff, MYSQL_ASSOC))
{
echo "<b>Success:</b> $row[CID] | $row[Email] | $row[First] | $row[Last] | $row[last_sent] | $cur_date<BR><BR>";
}
}
?>
<html><body>
<form name="form1" method="post">
<input type="submit" name="asdf" value="Send">
</form>
</body></html>