
lastkarrde
Members-
Posts
165 -
Joined
-
Last visited
Never
Everything posted by lastkarrde
-
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
-
You could, or chmod that file so the user running apache (or your webserver) can read it.
-
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.
-
Probably not. Domain name companies (particularly Godaddy) are notorious for trying to keep your business with them.
-
Showing 404 Page based on URL Structure
lastkarrde replied to natasha_thomas's topic in Miscellaneous
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. -
Sure . Happy to help.
-
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'"
-
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.
-
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']);
-
You need to have a button to submit your form. An anchor will not do it. <input type="submit" name="submit" value="Test">
-
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 .
-
Check which button was clicked in HTML form using PHP....help.
lastkarrde replied to Bl4ckMaj1k's topic in Javascript Help
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" ); }); }); -
Check which button was clicked in HTML form using PHP....help.
lastkarrde replied to Bl4ckMaj1k's topic in Javascript Help
<!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> -
I only ever use Twig nowadays. Its a full featured templating language with a very basic syntax that only takes 5 minutes to learn. It has template inheritance which makes things like what your trying to do a breeze. For example you would just define a basic template with many blocks like : base.html <html> <head> <title>{% block title %}{% endblock %}</title> </head> <!-- define menu/sitewide features here --> {% block content %}{% endblock %} <!-- define footer/sidewide features here --> </html> All you would need to do to render any page on your website is: aboutus.html {% extends 'base.html %} {% block title %}About Us{% endblock %} {% block content %} About us content blah blah {% endblock %} Twig automatically (and somewhat magically) takes your about page and replaces the appropriate blocks into the base.html template. It then compiles all of this into straight PHP and caches the PHP code. So when you enable caching (a Twig configuration setting), it will render the straight PHP code making it as fast (if not faster) than a PHP templating solution. Useful links: Twig syntax & features Twig PHP API
-
Check which button was clicked in HTML form using PHP....help.
lastkarrde replied to Bl4ckMaj1k's topic in Javascript Help
You need to set the name attribute of your inputs to all be exactly the same, deny_profile_approval. -
$_SERVER['DOCUMENT_ROOT'] ? Or define your own constant/variable/global specifying your root directory.
-
Any (good) webhost that supports PHP 5.2.4+ supports Zend Framework.
-
We will need the schema of your images table, right?
-
http://www.google.com/search?client=ubuntu&channel=fs&q=css+button+look+like+a+link&ie=utf-8&oe=utf-8
-
echo '<p onclick="popUp(\'$gmail\')">lkjlkjlkjlkjlkjlkj</p>';
-
Intermediate Coder --- Coding becoming repetitive
lastkarrde replied to mongoose00318's topic in Frameworks
Howdy I wrote an article titled Why you should be using a PHP framework. I suggest you read that to see some of the features frameworks offer and also see the names/links to some of the bigger, more popular frameworks. I'd be happy to discuss any questions you have -
Access it with the array index? var_dump() $verified and $id in the loop
-
The 'headers already sent' error message is basically telling you that your server has already started sending the HTML/css data in header.php to the client, and then your trying to send the header() redirect to the client. Why do you need to display HTML/css on a page that simply redirects? The user wouldn't see anything on that page anyway, would they?