i have the member page and the update page
here is my link to update from member page:
Code: Select all
$update = $row['update'];
echo "<a href=\"update.php?update\">update</a>";this is the update page
Code: Select all
<?php
$host = "localhost";
$username = "localhost";
$password = "abc123";
$database = "contacts";
$db = mysql_connect($host, $username, $password) or die(mysql_error());
mysql_select_db($database) or die(mysql_error());
$BusinessName= $row['BusinessName'];
$Keyword =$row['Keyword'];
$Picture1 = $row['Picture1'];
$Headline = $row['Headline'];
$Slogan2 = $row['Slogan2'];
$Description1 =$row['Description1'];
$Description2 = $row['Description2'];
$Description3= $row['Description3'];
$Contact2 = $row['Contact2'];
$Picture2 = $row['Picture2'];
$Picture3 = $row['Picture3'];
$Business_Address=$row['Business_Address'];
$make=$row['make'];
$type=$row['type'];
$Tel=($row['Tel']);
$Website= $row['Website'];
if(isset($_GET['update'])){
$update = ($_GET['update']);
} else {
die ("No business selected");
}
$query = "UPDATE business_info SET `BusinessName`= '$BusinessName', `Slogan`='$Slogan', " .
"`Business_Address`='$Business_Address', `Tel`='$Tel', `Website`='$Website', " .
"`Email`='$Email', `Member_Status`='$Member_Status', `Fax`='$Fax', `type`='$type', " .
"`make`='$make', `Categories`='$Categories', `Keyword`='$Keyword', `Picture1`='$Picture1', " .
"`Headline`='$Headline', `Slogan2`='$Slogan2', `Description1`='$Description1', " .
"`Description2`='$Description2', `Description3`= '$Description3', `Contact2`='$Contact2', " .
"`Picture2`='$Picture2', `Picture3`='$Picture3', `User_Name` ='$User_Name', " .
"`Password`='$Password' WHERE `User_Name`='$User_Name'";
$result = mysql_query($query) or die (mysql_error());
$row = mysql_fetch_assoc($result);
?>
<table width="83%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bordercolor="#FFFFFF" bgcolor="#FFFFFF"><div align="left"><br>
<table width="96%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="91%"><div align="center">
<?PHP
include("../includefiles/logo.php");
?></div></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td><div align="center"></div></td>
</tr>
<tr>
<td>< <tr>
<td background="../images/fondo2.jpg" bgcolor="#999966"><div align="center"><strong>Business Info</strong></div></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td width="17%">Business Name</td>
<td width="22%"><input type="text" name="BusinessName"></td>
<td width="16%">Status</td>
<td width="45%"><input type="text" name="Member_Status"></td>
</tr>
<tr>
<td>Slogan</td>
<td><input type="text" name="Slogan"></td>
<td>Website</td>
<td><input type="text" name="Website"></td>
</tr>
<tr>
<td>Tel</td>
<td><input type="text" name="Tel"></td>
<td>Key Words</td>
<td><input type="text" name="Keyword"></td>
</tr>
<tr>
<td>Fax</td>
<td><input type="text" name="Fax"></td>
<td>Address</td>
<td><input type="text" name="Business_Address"></td>
</tr>
</table></td>
</tr>
<tr>
<td>
<table width="101%" height="35" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="13%">State</td>
<td width="7%"> <select name="make" style="width:160px;"></td>
<td width="16%">City</td>
<td width="8%"><select name="type" style="width:160px;">
</select>
</td>
<td width="9%">Category</td>
<td width="16%"> <TEXTAREA rows=3 name="Categories"> </TEXTAREA> </td>
</tr>
</table><br>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td background="../images/fondo2.jpg" bgcolor="#CCCCCC"><div align="center"><strong><font color="#000000">Business
Webpage</font></strong></div></td>
</tr>
<tr>
<td>Headline</td>
</tr>
<tr>
<td><input type="text" name="Headline"></td>
</tr>
<tr>
<td>Slogan </td>
</tr>
<tr>
<td><input type="text" name="Slogan2"></td>
</tr>
<tr>
<td>Description1 </td>
</tr>
<tr>
<td><TEXTAREA ROWS=5 COLS=65 NAME="Description1"></TEXTAREA></td>
</tr>
<tr>
<td>Description2</td>
</tr>
<td><table width="100%" border="1" cellspacing="1" cellpadding="1">
<tr>
<td>User Name</td>
<td><input type="text" name="User_Name"></td>
<td>Password</td>
<td><input type="text" name="Password"></td>
</tr>
</table></td>
</tr>
</table> </td>
</tr>
<tr>
<td background="../images/fondo2.jpg"> <div align="right">
<input type="submit" value="Store in database" />
<input type="reset" value="Reset fields" />
</div><td>
</form>
</table></td>
<td width="6%" valign="top" bgcolor="#FFFFFF"> </td>
</tr>
</table> </td>
</table>
</tr>
<body>here is my error display
Code: Select all
Notice: Undefined variable: row in c:\program files\easyphp1-8\home\townsfinder\authorization\update.php on line 28
Notice: Undefined variable: row in c:\program files\easyphp1-8\home\townsfinder\authorization\update.php on line 29
Notice: Undefined variable: row in c:\program files\easyphp1-8\home\townsfinder\authorization\update.php on line 30
Notice: Undefined variable: row in c:\program files\easyphp1-8\home\townsfinder\authorization\update.php on line 31
Notice: Undefined variable: row in c:\program files\easyphp1-8\home\townsfinder\authorization\update.php on line 32
Notice: Undefined variable: row in c:\program files\easyphp1-8\home\townsfinder\authorization\update.php on line 33
Notice: Undefined variable: row in c:\program files\easyphp1-8\home\townsfinder\authorization\update.php on line 34
Notice: Undefined variable: row in c:\program files\easyphp1-8\home\townsfinder\authorization\update.php on line 35
Notice: Undefined variable: row in c:\program files\easyphp1-8\home\townsfinder\authorization\update.php on line 36
Notice: Undefined variable: row in c:\program files\easyphp1-8\home\townsfinder\authorization\update.php on line 37
Notice: Undefined variable: row in c:\program files\easyphp1-8\home\townsfinder\authorization\update.php on line 38
Notice: Undefined variable: Member_Status in c:\program files\easyphp1-8\home\townsfinder\authorization\update.php on line 53
Notice: Undefined variable: User_Name in c:\program files\easyphp1-8\home\townsfinder\authorization\update.php on line 58
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in c:\program files\easyphp1-8\home\townsfinder\authorization\update.php on line 62