franknu Posted January 26, 2007 Share Posted January 26, 2007 I WANT THE MEMBERS TO UPDATE THIER PAGE WHEN THEY CLICK ON A LINK THAT SAYS UPDATE I WAS ABLE TO UPDATE THE DATA BUT I MADE SOME CHANGES AND FOR SOME REASON IT STOP WORKING HERE IS MY CODE [code=php:0]<?php$host = "localhost";$username = "townsfin_localho";$password = "abc123";$database = "townsfin_contacts";$db = mysql_connect($host, $username, $password) or die(mysql_error());mysql_select_db($database) or die(mysql_error());$BusinessName = (isset($_GET['BusinessName']) ? $_GET['BusinessName'] : '');$Slogan = (isset($_GET['Slogan']) ? $_GET['Slogan']:'');$Business_Address = (isset($_GET['Business_Address']) ? $_GET['Business_Address']:'');$Tel = (isset($_GET['Tel']) ? $_GET['Tel']:'');$Website = (isset($_GET['Website']) ? $_GET['Website']:'');$Email = (isset($_GET['Email']) ? $_GET['Email']:'');$Member_Status = (isset($_GET['Member_Status']) ? $_GET['Member_Status']:'');$Fax =(isset($_GET['Fax']) ? $_GET['Fax']:'');$type = (isset($_GET['type']) ? $_GET['type']:'');$make = (isset($_GET['make']) ? $_GET['make']:'');$Categories = (isset($_GET['Categories']) ? $_GET['Categories']:'');$Keyword = (isset($_GET['Keyword']) ? $_GET['Keyword']:'');$Picture1 = (isset($_GET['Picture1']) ? $_GET['Picture1']:'');$Headline = (isset($_GET['Headline']) ? $_GET['Headline']:'');$Slogan2 = (isset($_GET['Slogan2']) ? $_GET['Slogan2']:'');$Description1 = (isset($_GET['Description1']) ? $_GET['Description1']:'');$Description2 = (isset($_GET['Description2']) ? $_GET['Description2']:'');$Description3= (isset($_GET['Description3']) ? $_GET['Description3']:'');$Contact2 = (isset($_GET['Contact2']) ? $_GET['Contact2']:'');$Picture2 = (isset($_GET['Picture2']) ? $_GET['Picture2']:'');$Picture3 = (isset($_GET['Picture3']) ? $_GET['Picture3']:'');$Picture4 = (isset($_GET['Picture4']) ? $_GET['Picture4']:'');$User_Name = (isset($_GET['User_Name']) ? $_GET['User_Name']:'');$Password = (isset($_GET['Password']) ? $_GET['Password']: '');$query = "SELECT * FROM business_info WHERE `BusinessName`= '$BusinessName' AND `User_Name`='$User_Name'";$result = mysql_query($query) or die (mysql_error());$res2 = mysql_fetch_assoc($result);echo "$BusinessName"; if(isset($_GET['update'])) {$query="UPDATE business_info SET `BusinessName`= '{$BusinessName}', `Slogan`='{$Slogan}', `Business_Address`='{$Business_Address}', `Tel`='{$Tel}', `Website`='{$Website}', `Email`='{$Email}', `Fax`='{$Fax}', `type`='{$type}', `make`='{$make}', `Categories`='{$Categories}', `Keyword`='{$Keyword}', `Picture1`='{$Picture1}', `Headline`='{$Headline}', `Slogan2`='{$Slogan2}', `Description1`='{$Description1}', `Description2`='{$Description2}', `Description3`= '{$Description3}', `Picture2`='{$Picture2}', `Picture3`='{$Picture3}', `Password`='{$Password}' WHERE `User_Name`='{$User_Name}'";$result = mysql_query($query) or die (mysql_error());} ?><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%"> <? include("../includefiles/logo.php"); ?> </td> </tr> </table> </div></td> </tr> <tr> <td><div align="center"></div></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="94%"> <table width="100%" border="0" cellpadding="0" cellspacing="0" background="../images/top_center_back2.jpg" bgcolor="#FFFFFF"> <tr> <td><table width="100%" height="125" border="0" cellpadding="1" cellspacing="1"> <form name="form" method="Post" action="" > <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" Value="<? echo "$BusinessName"; ?>" > </td> </tr> <tr> <td>Slogan</td> <td><input type="text" name="Slogan" value="<?php echo"$Slogan"; ?>"></td> <td>Website</td> <td><input type="text" name="Website " value="<?php echo "$Website"; ?>"></td> </tr> <tr> <td>Tel</td> <td><input type="text" name="Tel" value="<?php echo "$Tel"; ?>"></td> <td>Key Words</td> <td><input type="text" name="Keyword value="<?php echo "$Keyword"; ?>"> </td> </tr> <tr> <td>Fax</td> <td><input type="text" name="Fax" value="<?php echo "$Fax"; ?>"> </td> <td>Address</td> <td><input type="text" name="Business_Address" value="<?php ?> "> </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" value="<?php echo "$Categories";?>"> </TEXTAREA> </td> </tr>[/code]PLEASE HELP Link to comment https://forums.phpfreaks.com/topic/35846-updating-data-on-member-pages/ Share on other sites More sharing options...
genericnumber1 Posted January 26, 2007 Share Posted January 26, 2007 Normally if you put more effort into your post people will want to help more, if you don't get it I'll clear it up.Take the half second to turn off caps lock.Punctuation is your friend.As for your problem wouldn't it stand to reason that if it worked before you changed it and it didn't work afterwards that you wouldn't have to post the whole page here, you could just post the changes you made and anything else required for us to understand.Give us your effort and we'll give you ours. Link to comment https://forums.phpfreaks.com/topic/35846-updating-data-on-member-pages/#findComment-169961 Share on other sites More sharing options...
franknu Posted January 26, 2007 Author Share Posted January 26, 2007 i had put a lot of time and effort into this, it is because i am still a newbie and sometimes the smaller mistakes i cant see them, with the time those smallers mistakes, would be more abvious to me. i am sure that u went through this too Link to comment https://forums.phpfreaks.com/topic/35846-updating-data-on-member-pages/#findComment-169967 Share on other sites More sharing options...
genericnumber1 Posted January 26, 2007 Share Posted January 26, 2007 I'm not saying you didn't put effort into your script, I'm saying you didn't put effort into posting your problem ;) post the script before you made the changes in code tags and we can find the problem quickly.There are no syntax errors so it will help us find the problem more quickly if you at least post what you changed to break the script.You should also elaborate on what you mean by "Not working" there are many ways for a script to not work and it will help us diagnose the problem if you tell us what it does or doesn't do. Link to comment https://forums.phpfreaks.com/topic/35846-updating-data-on-member-pages/#findComment-169992 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.