User Profile

Collapse

Profile Sidebar

Collapse
kvazar
kvazar
Last Activity: Sep 5 '07, 06:05 PM
Joined: Jul 19 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • kvazar
    started a topic Adding Radio Buttons to my script. Need help.
    in PHP

    Adding Radio Buttons to my script. Need help.

    What I am trying to create is basically a page with a bunch of multiple choice questions. Basically just like a test page. I am providing the code lower. All the questions that need to show as a part of the test are stored in a separate database. There is also a test file "list.txt" that has names of files from the database that I want to display. That way you don't have to manually choose the questions. All you need is to generate a text...
    See more | Go to post

  • Would anyone have any idea on how I could posibly do this, or if it is possible at all.
    Thanks
    See more | Go to post

    Leave a comment:


  • Ok, here is an exsample of something like I would use for my text file.

    QUESTION
    BLAH BLAH BLAH BLAH BLAH BLAH BLAH
    FIGURE
    None
    OPTIONS
    1
    10
    100
    30
    40
    ANSWER
    D


    All of this information that you see has, and will be in the text file. Though I do not need to display all of it.
    I would need to get rid of lines QUESTION, FIGURE,...
    See more | Go to post

    Leave a comment:


  • Yes!!! That has worked perfectly.
    I am sorry for being a bit unclear with my questions. But yes! That is exsactly what I needed.

    Now, is there also a way for me to add code that will for esample omit line 3.help?

    thanks
    See more | Go to post

    Leave a comment:


  • Here is function code I wrote

    <?php
    function open_question($ category) {

    $file = fopen($category , 'r') or die("Can't open file");
    $theData = fread($file, 6800);
    fclose($file);
    echo $theData;
    }
    ?>

    <html>
    <body>
    <?php
    open_question(" ./text.txt");{
    ?>
    </body>
    </html>...
    See more | Go to post

    Leave a comment:


  • kvazar
    started a topic Code needed to make PHP read from text file Properly
    in PHP

    Code needed to make PHP read from text file Properly

    Hello,
    I am new to php, and I need some help.
    I am trying to write a script for a web site.
    Text I need to display is in a .txt file, and I can't add breaks to it.
    I wrote a function that will open my files. When text is displaid in html, it is all in one line. I can not find code to add my function to take care of the problem.
    can sombody please help?
    Thank you
    See more | Go to post
No activity results to display
Show More
Working...