Jump to content

[SOLVED] Does anyone see anything wrong with this script?


Recommended Posts

I get no error messages but nothing happens, this script used to work fine. I am completely lost.

 

<html><head><title>AlibreCam Verification System</title></head>

<center><h3>AlibreCam Verification System</h3></center>

<center><TABLE border=0 cellpadding=3><form name="input" action="verification.php" method="get">
<tr><td><center>Customer ID:</center></td>
<td><input type="text" name="user"></td></tr>
<tr><td colspan=2><center><input type="submit" value="Submit"></center></td></tr>
</form><br></table><br>

<?php 
$hostname = "mysql123.hosting.earthlink.net";
$username = "licensinginfo";
$password = "98989lol";
$dbname = "licensinginfo";

$customerid = $_GET['user'];
mysql_connect($hostname, $username, $password) or DIE("Unable to connect to MySQL server $hostname");
$selected = mysql_select_db($dbname) or DIE("Could not select requested db $dbname");

if ($customerid == ""){
echo "Please enter a customer name";
}else{

$query = "SELECT * FROM invoiceid WHERE customerid='$customerid'";
$cResult = mysql_query($query) or die("could not query");

while($row=mysql_fetch_array($cResult)){
$value=$value+$row['numoflicenses'];
}

echo "Total number of licenses purchased: ".$value; 

}
?>
</html>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.