-
Posts
2,527 -
Joined
-
Last visited
Everything posted by DeanWhitehouse
-
HELP !!!! include (' $_GET['file'] ')
DeanWhitehouse replied to Sangha-08's topic in PHP Coding Help
then include won't work, as it will basically put the code into the page and load it. -
HELP !!!! include (' $_GET['file'] ')
DeanWhitehouse replied to Sangha-08's topic in PHP Coding Help
then why not get the code from the pages from him and just make them on your website? -
[SOLVED] Work out age from date of birth.
DeanWhitehouse replied to DeanWhitehouse's topic in PHP Coding Help
@rajivgonsalves I used your code $day = trim(htmlentities($_POST['age'])); $month =trim(htmlentities($_POST['age1'])); $year =trim(htmlentities($_POST['age2'])); $dob = $day.$month.$year; //Work out birthday $strDate = $dob; echo floor((time()-strtotime(substr($strDate,4,4)."-".substr($strDate,2,2)."-".substr($strDate,0,2)))/(86400*365)); //end bday but this works for my birthday and probably more, but when i submitted a form with the birthday being 01011920 it got the age 38. any ideas? -
HELP !!!! include (' $_GET['file'] ')
DeanWhitehouse replied to Sangha-08's topic in PHP Coding Help
I dunno if people are going to help you do that. -
HELP !!!! include (' $_GET['file'] ')
DeanWhitehouse replied to Sangha-08's topic in PHP Coding Help
you would do include ($_GET['file']); -
first of all please use code tags for code. second is there a session called FirstName and your query is wrong $sql = "SELECT FirstName,data FROM Members WHERE firstname = '{$_SESSION['FirstName']}'"; mysql_query($sql) or die("Error".mysql_error); if your table is called Username , why are you calling data from a table called members? and why are you selecting there details from where there id matches there username and you are not running the query either
-
[SOLVED] php not executing code: error?
DeanWhitehouse replied to snowman15's topic in PHP Coding Help
add a die statement to the query to see if it is successfull -
you would only get that error if there is any output before the header being sent, e.g. echo's
-
i advise learning from, w3schools and tizag, save the money as the books may be out of date, compared to the stuff on the net.
-
[SOLVED] Rewrite URL's for External Sites
DeanWhitehouse replied to ciber's topic in PHP Coding Help
will the url in the link be userinputted? -
Radio Buttons Created With PHP, Change Another Field
DeanWhitehouse replied to NFD's topic in PHP Coding Help
you may need to ask in the js section, as i have problems with js in ie aswell. -
try google. And maybe look at how to open ports using php.
-
Radio Buttons Created With PHP, Change Another Field
DeanWhitehouse replied to NFD's topic in PHP Coding Help
erm not sure, try looking on w3schools under the js sections and the dom section -
[SOLVED] Work out age from date of birth.
DeanWhitehouse replied to DeanWhitehouse's topic in PHP Coding Help
erm, yer how many years, but i also need to work out that they are say. e.g. bday = 28/08/91 then they will be 16 now not 17 but after then they will be 17 . If that makes sense. -
a way to make it harder may be to encrypt your code, and maybe add something to the front of each file. e.g. randomword240.flv then use php to remove this word?? just throwin some random ideas out.
-
Radio Buttons Created With PHP, Change Another Field
DeanWhitehouse replied to NFD's topic in PHP Coding Help
from what i know it is something like you do formname.fieldname.value="" set this in a var then do innerhtml e.g. var $value; $value = formname.fieldname.value="empty"; document.getElementById().innerHTML = $value; -
change the spaces to %20
-
why not just set no caching in a meta tag?
-
[SOLVED] Drop down submit - get/post
DeanWhitehouse replied to andrewgarn's topic in PHP Coding Help
exit(); ?? put that at the end of the get code -
[SOLVED] Drop down submit - get/post
DeanWhitehouse replied to andrewgarn's topic in PHP Coding Help
change that to if(isset($_GET["view"])) { if($_GET["view"]=="op1") { is this what u want? -
hidden field i think is the best way.
-
I dunno where to start with this, i need to work out the age of a person from there date of birth. the date is wrote like. daymonthyear 28081991 any ideas?
-
tried this code , works ok in firefox, but not at all in IE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <link rel="alternate stylesheet" media="screen" href="classic.css"> <link rel="alternate stylesheet" media="screen" href="original.css"> <link rel="alternate stylesheet" media="screen" href="dark.css"> <link rel="alternate stylesheet" media="screen" href="light.css"> <link rel="alternate stylesheet" media="screen" href="modern.css"> <script type="text/javascript"> function preview() { var mySwitch = document.forms["reg"].elements["theme"]; mySwitch.onchange = function() { var styles = document.getElementById("styles"); styles.href = mySwitch.value; } } </script> <link rel="stylesheet" id="styles" media="screen" href="original.css"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Pragma" content="no-cache"> <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> <meta http-equiv="expires" content="0"> <title>Mail App - Registration</title> </head> <body> <div id="main"> <h1 align="center">Registration</h1> <p id="title">Register Here With Your Email address, then you can send emails to multiple addresses from this site.</p> <form id="reg" name="reg" action="<?php $_SERVER['PHP_SELF']; ?>" method="post"> Name:<input id="name" type="text" name="name" size="40"><br> Username:<input id="uname" type="text" name="username" size="40"><br> Password: <input id="pword" type="password" name="password" size="40"><br> Confirm<br> Password: <input id="cpword" type="password" name="confirmp" size="40"><br> Email: <input id="email" type="text" name="email" size="40"><br> Confirm Email: <input id="cemail" type="text" name="confirme" size="40"><br> Theme: <select id="theme" name="theme" onChange="preview()"> <option value="original.css">Original</option> <option value="classic.css">Classic</option> <option value="dark.css">Dark</option> <option value="light.css">Light</option> <option value="modern.css">Modern</option> </select><br> <p id="tc">To register you need to agree to our <a href="javascript:void(0)" onClick="tc()">terms and conditions</a>:<input id="tc" type="checkbox" name="agree" size="40"></p><br> <input id="sub" type="submit" value="Submit" name="reg"> </form> </div> </body> </html>
-
Radio Buttons Created With PHP, Change Another Field
DeanWhitehouse replied to NFD's topic in PHP Coding Help
only browsed through the post, but can't you just use innerHTML? this will do it