-
Posts
4,953 -
Joined
-
Last visited
Everything posted by darkfreaks
-
don't forget to mark topic solved
-
Test security on registration/login page
darkfreaks replied to ttocskcaj's topic in Beta Test Your Stuff!
http://lmgtfy.com/?q=htmlpurifier+validation+php better safe than sorry -
that is because he is using mail instead of his own mail function. change it to sendMail()
-
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 }
-
check your SQL for syntax errors $player=mysql_query($selectplayers) or die(mysql_error()); $fixture= mysql_query($selectfixture) or die(mysql_error());
-
CMS backend: test for vulnerabilities and security problems
darkfreaks replied to happypete's topic in Beta Test Your Stuff!
http://lmgtfy.com/?q=htmlpurifier+validation+php might want to check into it -
http://lmgtfy.com/?q=filter_var+email+validation you should listen to advice given to you.
-
Login Script failing with Internal Server Error 500.
darkfreaks replied to White_Lily's topic in PHP Coding Help
your quite welcome don't forget to mark as solved -
Login Script failing with Internal Server Error 500.
darkfreaks replied to White_Lily's topic in PHP Coding Help
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."; } ?> -
Passing Variables into Modal Dialogue/Window.
darkfreaks replied to tebrown's topic in Javascript Help
not entirely sure but it might have to do with using $_SESSION over $_GET -
Passing Variables into Modal Dialogue/Window.
darkfreaks replied to tebrown's topic in Javascript Help
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 } -
Passing Variables into Modal Dialogue/Window.
darkfreaks replied to tebrown's topic in Javascript Help
Stack Overflow passing ID via URL [basic modal] -
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.
-
Passing Variables into Modal Dialogue/Window.
darkfreaks replied to tebrown's topic in Javascript Help
e.PreventDefault makes it so where it doesn't pop up another window after the original click. -
Passing Variables into Modal Dialogue/Window.
darkfreaks replied to tebrown's topic in Javascript Help
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(); }); }); -
Passing Variables into Modal Dialogue/Window.
darkfreaks replied to tebrown's topic in Javascript Help
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(); }); } ); -
Passing Variables into Modal Dialogue/Window.
darkfreaks replied to tebrown's topic in Javascript Help
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. -
Passing Variables into Modal Dialogue/Window.
darkfreaks replied to tebrown's topic in Javascript Help
sounds like you have duplicate values in the database you could do something like SELECT DISTINCT * FROM no idea if it actually works. -
Passing Variables into Modal Dialogue/Window.
darkfreaks replied to tebrown's topic in Javascript Help
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 -
Passing Variables into Modal Dialogue/Window.
darkfreaks replied to tebrown's topic in Javascript Help
im confused if you are using $_GET['id'] where is $rows['id'] being called from -
Passing Variables into Modal Dialogue/Window.
darkfreaks replied to tebrown's topic in Javascript Help
short tags version: <a href="lineup.php?id=<?=$rows['id']?>" class='basic'> using quotes to escape php: <a href=\"lineup.php?id=".$rows['id']."\"> -
that is because it needs the database connection as the second parameter or a require somewhere above where your calling mysql_real_escape_string
-
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
-
getting 500 internal server error - not sure why
darkfreaks replied to White_Lily's topic in PHP Coding Help
as long is it is defined the code should work. -
getting 500 internal server error - not sure why
darkfreaks replied to White_Lily's topic in PHP Coding Help
i defined page because it was not defined do you have it defined somewhere else