Jump to content

darkfreaks

Members
  • Posts

    4,953
  • Joined

  • Last visited

Everything posted by darkfreaks

  1. don't forget to mark topic solved
  2. http://lmgtfy.com/?q=htmlpurifier+validation+php better safe than sorry
  3. that is because he is using mail instead of his own mail function. change it to sendMail()
  4. FILTER_VALIDATE_EMAIL does NOT allow incomplete e-mail addresses to be validated. also it does not allow the following: chris#example.com chris@[email protected] [email protected] chris@@example.com [email protected] allowed: [email protected] [email protected] //sanitize post email then make sure it is a valid email $email = filter_var(filter_var($_POST['email'], FILTER_SANITIZE_EMAIL), FILTER_VALIDATE_EMAIL); if($email === false) { // if email invalid error }
  5. check your SQL for syntax errors $player=mysql_query($selectplayers) or die(mysql_error()); $fixture= mysql_query($selectfixture) or die(mysql_error());
  6. http://lmgtfy.com/?q=htmlpurifier+validation+php might want to check into it
  7. http://lmgtfy.com/?q=filter_var+email+validation you should listen to advice given to you.
  8. your quite welcome don't forget to mark as solved
  9. redid the code with Zero errors and 1 warning.... <?php $log_user = $_POST["username"]; $log_pass = $_POST["password"]; $log_user = isset($log_user) ? (string)$log_user : 'Please go back and fill in your username.'; $log_pass= isset($log_pass) ? (string)$log_pass : 'Please go back and fill in your password.'; $sql = "SELECT * FROM users"; $res = mysql_query($sql); if(mysql_num_rows($res) !== 0) { $row = mysql_fetch_assoc($res); $dbuser = $row["username"]; $dbpass = $row["password"]; if($log_user !== $dbuser) { echo 'Please go back and enter a valid username.'; } if($log_pass !== $dbpass) { echo 'Please go back and enter a valid password.'; } if($log_user === $dbuser && $log_pass === $dbpass) { //session_register($log_user); (deprecated in PHP 5.3 & 5.4) $_SESSION['log_user'] = $log_user; //session_register($log_pass); (deprecated in PHP 5.3 & 5.4) $_SESSION['log_pass'] = $log_pass; header("Location: index.php"); } } else { echo "There doesn't appear to be any users in the database."; } ?>
  10. not entirely sure but it might have to do with using $_SESSION over $_GET
  11. i really don't think it is the JS though. try changing the loop a few time as follows tell me what you get. while($rows=mysql_fetch_array($result,MYSQL_NUM) { //output as numerical index } while($rows=mysql_fetch_array($result,MYSQL_ASSOC) { //output as associative index } while($rows=mysql_fetch_array($result,MYSQL_BOTH) { //output both assoc and numerical index }
  12. Stack Overflow passing ID via URL [basic modal]
  13. yeah on IPB 3 it's custom coded with a Reputation Mod with +|- or like|dislike . also comes with option to limit votes within a 1 day period. i am sure i am note the only one looking forward to IPB switch and the enabling of this mod. Also i would like to request if this mod is enabled can we get rid of the auto title mod and just use the rep mod on IPB and generate different levels based on what others think of you and your work. i think it is a fair idea.
  14. e.PreventDefault makes it so where it doesn't pop up another window after the original click.
  15. actually this might fix it with basic modal $(document).ready(function () { $('#basic-modal input.basic, #basic-modal a.basic').click(function (e) { e.preventDefault(); var content = '#' + this.id + '-content'; $(content).modal(); }); });
  16. have you tried something like this.... $('a.simple_modal').click( function (e) { e.preventDefault(); $.get(this.href, function(data) { var resp = $('<div></div>').append(data); // wrap response in div for jquery handling $(resp).modal(); }); } );
  17. can you link me to a running version? i am not sure if it is a problem with the DB or the while loop or even a modal JS problem. but it sounds like it is echoing out the correct ID in the URL.
  18. sounds like you have duplicate values in the database you could do something like SELECT DISTINCT * FROM no idea if it actually works.
  19. change mysql_fetch_array to mysql_fetch_assoc then pass it like i showed you above but change $row['id'] to $id since it is already defined in the while loop
  20. im confused if you are using $_GET['id'] where is $rows['id'] being called from
  21. short tags version: <a href="lineup.php?id=<?=$rows['id']?>" class='basic'> using quotes to escape php: <a href=\"lineup.php?id=".$rows['id']."\">
  22. that is because it needs the database connection as the second parameter or a require somewhere above where your calling mysql_real_escape_string
  23. why do you need to md5 a company name? makes no sense. try taking your time looking at the below tutorial provided perhaps you can figure out what you are doing wrong. creating a reset password script
  24. as long is it is defined the code should work.
  25. i defined page because it was not defined do you have it defined somewhere else
×
×
  • 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.