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

  • Home
  • SEARCH
  • 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 873113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:53:00+00:00 2026-05-15T10:53:00+00:00

I have this error: Parse error: syntax error, unexpected $end in /…../student.php on line

  • 0

I have this error:

Parse error: syntax error, unexpected $end in /…../student.php on line 57

note: the lines in “student.php” it’s only 56 lines, so the error appear in addition line !

<?php
session_start();
if(!isset($_SESSION['user_login']))
    include('login.php');
else
    {?>
    <a href=student.php?add=1>تسجيل طالب</a><br>
    <a href=student.php?edit=1>تعديل بيانات طالب</a><br>
    <?php
    if($_GET['add'] ==1)
        {?>
        <form action="student.php?add=2" method="POST">
        <input type="text" name="name" size="25" maxlength="50"> إسم الطالب:
        <br>
        <input type="text" name="birthday" size="25" maxlength="50"> تاريخ الميلاد:
        <br>
        <input type="text" name="phone" size="25" maxlength="50"> رقم الهاتف:
        <br>
        <input type="text" name="mobile" size="25" maxlength="50"> رقم الهاتف النقال:
        <br>
        <input type="text" name="email" size="25" maxlength="50"> البريد الإلكتروني:
        <br>
        <input type="text" name="comment" size="25" maxlength="100"> ملاحظات:
        <br>
        <input type="submit" value="اضف">
        <input type="reset" value="مسح">
        </form>
        <?php
        }
    else if($_GET['add'] ==2)
        {
        $name = $_POST['name'];
        $birthday = $_POST['birthday'];
        $phone = $_POST['phone'];
        $mobile = $_POST['mobile'];
        $email = $_POST['email'];
        $comment = $_POST['comment'];
        $add = "INSERT INTO student(S_ID, S_Name, S_DOB, S_HomeTele, S_Mobile, S_Email, S_Comment) VALUES(NULL, '$name','$birthday','$phone','$mobile','$email','$comment')";
        $addq = MYSQL_QUERY($add);
        if($addq)
            {
            echo"تم اضافة الطالب بنجاح<br>";
            echo"<a href=student.php?add=1>اضغط هنا لإضافة طالب آخر</a><br>";
            echo"<a href=student.php>اضغط هنا للعودة لصفحة الطلاب الأولى</a><br>";
            echo"<a href=admin.php>اضغط هنا للعودة للصفحة الأولى للوحة التحكم</a><br>";
            }
        else
            {
            echo"<br>هناك خطأ، لم يتم اضافة الطالب";
            echo"<a href=student.php?add=1>اضغط هنا لإضافة طالب آخر</a><br>";
            echo"<a href=student.php>اضغط هنا للعودة لصفحة الطلاب الأولى</a><br>";
            echo"<a href=admin.php>اضغط هنا للعودة للصفحة الأولى للوحة التحكم</a><br>";         
            }
        }
?>
  • 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-15T10:53:01+00:00Added an answer on May 15, 2026 at 10:53 am

    The error means that there is a curly brace { without a matching closing curly brace. It reached the end of the file and didn’t find one, which is why it reported it as one past the last line of the file.

    The closing } of the first else block is missing. Adding one to the last line of the file (before the closing ?>) should do the trick.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have this error Parse error: syntax error, unexpected '{' in receive/register.php on line
Parse error: syntax error, unexpected $end in blah/blah/blah.php line 1 This is the error
I am getting this error : Parse error: syntax error, unexpected T_OBJECT_OPERATOR in wp-content/themes/phil/page.php
I am getting this error: Parse error: syntax error, unexpected T_SL on line 23
Parse error: syntax error, unexpected T_IF, expecting T_FUNCTION in C:\wamp\www\Exam Creator\cls_FillInTheBlank.php on line 31
I am getting this error Parse error : syntax error, unexpected T_STRING in /ho.../ssd/recording-goodbye.php
I have this function, and it returns Parse error: syntax error, unexpected T_RETURN .
I am getting Parse error: syntax error, unexpected ',' in /xxx/login.php on line 28
I keep getting a syntax error Parse error: syntax error, unexpected '{' in contact_form.php
As a CakePHP novice, I'm having this error: Parse error: syntax error, unexpected T_DOUBLE_ARROW

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.