Jump to content


  • Posts

  • Joined

  • Last visited


Everything posted by jackpf

  1. Use absolute referencing like you said, using $_SERVER['DOCUMENT_ROOT']. What is your code and file structure?
  2. 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.
  3. div .mainnav a { color: orange; }
  4. That single quote is supposed to have a backslash btw. Stupid code highlighter must have stripped it.
  5. UPDATE TABLE SET field=REPLACE(field, '&rd', '\'')
  6. Probably missed a semi colon in the line above.
  7. If that is indeed the case then you'll want to make use of $_GET.
  8. <?php $i = 10000000; $i = (string)$i; if(strlen($i) >= 6 && strlen($i) <= { echo substr($i, 0, strlen($i) - 6).'million'; } ?> You mean like that?
  9. Try putting or die(mysql_error()) after the query.
  10. Doesn't this happen by default? I'd have thought that you actually have to do something to prevent this. Enabling it requires nothing. Just check user info against the database. If it's correct, log them it. That has nothing restricting them from logging in on multiple PCs.
  11. 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.
  12. 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.
  13. 3 Minutes?!?! So if someone logs in and goes for a crap, they come back and have to log in again?
  14. 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.
  15. 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.
  16. What did that output then?
  17. Try this echo $pass.' - '.$check; And see what's output.
  18. Care to enlighten us?
  19. if(isset($_POST['button']) && $_POST['form'] != null){ echo 'choose something'; } else{ echo 'great choice!'; } However, that is dependant on whether "button" and "form" are real fields in the form.
  20. Yeah, so what's wrong with that?
  • 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.