Jump to content

lastkarrde

Members
  • Posts

    165
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.query7.com

Profile Information

  • Gender
    Not Telling

lastkarrde's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. For small hacks/fixes/features jQuery is great. For a large Javascript application you will be better off in the long run using something like YUI, Dojo or ExtJS. See http://blog.rebeccamurphey.com/on-jquery-large-applications
  2. You could, or chmod that file so the user running apache (or your webserver) can read it.
  3. Radio buttons are for only one choice out of many options. Check/tick boxes are for many choices out of many options. What your asking doesn't make sense from a UI/usability perspective.
  4. Probably not. Domain name companies (particularly Godaddy) are notorious for trying to keep your business with them.
  5. I'm pretty sure you can remove your pages through Google's webmaster tools (more http://www.google.com/support/webmasters/bin/answer.py?answer=164734). If the pages do not exist Google should automatically remove them within a couple of months.
  6. Add the following line before your SQL statement $user = mysql_real_escape_string($_GET['user']); And then alter your SQL statement to read: "SELECT * FROM playerinfo WHERE user = '$user'"
  7. No. Keep things the way you are doing them. The benefit gained from code maintainability/readability is far greater than that of a minuscule performance hit. If you do start serving millions of requests, a bytecode cache such as APC will improve performance.
  8. Use url_encode and url_decode to pass information (such as strings with spaces and symbols) in the query string. So you would have: '&playerName=" . url_encode($player['name']) . "' and then on your points.php page, access the player name with $name = url_decode($_GET['playerName']);
  9. That doesn't guarantee the forms aren't empty. For example if the user had javascript disabled or the form was submitted by a bot, client validation does not work.
  10. You need to have a button to submit your form. An anchor will not do it. <input type="submit" name="submit" value="Test">
  11. You can check if fields are empty easily: //after the mysql_real_escape_string lines if($Name == '' || $Phone == '' || $Email == '' || $Postcode == '' || $Website == '') { //left a field blank }
  12. PHPTAL, Smarty and PHPTI are all worth a look at. Although I do recommend Twig for performance, stability (its fully tested) and ease of use .
  13. Sure. Because there is no "real" form submitting going on here the input elements could just as well be buttons or anchors. You can remove all the form markup. The jQuery (Javascript) listens to all click events on all elements that have the class approval (in this case its those input elements). When one is clicked, we extract the value attribute (Deny Contact Info[1,2,3,4]) and then call the window.open function with that value passed in the URL. $(document).ready(function(){ $(".approval").click(function(){ v = $(this).attr("value"); url = 'deny_approval.php?section=' + v; window.open(url, "myWindow", "status = 1, toolbar = no, scrollbars = yes, location = no, resizable = no, height = 600, width = 600, resizable = 0" ); }); });
  14. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script src="js/jquery-1.5.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){ $(".approval").click(function(){ v = $(this).attr("value"); url = 'deny_approval.php?section=' + v; window.open(url, "myWindow", "status = 1, toolbar = no, scrollbars = yes, location = no, resizable = no, height = 600, width = 600, resizable = 0" ); }); }); </script> </head> <body> <form action="" method="post" enctype="multipart/form-data"> <input class="approval" type="button" value="Deny Contact Info1" /><br /><br /> <input class="approval" type="button" value="Deny Contact Info2" /><br /><br /> <input class="approval" type="button" value="Deny Contact Info3" /><br /><br /> <input class="approval" type="button" value="Deny Contact Info4" /><br /><br /> </form>
×
×
  • 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.