Email Script/Javascript Parse Error: Syntax Error, Unexpected T_STRING
I've made a email script to include javascript. Now what I want to do, is that I want to hide the link in status bar when I hover over it. I've implemented javascript into the code but I keep getting the following error:
Parse error: syntax error, unexpected T_STRING in /home/****/public_html/fbmail/contact.php on line 12
Here is line 12:
$message .= '<a href="http://www.mysite.com/" onMouseOver="window.status='Click here to continue.'; return true;" onMouseOut="window.status=''; ">Click here to continue ..</a>'; The complete code:
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
- Parse Error: Parse Error, Unexpected T_STRING, Expecting ',' Or ';'
- Syntax Error, Unexpected T_STRING
- Parse Error, Unexpected T_STRING
- Parse Error, Unexpected T_STRING
- Parse Error, Unexpected T_STRING
- Parse Error: Unexpected T_STRING
- Parse Error: Parse Error, Unexpected T_STRING
- Parse Error: Parse Error, Unexpected T_STRING,
- Parse Error: Parse Error, Unexpected T_STRING
- Parse Error: Syntax Error, Unexpected T_ENCAPSED_AND_WHITESPACE, Expecting T_STR
- Parse Error: Syntax Error, Unexpected '?' In /home/**/public_html/website_
- Parse Error: Syntax Error, Unexpected T VARIABLE In
- Parse Error: Syntax Error, Unexpected T_OBJECT_OPERATOR
- Parse Error: Syntax Error, Unexpected $end In C:wampwwwsitescismv1
- Parse Error: Syntax Error, Unexpected $end In ..
- Parse Error: Syntax Error, Unexpected
- Parse Error: Parse Error, Unexpected T_IF, Expecting ',' Or ''
- Parse Error: Parse Error, Unexpected T_LNUMBER
- Parse Error</b>: Parse Error, Unexpected T_CONSTANT_ENCAPSED_STRING I
- Parse Error: Parse Error, Unexpected T_ELSE....
- Parse Error: Parse Error, Unexpected T_LNUMBER,
- Paging (Parse Error: Parse Error, Unexpected '.' )
- Parse Error: Parse Error, Unexpected T_ELSE
- PHP Parse Error: Parse Error, Unexpected T_VARIABLE
- Parse Error: Expecting `T_STRING' Or `T_VARIABLE' Or `T_NUM_STRING'
- I Get A Syntax Error Unexpected '>
- Syntax Error, Unexpected ')', Expecting '(' In
- Parse Error: Syntax Error ?
- Parse Error: Parse Error, Unexpected '='
- Parse Error: Parse Error, Unexpected $end
- Parse Error: Parse Error, Unexpected $ In
- Parse Error Unexpected $
- Parse Error, Unexpected T_LNUMBER
- Parse Error Unexpected T_VARIABLE
- Parse Error, Unexpected T_ELSE In
- Parse Error, Unexpected T_VARIABLE
- Help With Parse Error, Unexpected T VARIABLE
- Parse Error, Unexpected T_ENCAPSED_AND_WHITESPACE
- Parse Error, Unexpected T_OBJECT_OPERATOR
- Parse Error, Unexpected T_BOOLEAN_OR,
- Finding Unterminated Line? (Parse Error: Unexpected $)
- Cannot Parse Php In Browser, Syntax Error
- FormField Data Entry (Parse Error: Unexpected T_OBJECT_OPERATOR)
- Error Performing Query: You Have An Error In Your SQL Syntax Near
- Redirect Error Reported As SQL Syntax Error
- T_String Error
- Error T_string
- T_STRING Error With Pack Function
- Parse Error: Parse Error, Expecting `','' Or `';''
Parse Error, Unexpected T_STRING
I am getting an parse error, unexpected T_STRING error. I tried to comment the line it refered to and it still gives me an error?? PHP Code:
Parse Error, Unexpected T_STRING
I am getting an parse error, unexpected T_STRING error. I tried to comment the line it refered to and it still gives me an error? Here is the code. The line is near the bottom: PHP Code:
Parse Error, Unexpected T_STRING
I'm getting this error: Code: Parse error: parse error, unexpected T_STRING in /var/www/html/dbTest.php on line 5 from this code:
Parse Error: Unexpected T_STRING
I am using the book "Beginning PHP, Apache, MySQL Web Development." I copy their code syntax to the letter, but I still get an error even though the structure of code looks exactly like it is in the book. Maybe I'm just not seeing it: The full error message is: Parse error: parse error, unexpected T_STRING, expecting '(' in C:Program Filesxampphtdocswebapps estappDisplayTeamMembers.php on line 30 Code:
Parse Error: Parse Error, Unexpected T_STRING
I have edited a php script to pick up the data from a webform and convert it into a email and when i submit it i get a error..... Parse error: parse error, unexpected T_STRING in /home/nas01l/f/flexamatic.com/user/htdocs/estore/sendmail9.php on line 6 the php is:
Parse Error: Parse Error, Unexpected T_STRING,
Can a class define a constant as Java or C does? I tried to define a constant by define("AMAZING_VALUE", "1997"); but it prompts: Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}'
Parse Error: Parse Error, Unexpected T_STRING
keep getting this errorParse error: parse error, unexpected T_STRING in order_fns.php line 91. the code is below for the file and I've indicated line 91 <?php function process_card($card_details) { // connect to payment gateway or // use gpg to encrypt and mail or // store in DB if you really want to return true; } function insert_order($order_details) { global $HTTP_SESSION_VARS; //extract order_details out as variables extract($order_details); //set shipping address same as address if(!$ship_name&&!$ship_address&&!$ship_city&&!$ship_state&&!$ship_zip&&!$ship_country) { $ship_name = $name; $ship_address = $address; $ship_city = $city; $ship_state = $state; $ship_zip = $zip; $ship_country = $country; } $conn = db_connect(); //insert customer address $query = "select customerid from customers where name = '$name' and address = '$address' and city = '$city' and state = '$state' and zip = '$zip' and country = '$country'"; $result = mysql_query($query); if(mysql_numrows($result)>0) { $customer_id = mysql_result($result, 0, 'customerid'); } else { $query = "insert into customers values ('', '$name','$address','$city','$state','$zip','$count ry')"; $result = mysql_query($query); if (!$result) return false; } $query = "select customerid from customers where name = '$name' and address = '$address' and city = '$city' and state = '$state' and zip = '$zip' and country = '$country'"; $result = mysql_query($query); if(mysql_numrows($result)>0) $customerid = mysql_result($result, 0, 'customerid'); else return false; $date = date('Y-m-d'); $query = "insert into orders values ('', $customerid, ".$HTTP_SESSION_VARS['total_price'].", '$date', 'PARTIAL', '$ship_name', '$ship_address','$ship_city','$ship_state','$ship_ zip', '$ship_country')"; $result = mysql_query($query); if (!$result) return false;
Parse Error: Syntax Error, Unexpected T VARIABLE In
I can't figure this out I am posting the script as well if you see something wrong please send an email. ===================================== <?php $nume = $_POST['nume'] $prenume = $_POST['prenume'] $adresa = $_POST['adresa'] $telefon = $_POST['telefon'] $mobil = $_POST['mobil'] $A = $_POST['A'] $B = $_POST['B'] $C = $_POST['C'] $CE = $_POST['C+E'] $D = $_POST['D'] $zi = $_POST['zi'] $luna = $_POST['luna'] $an = $_POST['an'] $email = $_POST['email'] $comentarii = $_POST['comentarii'] $ip = getenv("REMOTE_ADDR"); $msg = "Nume: $nume Prenume: $prenume Adresa: $adresa Telefon fix: $telefon Mobil: $mobil Categoria A: $A CategoriaB: $B CategoriaC: $C CategoriaC+E: $CE CategoriaD: $D Data Nasterii: $zi-$luna-$an IP: $ip"; $to = "email@example.com"; $subj = "candidat nou"; $from = "www.example.com"; mail ($to, $subj, $msg, $from); header("Location: success.htm"); } ?> =================================== error is Parse error: syntax error, unexpected T_VARIABLE in D:xampphtdocsestauto schoolsite_flashsend.php on line 4
Parse Error: Syntax Error, Unexpected T_OBJECT_OPERATOR
I got following error: Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /xxx/xxx/public_html/xxxx/GeteBayOfficialTime.php on line 49 what's wrong with my syntax? GeteBayOfficialTime.php required be runned at PHP 5.x.x., but my web host said support php 4.4.4. I don't know whether I got error because this reason. Code:
Parse Error: Syntax Error, Unexpected $end In C:wampwwwsitescismv1
I keep getting a "Parse error: syntax error, unexpected $end in c:wampwwwsitescismv1contacts.php on line 227". Line 227 is the end of my code. From what I can tell from searching the web, it appears that there is something that is not concantenated correctly. I cannot find it though. Can anyone else see it?
Parse Error: Syntax Error, Unexpected $end In ..
The error message Parse error: syntax error, unexpected $end in FILE on line X is one I run into frequently and I know the cause is I missed an ending quote. Is there an easy way to determine where the inital " started? I find myself adding /* */ blocks or cutting/pasting sections of code out in order to find where the error occured. Wouldn't it it be nice if the warning message included the line in teh source where the initial quote occured? for example say this is my code <? function Build_Query(....) code... $my_query = "SELECT BLAH FROM ; (line 15) more code... } (line 100) EOF and you got Parse error: syntax error, unexpected $end in MYFILE on line 100 started on line 15
Parse Error: Parse Error, Unexpected T_IF, Expecting ',' Or ''
I'm playing around with PHP's imap functions and I'm encountering a syntax error that I can't figure out completely. Quote: Parse error: parse error, unexpected T_IF, expecting ',' or '' in /home/kingmike/docs/WEBMAIL/inbox.php on line 53 PHP Code:
Parse Error: Parse Error, Unexpected T_LNUMBER
what's wrong with this code? line 19: if($_POST['miners']*500+$_POST['magicians']*800+$_POST['knights']*1200+$_POST['rangers']*1500>$fdatabase['gold']){echo("false!");} I got error: Parse error: parse error, unexpected T_LNUMBER in /home/www/xyz.php on line 19
Parse Error: Parse Error, Unexpected T_ELSE....
The code is: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Club</title> </head> <style type="text/css"> body {margin : 0px;} </style> <body bgcolor="navy"> <font color="white"> Welkom in de winkel. Wat wilt u doen?<br> <form action="club.php" method="post"> <input type="radio" name="keuzewinkel" value="1">Voer kopen<br> <input type="radio" name="keuzewinkel" value="2">Bijproducten kopen<br> <input type="radio" name="keuzewinkel" value="3">Medicijnen kopen<br> <input type="radio" name="keuzewinkel" value="4">Praatje maken met de verkoper<br> <input type="radio" name="keuzewinkel" value="5">Duiven verkopen / kopen<br>  <br> <input type="submit" value="Verder"> </form> <? if (isset($submit)) { if ($keuzewinkel == Ƈ') include('koopvoer.php') else ($keuzewinkel == ƈ') include('koopbijproducten.php') <-- Line 25!!!! else ($keuzewinkel == Ɖ') include('koopmedicijnen.php') else ($keuzewinkel == Ɗ') include('chatverkoper.php') else include('koopduiven.php') } ?> </body> </html>
Parse Error: Parse Error, Unexpected T_LNUMBER,
i got a proplem with my array the error message is : Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in D:xampphtdocsworksmartcontractorssites est.php on line 5 PHP Code:
Paging (Parse Error: Parse Error, Unexpected '.' )
I am trying to page my database records using php and i have written the script but somehow it is giving some weird error somewhee towards the end of the script. can anyone just check the code and tell me whether this will work(give a little attention to the A HREF tag) and how to remove the error that i am getting . The error that I am getting is "Parse error: parse error, unexpected '.' in c:webpaging2.php on line 62" code:
Parse Error: Parse Error, Unexpected T_ELSE
I got the following error in my page Parse error: parse error, unexpected T_ELSE in line 25 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Club</title> </head> <style type="text/css"> body {margin : 0px;} </style> <body bgcolor="navy"> <font color="white"> Welkom in de winkel. Wat wilt u doen?<br> <form action="club.php" method="post"> <input type="radio" name="keuzewinkel" value="1">Voer kopen<br> <input type="radio" name="keuzewinkel" value="2">Bijproducten kopen<br> <input type="radio" name="keuzewinkel" value="3">Medicijnen kopen<br> <input type="radio" name="keuzewinkel" value="4">Praatje maken met de verkoper<br> <input type="radio" name="keuzewinkel" value="5">Duiven verkopen / kopen<br>  <br> <input type="submit" value="Verder"> </form> <? if (isset($submit)) { if ($keuzewinkel == Ƈ') include('koopvoer.php') else ($keuzewinkel == ƈ') include('koopbijproducten.php') <-------- line 25 else ($keuzewinkel == Ɖ') include('koopmedicijnen.php') else ($keuzewinkel == Ɗ') include('chatverkoper.php') else include('koopduiven.php') } ?> </body> </html>
PHP Parse Error: Parse Error, Unexpected T_VARIABLE
I'm writing a fairly simple php script and I keep getting the message "PHP Parse error: parse error, unexpected T_VARIABLE". I know that means I made a simple mistake somewhere, but syntax highlighting and checking have revealed nothing and I certainly not catch it with my own eye. I reformatted the whitespace to spaces and newlines only, so it has to be something that shows up on the screen. here's the PHP portion in its entirety: <%php $socket = @mysql_connect("mysql","database","****"); if (mysql_select_db ("comments")) { $sql = "SELECT * FROM register"; $query = mysql_query($sql, $socket); while($data = mysql_fetch_object($query)) { echo "<TR><TD> $data->name $data->email $data->aim $data->known</TD></TR>"; } } %> There is no other scripting on the page. The error is on the line with "$socket = @mysql_connect...". Could I have the ASP-style tags wrong?
I Get A Syntax Error Unexpected '>
Can someone please take a look a this code and give an idea what i'm soing wrong. I;m trying to deleate a record but I can do it. <? //session_start(); include_once("mysql_connect.php"); $myConn = connect_db(); $serviceid = $_POST['serviceid']; $delete = mysql_query("DELETE * FROM service WHERE service_id = $serviceid); mysql_query($strSQL, $myConn) or die (mysql_error()); echo "<script>alert('" . $intIndex . " Service Deleted!');</script>"; echo "<script>location.href='mycar.php'</script>"; ?> I get a syntax error unexpected '>'
Syntax Error, Unexpected ')', Expecting '(' In
I am getting this error: Parse error: syntax error, unexpected ')', expecting '(' in /home/realfina/public_html/tests/cvlsofttest/alert.php on line 27 //line 27 $this->V91c7ec= new GtkDialog('Prompt', null, Gtk::DIALOG_MODAL);
Parse Error: Syntax Error ?
Does anyone know what this means? The file it is saying user.php is a class file however i think i got all the opening and closing braces. QuoteParse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /*/*/*/*/includes/user.php on line 10
Parse Error: Parse Error, Unexpected '='
I'm not sure where to look up the answer to this question myself, so maybe you can help me. The following line of code works fine with php5: function CheckMappings(&$badMappings=array()) On a system with php4 the following error is thrown: Parse error: parse error, unexpected '=', expecting ')' in <phpfileon line 42 Now I would like to know, what the problem is. Is it the '&' or the default value assignment or a combination of both? Where would I find documentation on the differences in the versions of php? Is there a good site? Maybe a table with a feature comparison?
Parse Error: Parse Error, Unexpected $end
I recently created a script for user verification, solved my emailing issues, and then re-created the script in order to work well with the new PHP 5 that I installed on my server. After submitting user information into my creation script, I get the following error from the page that is suppose to insert the user data into the database, create a code, then send an email out for verification. Parse error: parse error, unexpected $end in c:wampwww hreadcreateadd2tbl.php on line 31 Below are the files in which I am using: add2tbl.php <?php require "mailfunctions.php"; $username = $_POST['username']; $md5password2 = md5($_POST['pass2']); $email = $_POST['email']; $md5password = md5($_POST['pass']); if(isset($_POST['username'])) { if ($md5password == $md5password2) { $db = dbc(); $code = codegen(); $user = insertuser($username, $md5password, $email, $code); if ($user == FALSE) { die("There has been an error in adding you to the Database. Please EMail the admin."); } else { echo "<b>Passwords do not match!</b> "; } include("/top.html"); $mail = mailauth($username); if ($mail) { echo ' <p class = "subtitle">Success! Check your email.</p>' } else { echo ' <p class = "subtitle">We are sorry. The request did not go through successfully due to an error in the Mail server. Please contact the Admin.</p>' } include("/bottom.html"); } ?> mailfunctions.php <?php function dbc() { mysql_connect(localhost, "root"); mysql_select_db("ehartwig1"); return TRUE; } function codegen() { $code = rand(10000000000000,999999999999999); return $code; } function insertuser($name,$md5password,$email,$code) { $query = "INSERT INTO threadauth (username, password, email, authcode) VALUES ('{$name}','{$md5password}','{$email}', '{$code}') or return(FALSE)"; $result = mysql_db_query($query); return $result; }
Parse Error: Parse Error, Unexpected $ In
I have just solved the last problem. But now i get the error message Parse error: parse error, unexpected $ in /homepages/12/d214897219/htdocs/adam/create_thumbnails.php on line 58. I dont know how to solve this. Code:
Parse Error Unexpected $
I am getting the following error: Parse error: parse error, unexpected $ in /home/blu6592/public_html/blog/delete_entry.php on line 55 . PHP Code:
Parse Error, Unexpected T_LNUMBER
I'm just starting to learn PHP and have come across this problem. My design entails a series of includes for the header, side nav, and footer. I want to use the same header include throughout the site with the only changes being the page title and header graphic from page to page. I did manage to make the title dynamic by adding this code to the top of the relevant pages: <?php $title = "Group TRICARE Supplement Insurance - American Benefits Services"; ?> AND this in the title of the header include: <title><?php print "$title"; ?></title> Now I'm trying the same approach for the graphic which is not working so well and is throwing this error: parse error, unexpected T_LNUMBER on line 13 of headerShell....
Parse Error Unexpected T_VARIABLE
Hey everyone. I am working on a project for school and am getting a stupid parse error unexpected T_VARIABLE and can't get it to work... <?php $chk_id = $_REQUEST["User"]; $chk_pass = $_REQUEST["Pass"]; $move_on = Chkpass() $connection = mysql_connect("localhost","mitchellk","mitchell06") or die ("Invalid Username or Password, Please try again"); $db = mysql_select_db("mitchellk" , $connection) or die ("Invalid Username or Password, Please try again"); $sql = "SELECT PASSWORD FROM 'tbl_People' WHERE PASSWORD = '$chk_id' "; $result = mysql_query($sql) or die("Password Failed"); $okid = mysql_fetch_row($result); $sql = "SELECT USERNAME FROM 'tbl_People' WHERE USERNAME = '$chk_pass' "; $result = mysql_query($sql) or die("Username Failed"); $okid = mysql_fetch_row($result); if (($chk_id <> $okpass[0]) or ($chk_pass <> $okid[0})) { die ("YOU ARE NOT AUTHORIZED"); } ?> It says I am getting the error on line 6 which is the following line. $connection = mysql_connect("localhost","mitchellk","mitchell06") or die ("Invalid Username or Password, Please try again");
Parse Error, Unexpected T_ELSE In
Im working a form for uploading data but I have a problem in this structure but I dont see it. This structure without all the data works, no errors. But if I put in the data I get an error: *Parse error*: parse error, unexpected T_ELSE in */var/www/KimTate/AddHome5.php* on line *53 *That line translates to where the form is to show.....
Parse Error, Unexpected T_VARIABLE
I am creating a database on a testpage on my server, (Link: http://www.hlevolve.com/databasetesting/script.php) whenever I run this page, it gives me this error: Parse error: parse error, unexpected T_VARIABLE in /home/shark55/public_html/databasetesting/script.php on line 22 I believe it has somthing to do with this piece of code: //Assign contents of form to variables $name = $_POST['Name']; $email = $_POST['Email']; $sql = "INSERT INTO addressbook SET Email = "$email", First_Name = "$name"");
Help With Parse Error, Unexpected T VARIABLE
I am not sure i am in the right place but it sure seems like it to me . So here goes . I am new to php . I have been trying with out much success to setup a php web site . but i have hit an impass and no matter where i have looked i cannot seem to find what the prob is . So i ask those of you who know about php to plz help me . I get this error and no matter what i do to the line i cannot seem to fix it. From what i can it will conect to the database but then gives me the error below. Any help or suggestions would be greatly apreciated . And now for the stupid question of the day as long as i am here . Could this issue be my hosting Co. servers/sites? I did get this working on another hosting Co. site but when i moved to a new host this started up...
Parse Error, Unexpected T_ENCAPSED_AND_WHITESPACE
Im currently getting the error: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/midwestm/public_html/support/tutorials.php on line 15. When running the script below, I believe the error has only started to occur since we made the move to a server with global variables switched off....
Parse Error, Unexpected T_OBJECT_OPERATOR
Parse error: parse error, unexpected T_OBJECT_OPERATOR, expecting ')' in c:inetpubwwwrootsession.php on line 19 can anyone tell me what is wrong with this code? <? // Define the Session class class Session { // Define the properties: var $sqlhost="localhost"; var $sqluser="root"; var $sqlpass=""; var $sqldb="ecommerce"; var $linkid; var $seshid; var $sessdata; var $err; var $err_no; var $expire_time=900; // length of time until expiration in seconds var $userid; // Define the methods: function Session($this->seshid,$this->userid=0) { // connect to MySQL $this->linkid=mysql_connect($this->sqlhost,$this->sqluser,$this->sqlpass); // verify connection made if (!$this->linkid) // was not able to connect { $this->err=mysql_error(); $this->err_no=101; return; } // select database $result=mysql_select_db($this->sqldb,$this->linkid); if (!$result) // unable to select db { $this->err= mysql_error(); $this->err_no=102; return; }
Parse Error, Unexpected T_BOOLEAN_OR,
I got this error: Parse error: parse error, unexpected T_BOOLEAN_OR, expecting '(' in /home/content...on line 36 Went to line 36 in the code and here it is: if ( PA::$login_uid || (!isset($configure['show_splash_page'])) || $configure['show_splash_page'] == INACTIVE) { Now I know it is an error with a "(" and I have played around with it, but I can't find the error.
Finding Unterminated Line? (Parse Error: Unexpected $)
I've spent the whole morning trying to figure out what's the error here. The error is: Parse error: parse error, unexpected $ in /home/hsphere/local/home/ne/machinemess.singaporeanimenews.net/meat/test.php on line 212 and line 212 is the last line of this code. Do I have any unterminated strings anywhere? I can't find any. PHP Code:
Cannot Parse Php In Browser, Syntax Error
I'm getting started with PHP, and I'm got a simple database in MySQL and using php to display information from it. I have a script where I'm trying to display the following: -first name -last name -address When I parse the file with VIM, I get a syntax error line 20, but I'm not able to see/find my error. PHP Code:
FormField Data Entry (Parse Error: Unexpected T_OBJECT_OPERATOR)
I am trying to populate formfields in a microsoft word document. I can start a new document, write text to it, save it etc., etc.. but I cannot seem to figure out the syntax to write to formfield inside the document. According to the word document, you need to use this. ActiveDocument.FormFields("Text1").Result = "Don Funk" I have tried to convert that to a PHP Com object statement but cannot get the syntax right... When i use this which is what I thought you would use; $word->ActiveDocument->FormFields("the_field")->Result("the_data"); I get this error; Parse error: parse error, unexpected T_OBJECT_OPERATOR
Error Performing Query: You Have An Error In Your SQL Syntax Near
I have a query which pulls user info from a database table, and displays it in an HTML table. The user then has the ability to edit this data on the next page by clicking continue, where the first and last name are passed as variables, and are listed as uneditable, whereas all the other fields are able to be edited through a simple form. Here's my problem, on the final page where the actual database UPDATE occurs, I'm getting a SQL error that looks like this --------- Error performing query: You have an error in your SQL syntax near 'WHERE first_name='Joe' AND last_name='Schmoe' SET street_address_1='real address' at line 1 ---------- It looks like its passing the first and last name fine (through hidden inputs), yet when I start to pass the edited fields as variables, it cuts off for some reason. The actual full value that I entered for "street_address_1" was "real address 333". It looks like it cut off after the "address", and didnt even bother to send the other 8 fields. My code on the processing page looks like this ---------- $street_address_1_update=$_POST['street_address_1_update']; $street_address_2_update=$_POST['street_address_2_update']; $city_update=$_POST['city_update']; $sql ="UPDATE mailing_list WHERE first_name='$first_name_update' AND last_name='$last_name_update' SET street_address_1='$street_address_1_update' street_address_2='$street_address_2_update' city='$city_update'" ---------- I only included 3 fields for brevity's sake. The rest pass the same way as these three. Again, the first and last names are simply passed as hidden inputs through the form. Anybody have any clue what might be causing this? I know the error is a SQL one, but I may not be passing the variables correctly in PHP.
Redirect Error Reported As SQL Syntax Error
I just spent way too much time trying to track down an error that was incorrectly reported just now, and I would like to see if someone can explain to me why it was reported that way. The purpose of the code is simply to delete a record and then redirect back to the page where the delete was started. The code looks like this: elseif ($_GET[action] == "delete") { $query = "delete from product_subcategory2 where product_sku=$_GET[product_sku] and subcategory2_id=$_GET[subcategory2_id]"; $result = mysql_query($query) or die (mysql_error()); $affected_rows = mysql_affected_rows(); if ($affected_rows == 1) { header("Location:product.php?action=edit&product_sku=$product_sku"); } else { do_header(); echo("<center><p class="body">Unable to delete Subcategory2. Please try again.</p>"); echo("<a href="product.php?action=edit&product_sku=$product_sku">Edit Product</a>"); do_footer(); } } The SQL was find, but the error I had was in the header line. What I had was this: header("Location:product.php?action=edit&product_sku=<?php echo $product_sku?>"); so since I was already in PHP, I didn't need the "<?php echo" for $product_sku.
T_String Error
Parse error: parse error, unexpected T_STRING in /home/cmarley/public_html/admin/config.php on line 23 When I go to that line it is $dbhost = 'localhost' // (your host name - default: localhost)...
Error T_string
Hi - just programming my first php script. I keep getting this Parse error: parse error, unexpected T_STRING in /home/hosting-0/public_html/devsite/avo01/results.php on line 14 line 14 is $time_a = “The earlier people are on the road the higher their risk rating. Up to 20% of drink drive convictions are currently ‘morning after’, on their way to, or at, work. If your company instigated the ‘journey purpose’, then the company shoulders some of the liability if anything goes wrong.”;
T_STRING Error With Pack Function
I'm getting the T_STRING error ("Parse error: syntax error, unexpected T_STRING in alexa5.php on line 26") when using the pack function: function calculate_RFC2104HMAC ($data, $key) { return base64_encode ( pack ( "H*" , sha1((str_pad($key, 64 , chr ( 0 x00)) ( str_repeat ( chr ( 0 x5c), 64 ))) . pack ( "H*" , sha1((str_pad($key, 64 , chr ( 0 x00)) ( str_repeat ( chr ( 0 x36), 64 ))) . $data)))) ); } "Line 26" refers to line 3 above: "pack ("H....." I have no experience with pack, but the pack manual doesn't give me any clues as to the problem. I've commented out the pack stuff and replaced it with a print command to ensure it was this and not the previous line that is causing the problem. I've been working on this for several hours and have asked the best PHP friends I have, and have gotten no leads. Any hints from you guys would do wonders for my morale. You can see the full code here http://developer.amazonwebservices....D=6825&start=13
Parse Error: Parse Error, Expecting `','' Or `';''
I'm getting the following error Parse error: parse error, expecting `','' or `''' in /home/notarywe/public_html/php/update2.php on line 108 Here is line 108 <input type="text" name="ud_first" value="<? echo "$first" size="20"?>"></td>
|