Jump to content
Larry Ullman's Book Forums

Pejman Ghasemi

  • Content Count

  • Joined

  • Last visited

  • Days Won


Pejman Ghasemi last won the day on August 22 2011

Pejman Ghasemi had the most liked content!

Community Reputation

2 Neutral

About Pejman Ghasemi

  • Rank
  1. Hello Mr.Larry Ullman, I would appreciate of you. I suggested your books to many of my friends. I hope you keep writing new books and release them. I know may this ask is not related to the topic but PHP is not Satisfactory to create a web page. because as you said PHP is a server-side programming language. And We can not decorate our website in client-side. So there is another language beside the is called Java Script. Do you have a good resource that we study javascript. Regards.
  2. Hi, Actually I have some questions in this topics that are still unanswered. First: I have not understood yet, why trim() should be apply for password. As I understand, trim a string is something like: $p=" t!=1 "; trim ($p); echo $p; // This line will print "t!=1" It removes spaces before and after. But as I know we always use spaces to make our password stronger. And my final question what is the problem with my script that has not worked yet. I have not found syntactical problem but maybe I have logical. Thank you very much.
  3. Hello Bahaa, To understand more about some unfamiliar calendars, First of all I introduce them Two different calendars use as formal calendar in middle-east : First : Lunar-Calendar(Hijri) - it uses by Muslims and Arabic countries. (As i write this post the lunar calendar is 1432,09,21) Second: Sun-Calendar(Jalali) - it uses by Persian language countries like Iran, Turkmenistan, Afghanistan and other persian language countries.... (1390,05,31) And other one is from China: Third : Chinese Lunar Calendar - it used by Chinese people however maybe a little hard and I do not understand it
  4. Hello Zanimation, I put the registrar data into database and modifier file included line below: Register.php <div id="content"> <?php $errorys = array(); if (isset($_POST['Submitted'])) { $errors = array(); // put errors into an array // Validate first name if (empty($_POST['first_name'])){ $errors[] = 'Please enter first name'; }else{ $fn = trim($_POST['first_name']); } // Validate Last Name if (empty($_POST['last_name'])){ $errors[] = 'Please enter last name'; }else{ $ln = trim($_POST['last_name']); } // Validate email address if (empty($_POST['email'])){ $err
  5. Hi and thank you Zanimation and Stuart. Finally I could understand what is the problem. There was a wrong with SHA1. I removed the condition of AND in this line: $q = "SELECT user_id FROM users WHERE (email='$e' AND pass=SHA1('$cp'))"; Changed to: $q = "SELECT user_id FROM users WHERE email='$e'"; I was able to run step 2 successfully. I think I need to trim($cp) and trim($np) to give me the best result. But i do not understand why trim() should be apply for password. As I understand, trim a string like: $p=" t!=1 "; trim ($p); echo $p; // This line will prin
  6. Hello, My name is Pejman Ghasemi. first of all I want to thanks Mr.Larry Ullman. PHP 6 AND MYSQL5 is the best book I have ever read. I never could understand the example and explanation of other books but this one is easy and useful. Unfortunately Whole Today I worked on script 8.3 to run it but have not run it yet. so i decided to ask you help me. require_once('includes/db.php'); $e= "test"; $cp = 'test'; $np = 'pejman'; $q = "SELECT user_id FROM users WHERE (email='$e' AND pass=SHA1('$cp'))"; $r = mysqli_query($dbc,$q); $num = mysqli_num_rows($r); echo 'step1
  • Create New...