
alvin567
Members-
Posts
161 -
Joined
-
Last visited
Everything posted by alvin567
-
my point is I want to output the ages.
-
I have three fields in the database for a date of birth, day | month | year Output the date type If possible I want to do the manipulation in the database and output the age.
-
<html> <head> <!-- ajax functions from w3schools--> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script type="javascript/text"> function showSummary(str) { alert("I am an alert box!"); if (str=="")//Since select a country is "" { document.getElementById("summary").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("summary").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","getplace.php?q="+str,true); xmlhttp.send(); } </script> </head> <body> <form> <select name="country" onchange="showSummary(this.value);"> <option value="">Select:</option> <option value="SG">Name</option> </select> </form> <div id="summary"><b>Database Info</b></div> </body> <html> ----------------------------------------- Try pasting on your browser it doesn't reach the alert("I am an alert box");
-
so u mean the user_forbidden_handle() i am suppose to write it myself?
-
if (!user_has_access(__FILE__)) { user_forbidden_handle(); // what does user_forbidden_handle(); means? }
-
ok,you mean use database to set the rights?
-
example directory- files1 files2 directory2- files1 files2 I am using mysql for my membership database,and php and html for my coding that is all
-
http://forums.phpfreaks.com/index.php?topic=362350.new;topicseen#new Hi there,I am trying to write codes for my login functions, grant access rights to different php pages? any algorithms? database settings? setting of flag in the database?
-
<!-- login functions --> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <?php include 'mysql_config.php'; include 'mysql_opendb.php'; ?> <html> <body> <form id="login" action="login.php" method="post"> Email: <input type="text" name="email"/> </br> Password:<input type="password" name="password" maxlength="12"/> </br> <input type="submit" value="submit"> </form> </body> <html> <!--login controller--> <?php if(isset($_POST['email']) && isset($_POST['password'])){ //$email =htmlspecialchars($_POST['email'],ENT_QUOTES);//special character in email $email = $_POST['email']; $password = $_POST['password']; //on alternate flow 3a) password and user id not founded. if( $email != "" || $password != ""){ $sql="SELECT * FROM user WHERE email='".$email."'"; $result=mysql_query($sql); $row=mysql_fetch_array($result); if($password == $row['password']){ header('Location: home.php');//the pages for the members dashboard,set the type of preference. //need to sessions to set the type of users } else{ echo 'Password not founded.Contact PanelPlace SuperAdmin'; } }else{ echo 'Please fill in the username and password'; } } ?> <?php include 'mysql_closedb.php'; ?> Currently working on a login functions,it output the errors as follows in the sites.
-
Honestly,I think w3school is not a good resource for php, they didn't even teach what is scoping rules for php?
-
https://billing.stablehost.com/aff.php?aff=472 I can suggest stablehost, fast response to help, 1.99 a mth for 1gb plan, never failed me before.
-
TS:This is one of the better concept I have read,too bad w3school school is at the top of the page. http://www.tutorialspoint.com/php/php_object_oriented.htm
-
Is there any ftp program that is integrated with the editor to support easy debugging of the script>