Jump to content

jackpf

Members
  • Posts

    1,410
  • Joined

  • Last visited

    Never

Posts posted by jackpf

  1. Not entirely sure what you mean but somethin like this

    for($i = 0; $i < howmnylinesyouwnt; $i++)
    {
    echo '<tr><td>table row</td></tr>';
    if($i % 3 == 0)
    {
    echo '<br />';
    }
    }

    Althouh why you want a line break outside a table cell doesn't mke sense to me. And I doubt it's valid html.

  2. Ok from what you said i think you meant something like the following

     

     

    Webpage with links and images in > Click a image within that page and it will open in a new page > the new page with the image now loaded in it is a premade page, but doesnt have a fixed image you can load any image within that page ? doesnt make much sense but i assume thats what you meant ???

     

    If that is indeed the case then you'll want to make use of $_GET.

  3. Surely you don't need the while() loop.

     

    $SQL_selectOptions = "SELECT optionID, optionName, optionPrice FROM options";
    $rs_selectOptions = mysql_query($SQL_selectOptions, $admin);
    
    $row_selectOptions = mysql_fetch_assoc($rs_selectOptions)

    Then $row_selectOptions will have all of the results in an array. Doesn't your while loop just kind of...put it into another array? Thus isn't needed.

     

    Forgive me if I am wrong :)

     

    Oh, and also, in your original code, $Name is not $name. You need to be careful with cases.

  4. Why don't you just have two tables, one for sent messages, one for received?

     

    Or, you could have a `Type` field, which will be either "inbox" or "outbox" or whatever.

     

    I think it would get a bit complicated attempting it the way you suggested.

  5. Sessions are stored on the server. A cookies stores a unique ID pointing to a session.

     

    The session expires whenever you set it to, in php.ini or at runtime. The cookie, however, generally is deleted when the browser is closed, although you can change that too.

  6. Is this short term or long term?

     

    If it's the former, you could just save the ID's in a session.

     

    If the latter, you'd have to have a table for storing usernames and topic ID's. Then query the database to see if the username and ID exist, if so, the user has read the topic.

     

    That's hwo I'd do it anyway.

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