Jump to content

TheEddy

Members
  • Posts

    32
  • Joined

  • Last visited

    Never

Everything posted by TheEddy

  1. And how does one exactly use a framework? If I am going to make an application for others to use as well, is it a good idea to develop it in a framework?
  2. Recaptcha has been cracked and bots can now get past it.
  3. I am leaning towards Zend but is it worth my time? Don't I also have to pay yearly to be able to use their framework on websites?
  4. I am a noob, what exactly are frameworks?
  5. It was better for me to use this: function curPageURL() { $pageURL = 'http'; if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";} $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } return $pageURL; } $r=curPageURL(); $_SESSION['REFERER']=$r; Because I also needed to record the direct input from the browser. Thanks for your help though!
  6. How does one use the HTTP_REFERER method?
  7. I want people to login and then be redirected back to the page from where they came from. I was thinking that maybe I would have to use $_GET for 3 pages but I don't know if there is any easier way.
  8. Nothing will appear unless I search for email and only one result when there should be two. If I search for email, I don't get the message that there is nothing there but no results are shown.
  9. if (mysql_num_rows($result) != 0) { print (" <ul> "); while ($row = mysql_fetch_assoc($result)){ print (" <li><a href=\"memberprofiles.php?uid=$uid\" title\"$userName\">$userName</a></li> "); exit; } print (" </ul> "); } else { print (" There were no results based on your criteria. "); } I don't know how I made that mistake where I had that equal to 1. But I don't know how to loop the results
  10. This is what I have for results: $sql = "SELECT * FROM `users` WHERE `$searchField` LIKE '%$search%'"; $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_array($result); $userName = $row['userName']; $uid = $row['userID']; if (mysql_num_rows($result) == 1) { print (" <ul> "); while ($row = mysql_num_rows($result)){ print (" <li><a href=\"memberprofiles.php?uid=$uid\" title\"$userName\">$userName</a></li> "); exit; } print (" </ul> "); } else { print (" There were no results based on your criteria. "); }
  11. $searchField would have been "emailAddress" and $search should have been "webmaster" and should have pulled: webmaster@test.com and webmaster@testing.com
  12. $sql = "SELECT * FROM `users` WHERE `$searchField` like '%$search%'"; I still have to put in the EXACT value, it can't be similar.
  13. I want to submit a form using ajax so that the page doesn't have to reload. How do I do this?
  14. $sql = "SELECT * FROM `users` WHERE `emailAddress` = '".mysql_real_escape_string($_POST['email'])."' AND `password` = '".mysql_real_escape_string(md5($_POST['password']))."'"; I currently have it accepting just the email address but I want it to be the email address OR the username. How do I do this?
  15. What doesn't work? If you echo $pageTitle in header.php it will work, unless header.php has already been included/required. I am an idiot, I see the problem now haha. I had: <title>$pageTitle</title> in header.php and it displayed $pageTitle as the title.
  16. <script type="text/javascript"> var $J = jQuery.noConflict(); jQuery(document).ready(function($){ $J("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true); }); // Use Prototype with $(...), etc. $('div').hide(); </script> Like that?
  17. <?php $pageTitle='Edit Profile'; require_once ("header.php"); ?> How can I pass a variable like that through header.php? I know it doesn't work the way I have it.
  18. would it work if he had <?php include ("www.website.com/cookie.php"); ?> ???
  19. <?php require_once ("dbconn.php"); ?> <?php $userID = $_SESSION['userID']; $insert_query = 'UPDATE users SET aim="' . $_POST['aim'] . '", msn="' . $_POST['msn'] . '", yim="' . $_POST['yim'] . '", psnID="' . $_POST['psnID'] . '", xblGamertag="' . $_POST['xblGamertag'] . '", otherContact="' . $_POST['otherContact'] . '", WHERE userID = $userID;' mysql_query($insert_query); ?> It says I did something wrong but I can't find it
  20. <?php if(!isset($_SESSION)) { session_start(); } // UNCOMMENT NEXT LINE TO PRINT THE $_SESSION ARRAY TO THE SCREEN . . . // echo '<pre>'; print_r($_SESSION); echo '</PRE>'; if(empty($_SESSION['userID']) || $_SESSION['authorized'] != true ) { header("Location: login.php"); exit; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang="EN" dir="ltr" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/xml; charset=utf-8" /> <meta http-equiv="refresh" content="5;url=editprofile.php"> <title>Saving Profile</title> </head> <body> <?php require_once ("dbconn.php"); ?> <?php $userID = $_SESSION['userID']; $insert_query = 'insert into users WHERE userID='$userID'( aim, msn, yim, psnID, xblGamertag, otherContact ) values ( "' . $_POST['aim'] . '", "' . $_POST['msn'] . '", "' . $_POST['yim'] . '", "' . $_POST['psnID'] . '", "' . $_POST['xblGamertag'] . '", "' . $_POST['otherContact'] . '" )'; mysql_query($insert_query); ?> Your profile has been saved! You will now be redirected from where you came from. <br /><a href="editprofile.php" title="Click here if you don't want to wait">Click here if you don't want to wait.</a> </body> </html> It creates a new record but I want it to update an existing one. It's an editprofile script.
  21. Had to also make some changes to the other code. Now it works. Thanks for the help!
×
×
  • 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.