Jump to content

fugix

Members
  • Posts

    1,483
  • Joined

  • Last visited

Everything posted by fugix

  1. Its fairly simple to do. However you must first know the language that it uses.
  2. if you are not familiar with either, you can visit http://jquery.com/ and https://developer.mozilla.org/en/AJAX
  3. fugix

    Hi all

    welcome to the forums yazzou, im sure that we can teach you whatever it is that you want to learn about php
  4. im assuming you're on a linux server or this wouldn't be an issue since windows servers do not have an issue with this, unfortuantely, if your url has a upper case letter, there is not way to make it work, i would advise always making your filenames lower case to avoid this issue. However if your urls are all lower case and you want to avoid this issue for other users that type in your url and may mistakingly type an uppercase letter, you can use mod_rewrite to convert user requests to all lowercase. RewriteEngine on RewriteBase / RewriteMap insensitive tolower: RewriteRule ^[\/]*(.*)$ /${insensitive:$1} [R,L]
  5. you could use an if statement to check for the value of you session if($_SESSION['numberOfAttempts'] == 4) { //update query }
  6. no problem, glad i could help
  7. to detect which mouse button was clicked, thus giving you the abilty to act accordingly, take a look at the event.button attribute
  8. Cool.. even easier. Thanks for the help. Much appreciated! Works great. no problem at all, glad it worked for you
  9. $query = mysql_query("SELECT * FROM highscore WHERE player = '$CurrentPlayer'") or die(mysql_error()); while($row = mysql_fetch_assoc($query)) { $score = $row['score']; // do whatever you'd like from here } hope this helps
  10. i misread your post, so if you wanted to use my code i will revise to be exactly what you want, the second third and fourth characters after the .com, im assuming that you do not want the forward slash preg_match('/\.com\/(.{3})/', $string, $matches); echo $matches[1];
  11. you could use regular expressions to achieve this preg_match('/\.com(.{3})/', $string, $matches); echo $matches[1]; Edit: forgot to mention, your $string variable would be the URL
  12. change $email = $mailquery['email']; to $email = $mailrow['email']; simple variable misplacement
  13. are you on a valid SMTP server?
  14. any parse errors? also, you have your $from variable commented out
  15. my mistake, had the parameters backwards. Glad you corrected my error
  16. this is really up to you, however, if you are storing the date that a user becomes locked from their account, i would not continually update the date if they try to gain access again. I would simply make the user aware of the time that they can gain access into their account again. I also would not keep track of the amount of times that the user has gone over 4 times. You want to make your site as user friendly as possibly.
  17. you need to set a target attribute with a custom name, like so <script language="JavaScript1.1"> <!-- function openWin(url) { self.name = "Popper"; remote = open(url, "mywindow", "resizable,scrollbars,width=600,height=500,left=10 ,top=10"); //added second param } //--> </script> <body onload="openWin('http://www.youtube.com/<?php echo $id; ?>');">
  18. first thing you should do is troubleshoot your query to pinpoint the issue, $result1=mysql_query($sql1) or die(mysql_error());
  19. <?php $garbage = 'just some bs <ul><li>text</li><li>text</li><li>text</li></ul>just some more bs'; $test = preg_match_all('/\"(.*?)\"/', $sadrzaj, $matches); echo $matches[0][0]; $slika = str_replace($matches[0][0], '"', ''); //need to add distinct positioning echo $slika; echo "<img src='$slika' alt='' height='100' width='100'/>"; ?>
  20. almost. else { $_SESSION['numberOfAttempts'] = $_SESSION['numberOfAttempts']+1; $numberOfAttempts = $_SESSION['numberOfAttempts']; //you already added one here if ($numberOfAttempts < 5) { $chancesLeft = 5 - $numberOfAttempts; $output = array('errorsExist' => true, 'message' => 'Invalid Username and Password combination! You have ' .$chancesLeft.' to login succesfully or the account will be locked!'); } else { $output = array('errorsExist' => true, 'message' => 'Your account is currently locked, we appologize for the inconvienence. This is a security messure implimented by to many failed login\'s!'); } }
  21. looks like there source is empty, do you have the variable set as the source
  22. checked it myself, you are missing a closing bracket at the end of your code <?php error_reporting(E_ALL ^ E_NOTICE); $email = $_GET['ipn_email']; $header = ""; $emailtext = ""; // Read the post from PayPal and add 'cmd' $req = 'cmd=_notify-validate'; if(function_exists('get_magic_quotes_gpc')) { $get_magic_quotes_exits = true; } foreach ($_POST as $key => $value) // Handle escape characters, which depends on setting of magic quotes { if($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1){ $value = urlencode(stripslashes($value)); } else { $value = urlencode($value); } $req .= "&$key=$value"; } // Post back to PayPal to validate $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30); // Process validation from PayPal // TODO: This sample does not test the HTTP response code. All // HTTP response codes must be handles or you should use an HTTP // library, such as cUrl if (!$fp) { // HTTP ERROR } else { // NO HTTP ERROR fputs ($fp, $header . $req); while (!feof($fp)) { $res = fgets ($fp, 1024); if (strcmp ($res, "VERIFIED") == 0) { // TODO: // Check the payment_status is Completed // Check that txn_id has not been previously processed // Check that receiver_email is your Primary PayPal email // Check that payment_amount/payment_currency are correct // Process payment // If 'VERIFIED', send an email of IPN variables and values to the // specified email address foreach ($_POST as $key => $value){ $emailtext .= $key . " = " .$value ."\n\n"; } mail($email, "Live-VERIFIED IPN", $emailtext . "\n\n" . $req); } else if (strcmp ($res, "INVALID") == 0) { // If 'INVALID', send an email. TODO: Log for manual investigation. foreach ($_POST as $key => $value){ $emailtext .= $key . " = " .$value ."\n\n"; } mail($email, "Live-INVALID IPN", $emailtext . "\n\n" . $req); } } } fclose ($fp); ?>
  23. and what exactly is the syntax error you receive
  24. because after your script is finished executing, your $_SESSION['numberofattempts'] value remains the same value, which I am assuming is 0, because you have not changed the value of the session, you simply stored it into a variable and added 1 it externally. insed of you else statement you will need to redefine the value of you session, e.g $_SESSION['numberOfAttempts'] = $_SESSION['numberOfAttempts']+1
×
×
  • 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.