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 7906781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:08:04+00:00 2026-06-03T11:08:04+00:00

heyy guys…. i know this is probably a silly error but i really tried

  • 0

heyy guys….

i know this is probably a silly error but i really tried hard to solve this error, but can’t seem to find the cause…

    $id=$_GET['uid'];
    $name=$_GET['uname'];
    $empnum=$_GET['empnum'];
    $status=$_GET['status'];
    $role=$_GET['role'];

    //--SQL query : Fetching data from main_data and how many data row exists
    $sql1=mysql_query("SELECT * FROM $tbl_name WHERE UserID='$id'");
    $count=mysql_num_rows($sql1);

    if($count>0)
    {
        echo "User ID exists";
        header("refresh:1;url=newregistration.php" );
    }
    else
    {
        //sql commands to insert the data into the database
        sql1="UPDATE $tbl_name SET UserID='$id' WHERE UserID='$id'";        //sql query defined
        sql2="UPDATE $tbl_name SET UserName='$name' WHERE UserID='$id'";
        sql3="UPDATE $tbl_name SET EmpNumber='$empnum' WHERE UserID='$id'";
        sql4="UPDATE $tbl_name SET Status='$status' WHERE UserID='$id'";
        sql5="UPDATE $tbl_name SET Role='$role' WHERE UserID='$id'";
        $result=mysql_query($sql1) or mysql_error(); 
        $result=mysql_query($sql2) or mysql_error();
        $result=mysql_query($sql3) or mysql_error();
        $result=mysql_query($sql4) or mysql_error();
        $result=mysql_query($sql5) or mysql_error();

would be grateful if someone can point out my mistake…

thank you

— Update —

Error:

Parse error: syntax error, unexpected '=' in C:\wamp\www\ReportTrackingSystem\updateregistration.php on line 43 $sql1="UPDATE $tbl_name SET UserID='$id' WHERE UserID='$id'";
  • 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-06-03T11:08:05+00:00Added an answer on June 3, 2026 at 11:08 am

    Difficult to go off of without an exact error message, but these (sql1, sql2, etc) should be variables (flagged with $):

    $sql1="UPDATE $tbl_name SET UserID='$id' WHERE UserID='$id'";        //sql query defined
    $sql2="UPDATE $tbl_name SET UserName='$name' WHERE UserID='$id'";
    $sql3="UPDATE $tbl_name SET EmpNumber='$empnum' WHERE UserID='$id'";
    $sql4="UPDATE $tbl_name SET Status='$status' WHERE UserID='$id'";
    $sql5="UPDATE $tbl_name SET Role='$role' WHERE UserID='$id'";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Heyy can somebody help me ? i have this issue that still do know
Heyy there, i have for example a view function like this: def profile_view(request, id):
Heyy guys, i have one short question: What programming language/framework do you think is
Heyy i could not figure out if dynamic disk size(hard disk size according to
Heyy Everybody! I am trying to create a memory management system, so that a
heyy there i want to parse a text,let's name it 'post', and 'urlize' some
I have a really simple chat application on a site which works pretty good.
HI, How can I define an object in a method? std::string method(std::string name, &pointer_to_any_class)
Is there a bug to tag a photo on sdk? Because I read something,

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.