Jump to content

alvin567

Members
  • Posts

    161
  • Joined

  • Last visited

Everything posted by alvin567

  1. my point is I want to output the ages.
  2. 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.
  3. <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");
  4. so u mean the user_forbidden_handle() i am suppose to write it myself?
  5. if (!user_has_access(__FILE__)) { user_forbidden_handle(); // what does user_forbidden_handle(); means? }
  6. ok,you mean use database to set the rights?
  7. 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
  8. 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?
  9. Warning: Cannot modify header information - headers already sent by (output started at W:\www\project\login.php: in W:\www\project\login.php on line 36
  10. Any solutions? ob_start(); //output buffering doesn't works. header('Location:home.php'); ob_end_flush();
  11. could it be a whitespace bug before <? or ?php> how any ideas?
  12. I place exit; after the header('home.php') it doesn't work. I place obstart(); at the top of the script and it doesn't work.
  13. how any idea? do I write an ob_start() or trim anything before the header('home.php') coding? hakimersara---by wrapping the doctype around the header it doesn't work
  14. <!-- 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.
  15. Honestly,I think w3school is not a good resource for php, they didn't even teach what is scoping rules for php?
  16. 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.
  17. 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
  18. Is there any ftp program that is integrated with the editor to support easy debugging of the script>
×
×
  • 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.