Jump to content

spiderwell

Members
  • Posts

    1,008
  • Joined

  • Last visited

Posts posted by spiderwell

  1. first suggestion is try the javascript or ajax  forums.

     

    but surely its not too hard to create a small script that on click, triggers hiding the video div, showing the form div, if they are positioned absolutely they should appear exactly where you specify. add a timer into the script that starts when the trigger is clicked, to switch back on timeout.

     

    javascript isnt my friend, so I can't give any code, I'm still on my first cuppa of the day :)

  2. hehe sure, sometimes I just overlook the simplest of errors, we are all human

    $page='';
    if (isset($_GET['page'])) $page = $_GET['page'];
    
    switch ($page) {
        case "design":
             include ("includes/design.html");
    break;
        case "gallery":
             include ("includes/gallery.html");
            break;
        case "contact":
             include ("includes/contact.html");
            break;
        default:
             include ("includes/home.html");
    
    }
    
    include("includes/footer.html");
    

  3. page is undefined as its not a variable passed in the $_GET when you call the page first off.

    wrap the whole if statement in an other if statement that has isset($_GET['page'])

     

    personally I would do it this way:

    $page;

    if (isset($_GET['page']) $page = $_GET['page'];

     

    switch ($page) {

        case "design":

            include ("includes/design.html");

    break;

        case "gallery":

            include ("includes/gallery.html");

            break;

        case "contact":

            include ("includes/contact.html");

            break;

        default:

            include ("includes/home.html");

     

    }

     

     

     

  4. this should get you started:

     

    at the top of your <form>, add this line into the echo statement <input type='hidden' name='bookid' value='$bookid'>

     

    then after the if($_POST) statement add this

    $bookid = $_POST['bookid']

     

    do the same for all variables you need to pass or you will see soon as you do this, $booktitle's value  is the last one in the recordset, not the one clicked on , highlighting the same error you have with bookid currently

     

    that should be the quickest way to get the script working without a huge reworking of the code inplace. I would suggest though that you look at refining it somewhat in the long run.

  5. you are not passing a bookid in the <form> why not add a hidden input to pass the bookid, and because you dont pull that from the form, when you send the form, the value of $bookid is the one from the last row of record set, not from the form.

    I hope that makes sense.

    I would suggest either putting the form processing before the recordset loop or just not bother with the variables in the recordset, there is no need to do this

    $bookauthor=$row['author']

    <td>Author: <strong>$bookauthor</strong></td>

    when you can just have

    <td>Author: <strong>$row['author']</strong></td>

     

    or even better post the form to a seperate page, then once processed, redirect back to book listing page.

×
×
  • 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.