Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7698607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:16:55+00:00 2026-05-31T22:16:55+00:00

My IDE is expecting a semicolon but I’m not sure where! It is this

  • 0

My IDE is expecting a semicolon but I’m not sure where!
It is this line it is highlighting:

,'$other_writ'  WHERE id="$_SESSION[user_id]")

This is the code above:

 if (!empty($_POST['doLanguage']) && $_POST['doLanguage'] == 'Submit') 
{ 
  session_start();
  foreach($_POST as $key => $value)
  $id = "$_SESSION[user_id]";

  if(empty($err)) {
  for($i = 0; $i < count($_POST["other"]); $i++);
{
$native = mysql_real_escape_string($_POST['native'][$i]);
$other = mysql_real_escape_string($_POST['other'][$i]);
$other_list = mysql_real_escape_string($_POST['other_list'][$i]);
$other_read = mysql_real_escape_string($_POST['other_read'][$i]);
$other_spokint = mysql_real_escape_string($_POST['other_spokint'][$i]);
$other_spokprod = mysql_real_escape_string($_POST['other_spokprod'][$i]);
$other_writ = mysql_real_escape_string($_POST['other_writ'][$i]);
$sql_insert = "INSERT into `language`
(`native`,`other`,`other_list`,`other_read`, `other_spokint`
,`other_spokprod`,`other_writ`  )
VALUES
('$native','$other','$other_list','$other_read','$other_spokint','$other_spokprod'
,'$other_writ'  WHERE id="$_SESSION[user_id]")";

mysql_query($sql_insert,$link) or die("Insertion Failed:" . mysql_error());     
}

Thanks for any help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T22:16:56+00:00Added an answer on May 31, 2026 at 10:16 pm

    You open a string here:

    "INSERT into `language` ...
    

    and it’s being closed here:

    ... WHERE id="
    

    PHP expects a semicolon after this. You could fix it by replacing the double quotes with single quotes (which are the SQL standard), but: why are you using a WHERE clause with INSERT anyway? You don’t need that.

    Just finish your string like this:

    ... ,'$other_writ')";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

VS2010 / R#5.1 I have this line of code: With.Mocks(_mocks).Expecting(() => { _fooServiceMock.Expect(x =>
When I build my application in VC6 IDE, I get this error: --------------------Configuration: all
Not a programming question as such, but.. ..Is there a way from the Delphi
I recently switched IDE's to Eclipse. Just to test that I am not insane,
I've written code for PIC16F1947 in C. I am using the following: MPLAB IDE
I added this code to my web page: <input id='argh' type='text' onfocus='this.value=7'> Unless the
Selenium IDE has storeEval | /\d*$/.exec(storedVars['myLocation']) | qid Selenium webdriver code I am using:
This is an IDE question for Visual Basic 2008 Express Edition. It might be
I can run my software without any problems in my IDE, but when I
I've recently been exporting my settings from my various IDE's to share with friends.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.