Jump to content

[SOLVED] Exam Results script. Please help me ..........


ankur0101

Recommended Posts

Sorry... I got lost in your code...

 

But I guess I've found the issue

 

This is in your index.php

<form id="form1" name="form1" method="post" action="result.php">
        <div align="center">
          <label>Roll Number :
          <input type="text" name="roll_no_textbox" id="roll_no_textbox" />
          </label>
          <label>
          <input type="submit" name="button" id="button" value="search" />
          </label>
        </div>
      </form>

 

As you can see it uses method="post"

 

This is in your result.php

$roll_number = $_GET['roll_no_textbox'];

 

Ooops... it uses $_GET instead of $_POST

Link to comment
Share on other sites

Ohh, Im getting rid of these errors

I created new table "resulttable"

Put the all data of result-table

 

Now showing 1 more error

 

 

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

 

When I click submit button, it opens result.php instead of reault.php?roll_no=1

Link to comment
Share on other sites

I created new table "resulttable"

Put the all data of result-table

 

Changing the query to use 'result_table' instead of 'result-table' would be enough...

 

Now showing 1 more error

 

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

 

 

Which file? Which line?

 

When I click submit button, it opens result.php instead of reault.php?roll_no=1

 

That's how method="post" works.

Link to comment
Share on other sites

HIP HIP HURREYYY .... :D :D :D :D :D :D :D :D :D :D :D

 

ITS NOW WORKING FINE  :D :D :D :D ;D ;D ;D

 

WHAT I LEARNED IS .>>>>>>>>

Always Keep in mind what I am writing

Make sure that both PHP and SQL syntax are correct

 

So what was the problem ?

 

I wrote incorrect SQL syntax, My database table name was "result-table"

 

I changed it to "resulttable"

 

Now its working , I am damn happy, thank you all friends ......

Link to comment
Share on other sites

  • 2 years later...
  • 1 year later...

am confuse here .were is the mysql table for this tutorial . i have been looking for a way to do this and am finding it difficult.i need assistance with this php script am new in php and this my project work assignment ,if you wish to help me you can contact me obilor4mummy@gmail.com

Link to comment
Share on other sites

  • 1 month later...

Hi friends,

 

I am trying to implement the same feauture of displaying results,

 

actually i want to display the details of the students.

 

i have database named as friends and table named as friendss

 

the table contains field names such as srollno - Roll No

sname- Name

rme- phone Nmber

mailme-  Maill Address

 

what I want is if i give their rollno in  a text box their details should be displayed. can anyone help me in this. 

 

Also i want to display their photo , the name of the photo is same as roll number and the photos are saved under images folder. 

 

please help me

 

contact address miles2gogowtham@gmail.com

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.