Jump to content

gigas10

Members
  • Posts

    64
  • Joined

  • Last visited

    Never

Everything posted by gigas10

  1. header("location: nameoffile.php"); should suit your needs.
  2. faster? it doesnt matter until you have over 100 million rows
  3. where exactly are you posting score? $score = $_POST["score"]; this line makes no sense.
  4. $qry = mysql_query("SELECT * FROM table01"); $row = mysql_num_rows($qry); gives you the number of rows in a table.
  5. what exactly are you trying to do?
  6. It would be up to the user to make sure the email is not marked as spam.
  7. Well don't do that, just notify the user that the login name is already in use. On your registration page, use this code <?php if( isset($_SESSION['ERRMSG_ARR']) && is_array($_SESSION['ERRMSG_ARR']) && count($_SESSION['ERRMSG_ARR']) >0 ) { echo '<ul class="err"><strong><font size=5>'; foreach($_SESSION['ERRMSG_ARR'] as $msg) { echo '<li>',$msg,'</li>'; } echo '</ul></strong</font>'; unset($_SESSION['ERRMSG_ARR']); } ?> then make a register-exec.php and use this $qry = "SELECT count(*) AS c FROM members WHERE login='$login'"; $result = mysql_query($qry); if($result) { $result_array = mysql_fetch_assoc($result); if($result_array['c'] > 0) { $errmsg_arr[] = 'Login ID already in use'; $errflag = true; } @mysql_free_result($result); } else { die("Query failed"); } And obviously modify the select queries as needed. This last piece of code checks to make sure that none of the required fields are missing, add more if u need. if($login == '') { $errmsg_arr[] = 'Login ID missing'; $errflag = true; } if($password == '') { $errmsg_arr[] = 'Password missing'; $errflag = true; }
  8. leave a browser up on that site logged in, and dont log out :-p
  9. Use ajax/xml to grab the browser, then from there use another css file that works for ie by created a simple js script. if(browser.isIE) { iecss.css; } if(browser.isFF) { ffcss.css; } so on, look up some ajax tutorials
  10. You said you made a full css template? Then why did you save it as a php file. Resave the file as a .css extension and use this code anywhere before the head tag ends. <link href="template.css" rel="stylesheet" type="text/css" />
  11. The limitations of php are pretty much endless. You just gotta be elite
  12. Turning the dates into seconds usually works pretty good 60*60*24*365. Although this isnt completely accurate because of leap years
  13. The problem is the line echo "<a href='index.php?id=", $id, "'>", $firstname, "</a>"; The formatting is wrong and the quotes are causing the echo statement to end early. Format it like I said and it will work.
  14. <?php echo "<h1> Hello $name </h1>"; if ($action == "b1") echo "you just clicked button 1"; if ($action == "b2") echo "you just clicked button 2"; ?> Thats because $action is not defined in this php file. Define action before the if statements and it will work
  15. You do not want to echo html because it does not format properly which can make it hard for people reading the html. Also, usually a blank page means syntax error, most likely a missed ; or }
  16. ?> <a href="index.php?id=<?php echo $id; ?>"><?php echo $firstname; ?></a> <?php echoing html is a bad habit
  17. I would guess sha1, since it was designed by the NSA. But who knows since it's easily crackable, however I do know that its impossible to figure out what the password was from a php made md5 hash.
  18. Once again, trust no one but yourself, and becareful about trusting yourself. DO NOT allow users to directly access a database table, this could result in some bad bad stuff. Just make a php page that does all the query's for them and either retrieves / inserts data into the table and display it nicely.
  19. Theres a php mail() function. http://www.php.net/manual/en/function.mail.php
  20. Just set up columns for each checkbox, like alcohol, food, w/e. And store them as 1's and 0's, 0 for no 1 for yes. Will be faster.
×
×
  • 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.