| | |
expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: May 2009
Posts: 81
Reputation:
Solved Threads: 0
I have error on this line..
what should I change..thank you
what should I change..thank you
php Syntax (Toggle Plain Text)
mysql_query("INSERT INTO lesson (subject,year,learningArea,objectives,ability) VALUES ('<?php echo $onrow["subject"]', '<?php echo $onrow["year"]', '<?php echo $onrow["learningArea"]', '<?php echo $onrow["objectives"]', '<?php echo $onrow["ability"]' ") or die(mysql_error());
you're already in PHP, you don't need to do
<?php echo Also, you're in double quotes so you must surround the $onrow["index"] with {} ie., {$onrow["index"]} GCS d- s+ a-->? C++(++++) UL+++ P+>+++ L+++ E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r y+
PMs asking for help will not be answered, post on the forums. That's what they're there for.
Try something like this
You may also want to post what was on the line before this as it too may also have an effect.
php Syntax (Toggle Plain Text)
mysql_query('INSERT INTO lesson (subject, year, learningArea, objectives, ability) VALUES ("'.mysql_real_escape_string($onrow["subject"]).'", "'.mysql_real_escape_string($onrow["year"]).'", "'.mysql_real_escape_string($onrow["learningArea"]).'", "'.mysql_real_escape_string($onrow["objectives"]).'", "'.mysql_real_escape_string($onrow["ability"]).'"') or die(mysql_error());
Try not to bump 10 year old threads as it can be really annoying.
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
Like php then read my website at http://syntax.cwarn23.net/
Star-Trek-Atlantis - now that's what I call a movie ^_^
My favourite PC. - MacGyver Fan
Bad english note: dis-iz-2b4u
![]() |
Similar Threads
- syntax error, unexpected $end in ndex.php on line 127 (PHP)
- vBulletin mod_rewrite (PHP)
- I want to let members message each other (PHP)
- need help in error (PHP)
- combo box (PHP)
- Form not working, getting parse errors... (PHP)
- Parse error: (PHP)
- An error I have never seen before (PHP)
Other Threads in the PHP Forum
- Previous Thread: moving on to a web server
- Next Thread: Parse error, unexpected T_STRING on line 26, but I don't see it
| Thread Tools | Search this Thread |
# 5.2.10 alexa apache api array beginner binary broken cakephp checkbox class clean clients cms code cron curl database date directory display dissertation dynamic echo echo$_get[x]changingitintovariable... email encode error fairness file files folder form forms function functions google href htaccess html image images include indentedsubcategory insert ip javascript joomla legislation limit link local login mail memberships menu mlm multiple multipletables mysql mysqlquery newsletters oop open paypal pdf persist php problem provider query radio random recursion remote rss script search server sessions simple sms sockets source space spam sql syntax system table tutorial update upload url validator variable video web youtube






