Current location: Hot Scripts Forums » General Community » Script Requests » Simple PHP script - any takers?


Simple PHP script - any takers?

Reply
  #1 (permalink)  
Old 01-27-04, 03:36 PM
zep zep is offline
New Member
 
Join Date: Jan 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Talking Simple PHP script - any takers?

3 things on the page: a question, an input field, and a submit button.

The right answer redirects the user to the next question.

Wrong answer simply redisplays the unanswered question.

All the questions could be in the same file, except users shouldn't be allowed to peek ahead at the other questions (for example, by placing ?2 or ?3 after the url). Multiple php files can be used as well. Whatever works.

Thanks for any help! Even a push in the right direction!
Reply With Quote
  #2 (permalink)  
Old 01-28-04, 12:19 AM
zep zep is offline
New Member
 
Join Date: Jan 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Well, I went ahead with some code by Voxorb for the latest challenge. Here's the link if anyone wants to give it a try:

http://zezepa.org/challenge3/other/go.php

I just told the players to post the answers in their private forums since I couldn't verify that they were actually answering them correctly. You can see how easy it is to peek ahead. I would still like to come up with a good script for this, though. Even just a hint about what functions to use, I'm willing to work to learn.
Reply With Quote
  #3 (permalink)  
Old 01-28-04, 08:12 PM
indiana james indiana james is offline
Newbie Coder
 
Join Date: Jan 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

I'll try to help, but I am rather new at php.

Maybe sessions will work with php.

I think something like this might work:

session_start();
if (answered the 1st question correctly)
{
$first = 1;
}
else
{
$first = 0;
}
session_register('first');

Then if $first=1 you can allow the users to answer question2,
if $first=0 then ...
and so on ...

I don't understand exactly what you want, so maybe I am doing it all wrong, sorry..........


I hope this helps,
James
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for a simple PHP login/register script Wheeler Script Requests 2 07-27-05 12:30 PM
Is there any integrity of script rankings? webmaster@atmanager.com Hot Scripts Forum Questions, Suggestions and Feedback 17 08-06-04 12:12 AM
100 Web Templates & 10 PHP Scripts for sale! HostersUK.co.uk General Advertisements 0 01-10-04 12:31 AM
Affiliate script (PHP) whtiebear Job Offers & Assistance 2 12-21-03 12:12 AM
Need a simple php script jarod Script Requests 1 11-05-03 08:38 AM


All times are GMT -5. The time now is 09:34 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.