Jump to content
Larry Ullman's Book Forums

tonye

Members
  • Content Count

    11
  • Joined

  • Last visited

Community Reputation

0 Neutral

About tonye

  • Rank
    Newbie
  1. Hi Larry, i couldn't register an account with Sandboxpaypal because am not from America, so what will i do
  2. So what should i do about the ecommerce1.history since it doesn't exist, should i create it or delete it. Larry
  3. i got this error after connecting db and index.php Mr Larry help me Knowledge is Power and it pays to know Home About Contact Register WelcomeWelcome to Knowledge is Power, a site dedicated to keeping you up to date on the Web security and programming information you need to know. Blah, blah, blah. Yadda, yadda, yadda. Most Popular Pages An error occurred in script 'C:\xampp\htdocs\test\index.php' on line 37: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given Array( [0] => Array ( [function] => my_error_handler [args] => Array ( [0] => 2 [1] => mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given [2] => C:\xampp\htdocs\test\index.php [3] => 37 [4] => Array ( [GLOBALS] => Array *RECURSION* [_POST] => Array ( ) [_GET] => Array ( ) [_COOKIE] => Array ( ) [_FILES] => Array ( ) [_SERVER] => Array ( [MIBDIRS] => C:/xampp/php/extras/mibs [MYSQL_HOME] => C:\xampp\mysql\bin [OPENSSL_CONF] => C:/xampp/apache/bin/openssl.cnf [PHP_PEAR_SYSCONF_DIR] => C:\xampp\php [PHPRC] => C:\xampp\php [TMP] => C:\xampp\tmp [HTTP_HOST] => 127.0.0.1 [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 [HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5 [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_CONNECTION] => keep-alive [PATH] => C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\ [SystemRoot] => C:\Windows [COMSPEC] => C:\Windows\system32\cmd.exe [PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC [WINDIR] => C:\Windows [SERVER_SIGNATURE] => Apache/2.2.14 (Win32) DAV/2 mod_autoindex_color PHP/5.3.1 Server at 127.0.0.1 Port 80 [SERVER_SOFTWARE] => Apache/2.2.14 (Win32) DAV/2 mod_autoindex_color PHP/5.3.1 [SERVER_NAME] => 127.0.0.1 [SERVER_ADDR] => 127.0.0.1 [SERVER_PORT] => 80 [REMOTE_ADDR] => 127.0.0.1 [DOCUMENT_ROOT] => C:/xampp/htdocs [SERVER_ADMIN] => postmaster@localhost [SCRIPT_FILENAME] => C:/xampp/htdocs/test/index.php [REMOTE_PORT] => 51571 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => GET [QUERY_STRING] => [REQUEST_URI] => /test/ [SCRIPT_NAME] => /test/index.php [PHP_SELF] => /test/index.php [REQUEST_TIME] => 1402100874 [argv] => Array ( ) [argc] => 0 ) [live] => [contact_email] => you@example.com [_SESSION] => Array ( ) [dbc] => mysqli Object ( [affected_rows] => -1 [client_info] => 5.1.41 [client_version] => 50141 [connect_errno] => 0 [connect_error] => [errno] => 1146 [error] => Table 'ecommerce1.history' doesn't exist [field_count] => 0 [host_info] => localhost via TCP/IP [info] => [insert_id] => 0 [server_info] => 5.1.41 [server_version] => 50141 [sqlstate] => 42S02 [protocol_version] => 10 [thread_id] => 1 [warning_count] => 0 ) [pages] => Array ( [Home] => index.php [About] => # [Contact] => # [Register] => register.php ) [this_page] => index.php [v] => register.php [k] => Register [q] => SELECT COUNT(history.id) AS num, pages.id, pages.title FROM pages, history WHERE pages.id=history.page_id AND history.type='page' GROUP BY (history.page_id) ORDER BY num DESC LIMIT 10 [r] => [n] => 1 ) ) ) [1] => Array ( [file] => C:\xampp\htdocs\test\index.php [line] => 37 [function] => mysqli_fetch_array [args] => Array ( [0] => [1] => 2 ) )) Highest Rated Pages An error occurred in script 'C:\xampp\htdocs\test\index.php' on line 55: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given Array( [0] => Array ( [function] => my_error_handler [args] => Array ( [0] => 2 [1] => mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given [2] => C:\xampp\htdocs\test\index.php [3] => 55 [4] => Array ( [GLOBALS] => Array *RECURSION* [_POST] => Array ( ) [_GET] => Array ( ) [_COOKIE] => Array ( ) [_FILES] => Array ( ) [_SERVER] => Array ( [MIBDIRS] => C:/xampp/php/extras/mibs [MYSQL_HOME] => C:\xampp\mysql\bin [OPENSSL_CONF] => C:/xampp/apache/bin/openssl.cnf [PHP_PEAR_SYSCONF_DIR] => C:\xampp\php [PHPRC] => C:\xampp\php [TMP] => C:\xampp\tmp [HTTP_HOST] => 127.0.0.1 [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 [HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5 [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_CONNECTION] => keep-alive [PATH] => C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\ [SystemRoot] => C:\Windows [COMSPEC] => C:\Windows\system32\cmd.exe [PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC [WINDIR] => C:\Windows [SERVER_SIGNATURE] => Apache/2.2.14 (Win32) DAV/2 mod_autoindex_color PHP/5.3.1 Server at 127.0.0.1 Port 80 [SERVER_SOFTWARE] => Apache/2.2.14 (Win32) DAV/2 mod_autoindex_color PHP/5.3.1 [SERVER_NAME] => 127.0.0.1 [SERVER_ADDR] => 127.0.0.1 [SERVER_PORT] => 80 [REMOTE_ADDR] => 127.0.0.1 [DOCUMENT_ROOT] => C:/xampp/htdocs [SERVER_ADMIN] => postmaster@localhost [SCRIPT_FILENAME] => C:/xampp/htdocs/test/index.php [REMOTE_PORT] => 51571 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => GET [QUERY_STRING] => [REQUEST_URI] => /test/ [SCRIPT_NAME] => /test/index.php [PHP_SELF] => /test/index.php [REQUEST_TIME] => 1402100874 [argv] => Array ( ) [argc] => 0 ) [live] => [contact_email] => you@example.com [_SESSION] => Array ( ) [dbc] => mysqli Object ( [affected_rows] => -1 [client_info] => 5.1.41 [client_version] => 50141 [connect_errno] => 0 [connect_error] => [errno] => 1146 [error] => Table 'ecommerce1.page_ratings' doesn't exist [field_count] => 0 [host_info] => localhost via TCP/IP [info] => [insert_id] => 0 [server_info] => 5.1.41 [server_version] => 50141 [sqlstate] => 42S02 [protocol_version] => 10 [thread_id] => 1 [warning_count] => 0 ) [pages] => Array ( [Home] => index.php [About] => # [Contact] => # [Register] => register.php ) [this_page] => index.php [v] => register.php [k] => Register [q] => SELECT ROUND(AVG(rating),1) AS average, pages.id, pages.title FROM pages, page_ratings WHERE pages.id=page_ratings.page_id GROUP BY (page_ratings.page_id) ORDER BY average DESC LIMIT 10 [r] => [n] => 1 [row] => ) ) ) [1] => Array ( [file] => C:\xampp\htdocs\test\index.php [line] => 55 [function] => mysqli_fetch_array [args] => Array ( [0] => [1] => 2 ) )) Lorem IpsumLorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent consectetur volutpat nunc, eget vulputate quam tristique sit amet. Donec suscipit mollis erat in egestas. Morbi id risus quam. Sed vitae erat eu tortor tempus consequat. Morbi quam massa, viverra sed ullamcorper sit amet, ultrices ullamcorper eros. Mauris ultricies rhoncus leo, ac vehicula sem condimentum vel. Morbi varius rutrum laoreet. Maecenas vitae turpis turpis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce leo turpis, faucibus et consequat eget, adipiscing ut turpis. Donec lacinia sodales nulla nec pellentesque. Fusce fringilla dictum purus in imperdiet. Vivamus at nulla diam, sagittis rutrum diam. Integer porta imperdiet euismod. Login Email Address Password Forgot? Content PDF Guides Knowledge is Power and it pays to know Home About Contact Register WelcomeWelcome to Knowledge is Power, a site dedicated to keeping you up to date on the Web security and programming information you need to know. Blah, blah, blah. Yadda, yadda, yadda. Most Popular Pages An error occurred in script 'C:\xampp\htdocs\test\index.php' on line 37: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given Array( [0] => Array ( [function] => my_error_handler [args] => Array ( [0] => 2 [1] => mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given [2] => C:\xampp\htdocs\test\index.php [3] => 37 [4] => Array ( [GLOBALS] => Array *RECURSION* [_POST] => Array ( ) [_GET] => Array ( ) [_COOKIE] => Array ( ) [_FILES] => Array ( ) [_SERVER] => Array ( [MIBDIRS] => C:/xampp/php/extras/mibs [MYSQL_HOME] => C:\xampp\mysql\bin [OPENSSL_CONF] => C:/xampp/apache/bin/openssl.cnf [PHP_PEAR_SYSCONF_DIR] => C:\xampp\php [PHPRC] => C:\xampp\php [TMP] => C:\xampp\tmp [HTTP_HOST] => 127.0.0.1 [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 [HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5 [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_CONNECTION] => keep-alive [PATH] => C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\ [SystemRoot] => C:\Windows [COMSPEC] => C:\Windows\system32\cmd.exe [PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC [WINDIR] => C:\Windows [SERVER_SIGNATURE] => Apache/2.2.14 (Win32) DAV/2 mod_autoindex_color PHP/5.3.1 Server at 127.0.0.1 Port 80 [SERVER_SOFTWARE] => Apache/2.2.14 (Win32) DAV/2 mod_autoindex_color PHP/5.3.1 [SERVER_NAME] => 127.0.0.1 [SERVER_ADDR] => 127.0.0.1 [SERVER_PORT] => 80 [REMOTE_ADDR] => 127.0.0.1 [DOCUMENT_ROOT] => C:/xampp/htdocs [SERVER_ADMIN] => postmaster@localhost [SCRIPT_FILENAME] => C:/xampp/htdocs/test/index.php [REMOTE_PORT] => 51571 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => GET [QUERY_STRING] => [REQUEST_URI] => /test/ [SCRIPT_NAME] => /test/index.php [PHP_SELF] => /test/index.php [REQUEST_TIME] => 1402100874 [argv] => Array ( ) [argc] => 0 ) [live] => [contact_email] => you@example.com [_SESSION] => Array ( ) [dbc] => mysqli Object ( [affected_rows] => -1 [client_info] => 5.1.41 [client_version] => 50141 [connect_errno] => 0 [connect_error] => [errno] => 1146 [error] => Table 'ecommerce1.history' doesn't exist [field_count] => 0 [host_info] => localhost via TCP/IP [info] => [insert_id] => 0 [server_info] => 5.1.41 [server_version] => 50141 [sqlstate] => 42S02 [protocol_version] => 10 [thread_id] => 1 [warning_count] => 0 ) [pages] => Array ( [Home] => index.php [About] => # [Contact] => # [Register] => register.php ) [this_page] => index.php [v] => register.php [k] => Register [q] => SELECT COUNT(history.id) AS num, pages.id, pages.title FROM pages, history WHERE pages.id=history.page_id AND history.type='page' GROUP BY (history.page_id) ORDER BY num DESC LIMIT 10 [r] => [n] => 1 ) ) ) [1] => Array ( [file] => C:\xampp\htdocs\test\index.php [line] => 37 [function] => mysqli_fetch_array [args] => Array ( [0] => [1] => 2 ) )) Highest Rated Pages An error occurred in script 'C:\xampp\htdocs\test\index.php' on line 55: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given Array( [0] => Array ( [function] => my_error_handler [args] => Array ( [0] => 2 [1] => mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given [2] => C:\xampp\htdocs\test\index.php [3] => 55 [4] => Array ( [GLOBALS] => Array *RECURSION* [_POST] => Array ( ) [_GET] => Array ( ) [_COOKIE] => Array ( ) [_FILES] => Array ( ) [_SERVER] => Array ( [MIBDIRS] => C:/xampp/php/extras/mibs [MYSQL_HOME] => C:\xampp\mysql\bin [OPENSSL_CONF] => C:/xampp/apache/bin/openssl.cnf [PHP_PEAR_SYSCONF_DIR] => C:\xampp\php [PHPRC] => C:\xampp\php [TMP] => C:\xampp\tmp [HTTP_HOST] => 127.0.0.1 [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0 [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 [HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.5 [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_CONNECTION] => keep-alive [PATH] => C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\ [SystemRoot] => C:\Windows [COMSPEC] => C:\Windows\system32\cmd.exe [PATHEXT] => .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC [WINDIR] => C:\Windows [SERVER_SIGNATURE] => Apache/2.2.14 (Win32) DAV/2 mod_autoindex_color PHP/5.3.1 Server at 127.0.0.1 Port 80 [SERVER_SOFTWARE] => Apache/2.2.14 (Win32) DAV/2 mod_autoindex_color PHP/5.3.1 [SERVER_NAME] => 127.0.0.1 [SERVER_ADDR] => 127.0.0.1 [SERVER_PORT] => 80 [REMOTE_ADDR] => 127.0.0.1 [DOCUMENT_ROOT] => C:/xampp/htdocs [SERVER_ADMIN] => postmaster@localhost [SCRIPT_FILENAME] => C:/xampp/htdocs/test/index.php [REMOTE_PORT] => 51571 [GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => GET [QUERY_STRING] => [REQUEST_URI] => /test/ [SCRIPT_NAME] => /test/index.php [PHP_SELF] => /test/index.php [REQUEST_TIME] => 1402100874 [argv] => Array ( ) [argc] => 0 ) [live] => [contact_email] => you@example.com [_SESSION] => Array ( ) [dbc] => mysqli Object ( [affected_rows] => -1 [client_info] => 5.1.41 [client_version] => 50141 [connect_errno] => 0 [connect_error] => [errno] => 1146 [error] => Table 'ecommerce1.page_ratings' doesn't exist [field_count] => 0 [host_info] => localhost via TCP/IP [info] => [insert_id] => 0 [server_info] => 5.1.41 [server_version] => 50141 [sqlstate] => 42S02 [protocol_version] => 10 [thread_id] => 1 [warning_count] => 0 ) [pages] => Array ( [Home] => index.php [About] => # [Contact] => # [Register] => register.php ) [this_page] => index.php [v] => register.php [k] => Register [q] => SELECT ROUND(AVG(rating),1) AS average, pages.id, pages.title FROM pages, page_ratings WHERE pages.id=page_ratings.page_id GROUP BY (page_ratings.page_id) ORDER BY average DESC LIMIT 10 [r] => [n] => 1 [row] => ) ) ) [1] => Array ( [file] => C:\xampp\htdocs\test\index.php [line] => 55 [function] => mysqli_fetch_array [args] => Array ( [0] => [1] => 2 ) )) Lorem IpsumLorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent consectetur volutpat nunc, eget vulputate quam tristique sit amet. Donec suscipit mollis erat in egestas. Morbi id risus quam. Sed vitae erat eu tortor tempus consequat. Morbi quam massa, viverra sed ullamcorper sit amet, ultrices ullamcorper eros. Mauris ultricies rhoncus leo, ac vehicula sem condimentum vel. Morbi varius rutrum laoreet. Maecenas vitae turpis turpis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce leo turpis, faucibus et consequat eget, adipiscing ut turpis. Donec lacinia sodales nulla nec pellentesque. Fusce fringilla dictum purus in imperdiet. Vivamus at nulla diam, sagittis rutrum diam. Integer porta imperdiet euismod. Login Email Address Password Forgot? Content PDF Guides
  4. redirected the web browser if this page has been accessed directly. if (! isset ($words)){ header ("Location: http://www.example.com/index.php"); exit(); } have tried redirecting it but is not redirect to the site. help please. Mr Larry
  5. <?php # Script 10.5 - show_image.php // This page displays an image. $name = FALSE; // Flag variable: // Check for an image name in the URL: if (isset($_GET['image'])) { // Full image path: $image = "../uploads/{$_GET['image']}"; // Check that the image exists and is a file: if (file_exists ($image) && (is_file($image))) { // Make sure it has an image's extension: $ext = strtolower ( substr ($_GET['image'], -4)); if (($ext == '.jpg') OR ($ext == 'jpeg') OR ($ext == '.png')) { // Set the name as this image: $name = $_GET['image']; } // End of $ext IF. } // End of file_exists() IF. } // End of isset($_GET['image']) IF. // If there was a problem, use the default image: if (!$name) { $image = 'images/unavailable.png'; $name = 'unavailable.png'; } // Get the image information: $inf = getimagesize($image); $fs = filesize($image); // Send the content information: header ("Content-Type: {$info['mime']}\n"); header ("Content-Disposition: inline; filename=\"$name\"\n"); header ("Content-Length: $fs\n"); // Send the file: readfile ($image); ?> after i run the code on my browser all i see this. Warning: getimagesize(images/unavailable.png) [function.getimagesize]: failed to open stream: No such file or directory in C:\xampp\htdocs\mail\show_image.php on line 34 Warning: filesize() [function.filesize]: stat failed for images/unavailable.png in C:\xampp\htdocs\mail\show_image.php on line 35 Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\mail\show_image.php:34) in C:\xampp\htdocs\mail\show_image.php on line 38 Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\mail\show_image.php:34) in C:\xampp\htdocs\mail\show_image.php on line 39 Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\mail\show_image.php:34) in C:\xampp\htdocs\mail\show_image.php on line 40 Warning: readfile(images/unavailable.png) [function.readfile]: failed to open stream: No such file or directory in C:\xampp\htdocs\mail\show_image.php on line 43 And have created the function for this..
  6. i put all the codes but when i file upload pictures it does not upload to upload folder but my in test folder were the script are kept. i need help
  7. I was using XAMPP but now am using WAMP everything is working fine. Than's guys
  8. yes am running from my URL and i can not connect to my local host
  9. My form does not give me feedback, after creating an html form connected to handle_form.php on web browser the does not send. What will i do to make it send and it sending befor ‎​on til i started validating the form register.php, login it now stop sendind. Locking files on topic that's i experiencing this problem
×
×
  • Create New...