Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
~5K People Reached
Favorite Forums
Favorite Tags
php x 61
Member Avatar for xxreenaxx1

[CODE]SELECT * FROM question LEFT JOIN answer ON question.Que_ID=answer.Que_ID AND question.Que_Answer1=answer.Ans_Answer1 AND question.Que_Answer2=answer.Ans_Answer2 AND question.Que_Answer3=answer.Ans_Answer3 AND question.Que_Answer4=answer.Ans_Answer4 AND question.Tes_ID=7 AND answer.Use_ID=1[/CODE] This should only show record that are use_ID=1 and Tes_ID =7. But in MySQL, there are data for test ID=8 and etc. isnt it only suppose to be 7.

Member Avatar for xxreenaxx1
-1
72
Member Avatar for xxreenaxx1

I have a method that someone helped me with. Not sure what it means [CODE]echo ( $info['Ans_Answer'.$i]) ? " checked" : "";[/CODE]

Member Avatar for xxreenaxx1
0
87
Member Avatar for xxreenaxx1

I am printing question number with the correct answer as 1 and wrong answer as 0. Now I would like to count how many correct answers for each question. Example of this: Question number: 8 00110 For this example there are two correct answer. [CODE] $scoree = 0; $intt = …

Member Avatar for xxreenaxx1
0
87
Member Avatar for xxreenaxx1

I am working on a rule to find out which question has the highest correct answer. Not sure how to work with this. But here is an explanation of what I have so far and what I want my program to do. I have question and answer table Question: questionid,QuestionName, …

Member Avatar for Akash Saikia
0
77
Member Avatar for xxreenaxx1

I am trying to read from a file and insert this to a database. But the error message is giving me trouble [QUOTE] Notice: Undefined offset: 1 in C:\xampp\htdocs\test\try2.php on line 15. This is the error message. On line 15 is: $userName = $tmp[1];[/QUOTE] my code is [CODE] <?php mysql_connect("localhost", …

Member Avatar for xxreenaxx1
0
107
Member Avatar for xxreenaxx1

I want to put this in a table so I can repeat this twice in two cell. [CODE] $intNumber = 1; $sql=correctanswer($_SESSION['username1'], $_SESSION['smodule']); echo "<strong>the ones are ticked is right answer </strong></td><br />\n"; while($info = mysql_fetch_array( $sql)) { echo " <strong>$intNumber, {$info['Que_Question']} </strong><br />\n"; for($i = 1; $i <= 4; …

Member Avatar for jkon
0
59
Member Avatar for xxreenaxx1

I am doing an equation and the outcome is 45.454545454545454545. I would like to get rid of the 45454545 after the decimal point. and have 45% [CODE] $final=5/11*100; [/CODE]

Member Avatar for BrianDickson
0
103
Member Avatar for xxreenaxx1

I am able to upload a file and echo these. But now I would like to upload these to my database. How would I go onto doing this. I found something like this for C++. but not sure how to convert this to PHP. this is what I found [CODE] …

Member Avatar for xxreenaxx1
0
181
Member Avatar for xxreenaxx1

I am compairing two tables and on mysql it shows the once that are not matched as NULL. How would I go onto printing this on a php. so the once that are matched should just print the value. and the once that are not matched should print the original …

Member Avatar for Insensus
0
125
Member Avatar for xxreenaxx1

I can read from files that are uploaded but now I would like to INSERT the data entered on the file to be inserted to mysql database. But not sure how this work. Tried to search few term and I have tested few methods. Nothing works. [CODE]<?php if ($_FILES["file"]["error"] > …

0
62
Member Avatar for xxreenaxx1

[CODE] SELECT * FROM user u, subject s, test t, question q, answer a WHERE u.Use_ID =1 AND t.Sub_ID =1 AND s.Sub_ID = t.Sub_ID AND a.Que_ID = q.Que_ID [/CODE] I would like to check if the a.Que_ID =q.Que_ID does not exist then it should do the rest of the query. …

0
56
Member Avatar for xxreenaxx1

I have two table of same data. First table is written by the admin and the second data is written by the user. Now I want to compare these two and see if they match, if not then the correct data is displayed. So far I am retrieving the user's …

Member Avatar for xxreenaxx1
0
109
Member Avatar for xxreenaxx1

I have two delete function and would like to make this as one. So I can use this on my webpage. But not sure how? Anyone willing to help me :D [CODE=php] DELETE FROM test WHERE Tes_ID=$Tes_ID; DELETE FROM question WHERE Tes_ID=$Tes_ID [/CODE]

Member Avatar for xxreenaxx1
0
79
Member Avatar for xxreenaxx1

I am stuck on inserting the data into mysql via php. Its a foreach method and I am just stuck [CODE=php]include '../Database/take_an_exam.php'; $intNum = 1; $intnumber = 1; while( $info = mysql_fetch_array( $sqll )){ echo "<input type='hidden' name=\"Que_ID\" value=\"{$info['Que_ID']}\" /> "; echo " $intNum, {$info['Que_Question']} <br />\n"; $intNum++; for ($i …

Member Avatar for petr.pavel
0
3K
Member Avatar for xxreenaxx1

I am stuck on inserting the data into mysql via php. Its a foreach method and I am just stuck [CODE=php]include '../Database/take_an_exam.php'; $intNum = 1; $intnumber = 1; while( $info = mysql_fetch_array( $sqll )){ echo "<input type='hidden' name=\"Que_ID\" value=\"{$info['Que_ID']}\" /> "; echo " $intNum, {$info['Que_Question']} <br />\n"; $intNum++; for ($i …

Member Avatar for petr.pavel
0
139
Member Avatar for xxreenaxx1

Hello I am using for loop on a form and posting these to the next page and I can echo the array and print 1 if there is value. If there isnt any value nothing print but I want 0 to be printed. I have tired few ways and so …

Member Avatar for xxreenaxx1
0
233
Member Avatar for xxreenaxx1

Hey I can print choice in loop but how do I print Question ID for the choices. For example: Question ID= 2 choice 1= whatever choice 2= whatever choice 3= whatever choice 4= whatever Question ID= 3 choice 1= whatever choice 2= whatever choice 3= whatever choice 4= whatever for …

Member Avatar for diafol
0
77
Member Avatar for xxreenaxx1

I have created a checkbox using while loop and posting this to another page but I am not sure on how to add these ticked check box as 1 and non ticked one as 0 to the database. Can someone help me? <form action="Test_Completed.php" method="post"> include '../Database/take_an_exam.php'; $intNumber = 1; …

Member Avatar for qazplm114477
0
406