Jump to content

franknu

Members
  • Posts

    344
  • Joined

  • Last visited

    Never

Everything posted by franknu

  1. ok i didnt add it in that code because i thought i was too long with the heading and inrelevant but it does have it.
  2. Ok, I am very confuse on this one, I have a page where users can send a message into the database which eventually the business can log in and he/she can see, his/her messages. that had been posted to his business, i am doing it with a session which, i will call later to display the messages sent to that business my problem is that the $_SESSION['BusinessName']; is not bein taken to page2. I did some testing and it takes other values to page2 but not BusinessName value here is my code for page1 please help <?php session_start(); $_SESSION['BusinessName'] ='$BusinessName'; $_SESSION['test']='test 1'; // this is the test line ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> if(isset($_GET['BusinessName'])){ $query = "SELECT * FROM business_info WHERE `BusinessName`= '$BusinessName' "; $result = mysql_query($query) or die (mysql_error()); $row = mysql_fetch_assoc($result); $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']); } ?> <center> <?php $_SESSION['BusinessName']; ?> <pre>_SESSION:<?php print_r($_SESSION); ?></pre> <table width="200" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td valign="top"> <?php include("includefiles/banner.php"); ?> <table width="778" border="0" cellpadding="0" cellspacing="0"> <tr> this <pre>_SESSION:<?php print_r($_SESSION); ?></pre> on page1 display _SESSION:Array ( [businessName] => NEW ENGLAND SEAFOODS [test] => test 1 ) AND THIS IS MY CODE FOR page2 <?php session_start(); ?> <html> <head> <title>Send Message</title> <? $BusinessName = addslashes($_POST['BusinessName']); $from = addslashes($_POST['from']); $status= addslashes($_POST['status']); $subject= addslashes($_POST['subject']); $message= addslashes($_POST['message']); $BusinessName= $_SESSION['BusinessName']; if(isset($_SESSION['BusinessName'])){ $query = "INSERT INTO `messages` (`BusinessName`,`date`,`from`,`status`,`subject`,`message`) VALUES ('".$_SESSION['BusinessName']."','".$date."','".$from."', '".$status."','".$subject."', '".$message."')"; $result = mysql_query($query); echo mysql_error(); if($result) { echo mysql_affected_rows()." .Your Message have been sent. We will get back to you. <br>"; } } ?> <center> <pre>_SESSION:<?php print_r($_SESSION); ?></pre> This on page2 display[b] SESSION:Array ( [businessName] => [test] => test 1 )[/b] <table width="200" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td valign="top"> <?php include("includefiles/banner.php"); ?> <td width="282"><? echo'<input name="from" type="text" size="60">'; ?></td> </tr> <tr> <td bgcolor="#CCCCCC"><strong>Subject </strong></td> <td><? echo'<input name="subject" type="subject" size="60">'; ?></td> </tr> <tr> <td bgcolor="#CCCCCC"><strong>Body</strong></td> <td><p> <? echo'<textarea name="message" cols="75" rows="10"></textarea>'; ?> </p> <p> </p></td> </tr> <tr> I am able to insert all the info exept for the BusinessName wich actually is not on page2 that is why is not going into the database
  3. sorry, i just didnt place it on the code but this is how the top looks like <?php session_start(); $_SESSION['BusinessName']; $_SESSION['User_Name']; $_SESSION['Password']; ?> <html> <head> <title>Send Message</title>
  4. Ok, i am going to need some help with a session, i really dont know what the problem is here is my code for page one which work fine <?php session_start(); $_SESSION['BusinessName'] ='$BusinessName'; $_SESSION['BusinessName']; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#E5E5E5" link="#FFFFFF" topmargin="0"> and when i do this: <center> <?php $_SESSION['BusinessName']; ?> <pre>_SESSION:<?php print_r($_SESSION); ?></pre> I dispay this_SESSION:Array ( [businessName] => Cristal Bar Restaurant ) code for page2 here it is <? $BusinessName = addslashes($_POST['BusinessName']); $from = addslashes($_POST['from']); $status= addslashes($_POST['status']); $subject= addslashes($_POST['subject']); $message= addslashes($_POST['message']); $BusinessName= $_SESSION['BusinessName']; if(isset($_SESSION['BusinessName'])){ $query = "INSERT INTO `messages` (`BusinessName`,`date`,`from`,`status`,`subject`,`message`) VALUES ('".$_SESSION['BusinessName']."','".$date."','".$from."', '".$status."','".$subject."', '".$message."')"; $result = mysql_query($query); echo mysql_error(); if($result) { echo mysql_affected_rows()." .Your Message have been sent. We will get back to you. <br>"; } } ?> <center> <?php $_SESSION['BusinessName']; $_SESSION['User_Name']; $_SESSION['Password']; ?> <pre>_SESSION:<?php print_r($_SESSION); ?></pre> this display _SESSION:Array ( [businessName] => )
  5. Ok I fixed the duplicate my problem was that the id was not autoincrementing so my next problem is how do i insert the date and the session into the database
  6. Ok. I want to insert values into a table my problem is that i am gettin this error: Duplicate entry '' for key 1 I also want to insert some other values like a session and the date with the time please help here is my code <?PHP $BusinessName = addslashes($_POST['BusinessName']); $date= addslashes($_POST['date']); $from = addslashes($_POST['from']); $status= addslashes($_POST['status']); $subject= addslashes($_POST['subject']); $message= addslashes($_POST['message']); if(isset($_SESSION['BusinessName'])){ $query = "INSERT INTO `messages` (`BusinessName`,`date`,`from`,`status`,`subject`,`message`) VALUES ('".$_SESSION['BusinessName']."','".$date."','".$from."', '".$status."','".$subject."', '".$message."')"; $result = mysql_query($query); echo mysql_error(); if($result) { echo mysql_affected_rows()." .Your Message have been sent. We will get back to you. <br>"; } } ?> <center> <? $_SESSION['BusinessName']; ?> <? echo'<form action="'. $_SERVER['PHP_SELF'].'" method="post" >'; ?> <table width="390" border="1" bordercolor="#FFFFFF"> <tr> <td width="92" bgcolor="#CCCCCC"><strong>From</strong></td> <td width="282"><? echo'<input name="from" type="text" size="60">'; ?></td> </tr> <tr> <td bgcolor="#CCCCCC"><strong>Subject </strong></td> <td><? echo'<input name="textfield2" type="subject" size="60">'; ?></td> </tr> <tr> <td bgcolor="#CCCCCC"><strong>Body</strong></td> <td><p> <? echo'<textarea name="message" cols="75" rows="10"></textarea>'; ?> </p> <p> </p></td> </tr> <tr> <td> </td> <td bgcolor="#EFEFEF"><div align="right"> <table width="200" border="0" bgcolor="#EFEFEF"> <tr> <td><? echo'<input type="submit" name="Submit2">'; ?></td> <td><? echo'<input type="submit" name="Submit" >'; ?></td> </tr> </table>
  7. Ok, I have an issue here i want to people who visit the webpage to send messages so i created a table name messages, i have another table call business so my question is how do i connect this to table should it be something like this Like $sql=" SELECT FROM business_info AND Message Where BusinessName='$BusinesssName'"; any subjection
  8. your problem is at the end of the query it should be something like this WHERE emp_username= ($_SESSION['username'])
  9. ok i after i uploead a video how do i display it, lets say that i record it from a camera, i upload it to the server so how do i dispaly it this is how i display my pictures $image = preg_replace('#^.*/public_html#', '', $row['Picture8']); echo "<img src='$image' width='235' height='250'>"; any idea help
  10. yes, basicly i have all the state and each state should have the city in USA
  11. this is what i did <? echo "<a href='$website'> $Website </a>"; ?> and here is my display on the source code td><a href=''> oxfordstgrill.com/index.html </a></td>
  12. i know that u have to do some http: thing in there how does that work
  13. well that is an easy one but i total forgot to do this and maybe i can get some help look online and i could find it
  14. know it is a simple java script but i had work with java on the pass on it is really unstable, u never know what you are getting. This seems to be diffrent files i actually downloaded out the Internet and made the changes.. but basiclly i am looking to get rip of it now, maybe i though there was a better way to do this
  15. Ok, I have a java script that has a drop down menu where a person select a state and then all the cities for that state show up right next to it. my problem is that the script it is making the webpage runing slow, or sometimes is telling me that the insternet explorer is running slow because of it and i was wondering if there is a better way to do this with PHP and where should i start
  16. ok, i think, that i am getting punish here, but those are my new changes maybe it make more sense to you guys, now. <?php $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']: ''); $User_Name=strtolower($_GET['User_Name']); $Password=strtolower($_GET['Password']); if(isset($_GET['BusinessName'])){ $query = "SELECT * FROM business_info WHERE `BusinessName`= '$BusinessName' "; $result = mysql_query($query) or die (mysql_error()); $row = mysql_fetch_assoc($result); $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']); } ?> <center> <table width="200" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td valign="top"> <?php include("includefiles/banner.php"); ?> <table width="778" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="778" valign="top"> <table width="778" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top" bgcolor="#f90102"> <?php echo "<h1><font color='ffffff'><marquee>$BusinessName </marquee></font></h1>"; ?> </td>
  17. Ok this line: is stoping the database from displaying any data <?php session_start(); $_SESSION['BusinessName'] ='$BusinessName'; $_SESSION['BusinessName']; ?> and here is the raw code so maybe i can get a better idea on this. this code actually display nicely just the way it is, i just want to create the BusinessName Session which has turn into a headache <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#E5E5E5" topmargin="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()); if(isset($_GET['BusinessName'])){ $query = "SELECT * FROM business_info WHERE `BusinessName`= '$BusinessName' "; $result = mysql_query($query) or die (mysql_error()); $row = mysql_fetch_assoc($result); $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']); } ?>
  18. ok I screw up something here now it is not even selecting from my database this are the new changes i made page1 <?php session_start(); $_SESSION['BusinessName'] ='$BusinessName'; $_SESSION['BusinessName']; ?> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#E5E5E5" topmargin="0"> <?php $host = ""; $username = ""; $password = ""; $database = ""; $db = mysql_connect($host, $username, $password) or die(mysql_error()); mysql_select_db($database) or die(mysql_error()); if(isset($_SESSION['$BusinessName'])){ $query = "SELECT * FROM business_info WHERE `BusinessName`='".$_SESSION['$BusinessName']."'"; $result = mysql_query($query) or die (mysql_error()); $row = mysql_fetch_assoc($result); $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']); } ?> <center> <table width="200" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td valign="top"> <?php include("includefiles/banner.php"); ?> <table width="778" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="778" valign="top"> <table width="778" border="0" cellpadding="0" cellspacing="0"> <?php $_SESSION['BusinessName']; ?> <tr> <td valign="top" bgcolor="#f90102"> <?php echo "<h1><font color='ffffff'><marquee>$BusinessName </marquee></font></h1>"; ?> </td> </tr>
  19. Ok, I have page that carries a session to the next page the problem is that i dont see why this is not carries the the session the next page. here codr for page1 <?php session_start(); $_SESSION['BusinessName']; ?> <body bgcolor="#E5E5E5" topmargin="0"> <?php $host = "l"; $username = ""; $password = ""; $database = ""; $db = mysql_connect($host, $username, $password) or die(mysql_error()); mysql_select_db($database) or die(mysql_error()); if(isset($_GET['BusinessName'])){ $query = "SELECT * FROM business_info WHERE `BusinessName`= '$BusinessName' "; $result = mysql_query($query) or die (mysql_error()); $row = mysql_fetch_assoc($result); $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']); } ?> <center> <table width="200" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td valign="top"> <?php include("includefiles/banner.php"); ?> <table width="778" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="778" valign="top"> <table width="778" border="0" cellpadding="0" cellspacing="0"> <?php session_start(); $_SESSION['BusinessName']; ?> <tr> <td valign="top" bgcolor="#f90102"> <?php echo "<h1><font color='ffffff'><marquee>$BusinessName </marquee></font></h1>"; ?> </td> here is code for page2 <?php session_start(); $_SESSION['BusinessName']; ?> <html> <head> <title>Untitled Document</title> </head> <body bgcolor="#E5E5E5" topmargin="0"> <?php $host = "localhost"; $username = ""; $password = ""; $database = ""; $db = mysql_connect($host, $username, $password) or die(mysql_error()); mysql_select_db($database) or die(mysql_error()); if(isset($_SESSION['$BusinessName'])){ $query = "SELECT * FROM business_info WHERE `BusinessName`='".$_SESSION['$BusinessName']."'"; $result = mysql_query($query) or die (mysql_error()); $row = mysql_fetch_assoc($result); $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']); } ?> <center> <? $_SESSION['BusinessName']; ?> <pre>_SESSION:<?php print_r($_SESSION); ?></pre> <table width="200" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td valign="top"> <?php include("includefiles/banner.php"); ?> <table width="778" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="778" valign="top"> <table width="778" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top" bgcolor="#f90102"> <?php echo "<h1><font color='ffffff'><marquee>$BusinessName </marquee></font></h1>"; ?> </td> ]
  20. ok, i want to update one single file in my database and it is not updating anything here is my display mass-ad.com01 _SESSION:Array ( [user_Name] => franklin [Password] => franklin01 [test1] => This is test1 session variable [test2] => This is test2 session variable ) UPDATE business_info SET `Picture3` = '' WHERE Password='franklin01' here is my code with the new changes\ <?php IF ($_FILES['Picture3']) { $moved3 = false; } define ("UPLOADDIR", "/home/townsfin/public_html/business_images/"); IF (is_uploaded_file($_FILES['Picture3']['tmp_name'])) { $fullpath3 = UPLOADDIR . $_FILES['Picture3']['name']; } IF (move_uploaded_file($_FILES['Picture3']['tmp_name'],$fullpath3)) { $moved3 = true; echo "picture $fullpath3 uploaded"; } if (isset($_POST['submit'])) { $query="UPDATE business_info SET `Picture3` = '". $fullpath3 ."' WHERE Password='".$_SESSION['Password']."'"; $result = mysql_query($query) or die ("Problem with the query: <pre>$query</pre><br>" . mysql_error()); echo"$query"; } ?>
  21. Ok, i want to update a single file some of the info i request is being display except for the picture and the second one is that it is not updating into the database i guess. i have to problem in one here is my code: <?php if ( isset($_SESSION['User_Name']) && isset ($_SESSION['Password']) ) { $query = "SELECT * FROM business_info where User_Name='".$_SESSION['User_Name']."' AND Password='".$_SESSION['Password']."'" ; $result=mysql_query($query); } if ($result = mysql_query($query)) { if (mysql_num_rows($result)) { $row = mysql_fetch_assoc($result); $BusinessName= $row['BusinessName']; $Keyword = $row['Keyword']; $Picture1 = $row['Picture1']; $Headline = $row['Headline']; $Slogan =$row['Slogan']; $Slogan2 = $row['Slogan2']; $Description1 =$row['Description1']; $Description2 = $row['Description2']; $Description3= $row['Description3']; $Contact2 = $row['Contact2']; $Picture2 = $row['Picture2']; $Picture3 = $row['Picture3']; $Categories=$row['Categories']; $Business_Address= $row['Business_Address']; $make=$row['make']; $type=$row['type']; $Tel= $row['Tel']; $Website=$row['Website']; } } else { echo "Query failed<br />$query<br />". mysql_error(); exit; } ?> <table width="622" border="1" bgcolor="#CCCCCC"> <tr> <td width="612" bgcolor="#FFFFFF"> <? echo"$BusinessName"; $_SESSION['User_Name']; $_SESSION['Password']; ?> <pre>_SESSION:<?php print_r($_SESSION); ?></pre> <? $image = preg_replace('#^.*/public_html#', '', $row['Picture3']); echo '<img src="' . $image . '" width="235" height="250">'; ?> <?php if (isset($_POST['submit'])) IF ($_FILES['Picture2']) { $moved1 = false; IF (is_uploaded_file($_FILES['Picture2']['tmp_name'])) { $fullpath2 = UPLOADDIR . $_FILES['Picture2']['name']; IF (move_uploaded_file($_FILES['Picture2']['tmp_name'],$fullpath2)) { $moved2 = true; echo "picture $fullpath2 uploaded"; } } } { $query="UPDATE business_info SET `Picture3` = '".$_POST[Picture3]."' WHERE Password='".$_SESSION['Password']."'"; $result = mysql_query($query) or die ("Problem with the query: <pre>$query</pre><br>" . mysql_error()); echo"$query"; } ?> <? echo'<form action="'. $_SERVER['PHP_SELF'].'" method="post" enctype="multipart/form-data">'; ?> <table width="605" border="1"> <tr> <td width="595"><? echo"<input type='file' name='file'>"; ?></td> </tr> <tr> <td> </td> </tr> </table> <table width="594" border="0"> <tr> <td width="445"> <? echo" <input type='reset' value='Reset fields' />"; ?> <div align="right"></div> <div align="right"></div></td> <td width="139"> <? echo" <input type='submit' value='Update my database' name='submit' />"; ?> </td> </tr> </table> MOD EDIT: use code tags, not php tags <?php // your code ?>
  22. thank u that did it, i cant believe i didn't think of that thank u
  23. Ok, Now i dont have the PArser error but again, if i made changes and hit the back bottom on the browser to go back all the data gets delete from the database any peace of advise on this case
  24. Ok I am getting a parser error updating a database If i have the variables to display like this Slogan2 = ('$_POST[slogan2]'), it actually works but when i hit the back bottom on the browser it deletes all the info from the database except for user name and password but they are actually set up like this ".$_SESSION['Password']." l , i have tried many diffrent way and it keeps givin me that parser error. please help here is my database <? $query="UPDATE business_info SET `BusinessName`=('$_POST['BusinessName']'),`Slogan`=('$_POST['Slogan']'), `Business_Address` =($_POST['Business_Address']),`Tel`=($_POST['Tel']),`Website`=($_POST['Website']), Email = ($_POST['Email']), Fax= ('$_POST[Fax]'), `type`='$type', make = '$make', Categories = ('$_POST[Categories]'), Keyword = ('$_POST[Keyword]'), Headline = ('$_POST[Headline]'), Slogan2 = ('$_POST[slogan2]'), Description1 = ('$_POST[Description1]'), Description2 = ('$_POST[Description2]'), Description3 = ('$_POST[Description3]'), User_Name='".$_SESSION['User_Name']."' WHERE Password='".$_SESSION['Password']."'"; $result = mysql_query($query) or die ("Problem with the query: <pre>$query</pre><br>" . mysql_error()); echo"$query"; ?> this is my error display; Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/townsfin/public_html/authorization/text_update.php on line 114
×
×
  • 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.