Jump to content
Larry Ullman's Book Forums

andrew wong

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by andrew wong

  1. Thanks larry since i do not have local mail server, can i use php.net mail server ? [mail function] ; For Win32 only. ; http://php.net/smtp SMTP=localhost ; http://php.net/smtp-port smtp_port=25
  2. Hi Larry, Thanks for your responding. I have removed the last parameter from my_error_handler() when i run again http://127.0.0.1/phpmysql4_scripts/ch18/html/register.php User Registration An error occurred in script 'D:\xampp\htdocs\phpmysql4_scripts\ch18\html\register.php' on line 70: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() Date/Time: 9-17-2021 23:23:14 Warning: Undefined variable $e_vars in D:\xampp\htdocs\phpmysql4_scripts\ch18\html\includes\config.inc.php on line 54 #0 my_error_handler(2, mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set(), D:\xampp\htdocs\phpmysql4_scripts\ch18\html\register.php, 70) #1 mail(wongkinping@chinalifeagt.com.hk, Registration Confirmation, Thank you for registering at . To activate your account, please click on this link: http://127.0.0.1/phpmysql4_scripts/ch18/html/activate.php?x=wongkinping%40chinalifeagt.com.hk&y=a331f2faab5825188d23eca77974f18f, From: admin@sitename.com) called at [D:\xampp\htdocs\phpmysql4_scripts\ch18\html\register.php:70] Thank you for registering! A confirmation email has been sent to your address. Please click on the link in that email in order to activate your account. sorry for any simple question, but I am new to PHP. Thanks Andrew
  3. User Registration Fatal error: Uncaught ArgumentCountError: Too few arguments to function my_error_handler(), 4 passed and exactly 5 expected in D:\xampp\htdocs\phpmysql4_scripts\ch18\html\includes\config.inc.php:38 Stack trace: #0 [internal function]: my_error_handler(2, 'mail(): Failed ...', 'D:\\xampp\\htdocs...', 70) #1 D:\xampp\htdocs\phpmysql4_scripts\ch18\html\register.php(70): mail('trandrew8@gmail...', 'Registration Co...', 'Thank you for r...', 'From: admin@sit...') #2 {main} thrown in D:\xampp\htdocs\phpmysql4_scripts\ch18\html\includes\config.inc.php on line 38
  4. http://127.0.0.1/phpmysql4_scripts/ch18/html/register.php User Registration Fatal error: Uncaught ArgumentCountError: Too few arguments to function my_error_handler(), 4 passed and exactly 5 expected in D:\xampp\htdocs\phpmysql4_scripts\ch18\html\includes\config.inc.php:38 Stack trace: #0 D:\xampp\htdocs\phpmysql4_scripts\ch18\html\register.php(10): my_error_handler(2, 'require(../../m...', 'D:\\xampp\\htdocs...', 10) #1 D:\xampp\htdocs\phpmysql4_scripts\ch18\html\register.php(10): require() #2 {main} thrown in D:\xampp\htdocs\phpmysql4_scripts\ch18\html\includes\config.inc.php on line 38
  5. MariaDB [ch18]> CREATE TABLE users( -> user_id INT UNSIGNED NOT NULL AUTO_INCREMENT, -> first_name VARCHAR(20) NOT NULL, -> last_name VARCHAR(40) NOT NULL, -> email VARHCAR(60) NOT NULL, -> pass CHAR(40) NOT NULL, -> user_level TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, -> active CHAR(32), -> registration_date DATETIME NOT NULL, -> PRIMARY KEY (user_id), -> UNIQUE KEY (email), -> INDEX login (email, pass) -> ); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(60) NOT NULL, pass CHAR(40) NOT NULL, user_level TINYINT(1) UNSIGNED NOT NUL...' at line 5 MariaDB [ch18]>
  6. http://127.0.0.1/phpmysql4_scripts/ch09/view_users.php Your Website catchy slogan... Home Page Register View Users Change Password link five Registered Users Warning: require(../mysqli_connect.php): Failed to open stream: No such file or directory in D:\xampp\htdocs\phpmysql4_scripts\ch09\view_users.php on line 10Fatal error: Uncaught Error: Failed opening required '../mysqli_connect.php' (include_path='D:\xampp\php\PEAR') in D:\xampp\htdocs\phpmysql4_scripts\ch09\view_users.php:10 Stack trace: #0 {main} thrown in D:\xampp\htdocs\phpmysql4_scripts\ch09\view_users.php on line 10 Other tag works, just View Users have errors I have put the mysqli_connect.php into php\pear folder but it still fails i have tried many times, please give me a help !! Thanks!!
×
×
  • Create New...