-
Began Watching retrieve any user profile data
For example, in Facebook, if you enter someone's profile you can see all the user's data. I know how to get the logged in user's data. But what I don't … -
Created I Need Help to Successfully Create an Online Courseware Database
I'm creating an online learning courseware using PHP 5.5 and connecting via PDO. But I'm confused as to how to get the courseware to work, as I want. This is … -
Began Watching I Need Help to Successfully Create an Online Courseware Database
I'm creating an online learning courseware using PHP 5.5 and connecting via PDO. But I'm confused as to how to get the courseware to work, as I want. This is … -
Replied To a Post in I need help to insert image and other data into a MySQL database
Thanks, I'll try it and see if I can integrate it successfully into my script. -
Replied To a Post in I need help to insert image and other data into a MySQL database
The directory, category, exists in script-directory/products/images/category. -
Replied To a Post in I need help to insert image and other data into a MySQL database
Line 385 has this code: imagejpeg($dest,$destFile, $quality); -
Replied To a Post in I need help to insert image and other data into a MySQL database
I still don't get it. can you please tell me the exact file to edit and which line and a replacement code. Thanks in advance. -
Replied To a Post in I need help to insert image and other data into a MySQL database
@diafol, thanks for your contribution. Which file do you suggest I edit and which line? add-category.php or functions.php or config.php? Sorry, I'm just a learner. -
Replied To a Post in I need help to insert image and other data into a MySQL database
@cereal, Thanks for the insight. I updated the select query on add-category.php to this: $query = "INSERT INTO admin (username, hash, email, phone) VALUES (:username, :hash, :email, :phone)"; $params = … -
Replied To a Post in I need help to insert image and other data into a MySQL database
The mysql query I originally had on add-category.php was this: $query = "INSERT INTO prod_cat (cat_name, cat_metatitle, cat_metakeywords, cat_metadescription, cat_description, cat_image, cat_date) VALUES ('$categoryName', '$categoryMtitle', '$categoryMkey', '$categoryMdes', '$categoryDesc', '$newName', NOW())"; … -
Created I need help to insert image and other data into a MySQL database
I have a form on "add-category.php" that enables the admin to create a category and doing so includes uploading an image to a folder and inserts its file name and … -
Began Watching I need help to insert image and other data into a MySQL database
I have a form on "add-category.php" that enables the admin to create a category and doing so includes uploading an image to a folder and inserts its file name and … -
Gave Reputation to ryantroop in PHP/MySQL login error
So at this point I'm gathering that you did not initially write this, nor do you understand how the static keyword works in php functions. In order to explain some … -
Replied To a Post in PHP/MySQL login error
@Ryantroop, Thanks for your lengthy explanation. Yes, I didn't initially write the query() function with PDO. I became interested in PDO because of its handling of security regarding SQL injection, … -
Replied To a Post in PHP/MySQL login error
@ryantroop, thanks for your lengthy explanations. I'm still struggling to make sense of what you said. How can I make the query() function to return an associative array, instead of … -
Replied To a Post in PHP/MySQL login error
@nyantroop, Thanks for your time and insight. This is the result of var_dump() after I tried to log in with the username, "admin": object(PDOStatement)[2] public 'queryString' => string 'SELECT * … -
Replied To a Post in PHP/MySQL login error
@cereal, The "illegal string offset" error message has stopped displaying. But down the line I'm getting another type of error, "Invalid username and/or password", when I know the supplied credentials … -
Gave Reputation to cereal in PHP/MySQL login error
It was `$rows` not `$row`, the variable was overwriting itself, anyway to avoid confusion do: $sql = "SELECT * FROM admin WHERE username = '$username'"; $rows = query($sql); if(is_array($rows) && … -
Replied To a Post in PHP/MySQL login error
@cereal, I forgot to say that functions.php is included in config.php. -
Replied To a Post in PHP/MySQL login error
@cereal, thanks once again for your insight. This is what I tried, but it still generates "illegal string offset 'username' error message: $rows = "SELECT * FROM admin WHERE username … -
Replied To a Post in PHP/MySQL login error
@cereal, thanks for your insight. I honestly don't know how to submit the query to the function and return the result set and then execute the remaining code. However, if … -
Replied To a Post in PHP/MySQL login error
@cereal, execute() is in the functions.php file: function query($sql, $parameters = null) { static $pdo; // define the var as static so that it will persist between function calls try … -
Began Watching Help me Fixing Navigation Hover Problem
Acually i'm new in web designing and i'm working on menu. But i'm facing problem in decorating hover...See Code Below and help me...Thanks <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Design … -
Replied To a Post in Help me Fixing Navigation Hover Problem
I can see that on hover the background color changes to grey and font color changes to black. What exactly do you want to achieve that is now working? -
Replied To a Post in PHP/MySQL login error
Please, be advised that I'm using PDO in my functions.php file to connect, query, prepare, and execute. -
Edited PHP/MySQL login error
My login script is displaying the following error message: Warning: Illegal string offset 'hash' on line 30. Here is the code that generates the error: <?php // configuration require("../../includes/config.php"); // … -
Created PHP/MySQL login error
My login script is displaying the following error message: Warning: Illegal string offset 'hash' on line 30. Here is the code that generates the error: <?php // configuration require("../../includes/config.php"); // … -
Began Watching PHP/MySQL login error
My login script is displaying the following error message: Warning: Illegal string offset 'hash' on line 30. Here is the code that generates the error: <?php // configuration require("../../includes/config.php"); // … -
Marked Solved Status for PHP/MySQL - I need help with PDO execute() and fetch
I'm trying to automatically populate a navigation menu based on available categories in the database. As follows is my code: <?php $sidenav = query("SELECT cat_id, cat_name FROM prod_cat ORDER By … -
Gave Reputation to jstfsklh211 in PHP/MySQL - I need help with PDO execute() and fetch
your function doesn't return a statement it returns the result $statement = $handle->prepare($sql); you would need to return `$statement` for what you're attempting -
Replied To a Post in PHP/MySQL - I need help with PDO execute() and fetch
@pritaeas, I was able to fix the issue by following your suggestion - changing the while loop to foreach. Thanks a lot. @jstfsklh211, lots of thanks for your insight. I'll … -
Gave Reputation to pritaeas in PHP/MySQL - I need help with PDO execute() and fetch
Line 87, your fetchAll, returns an array (assuming your query does not fail). You cannot execute fetch on an array, only on a PDO statement. So either return $statement in … -
Replied To a Post in PHP/MySQL - I need help with PDO execute() and fetch
Thanks for the insight. See what I have in my functions.php for the query() function: function query(/* $sql [, ... ] */) { // SQL statement $sql = func_get_arg(0); // … -
Edited PHP/MySQL - I need help with PDO execute() and fetch
I'm trying to automatically populate a navigation menu based on available categories in the database. As follows is my code: <?php $sidenav = query("SELECT cat_id, cat_name FROM prod_cat ORDER By … -
Created PHP/MySQL - I need help with PDO execute() and fetch
I'm trying to automatically populate a navigation menu based on available categories in the database. As follows is my code: <?php $sidenav = query("SELECT cat_id, cat_name FROM prod_cat ORDER By … -
Began Watching PHP/MySQL - I need help with PDO execute() and fetch
I'm trying to automatically populate a navigation menu based on available categories in the database. As follows is my code: <?php $sidenav = query("SELECT cat_id, cat_name FROM prod_cat ORDER By … -
Created Issue with updating my script from mysql_query to PDO
I have a custom function called "query" with PDO statement in the functions.php file: /** * Executes SQL statement, possibly with parameters, returning * an array of all rows in … -
Began Watching Issue with updating my script from mysql_query to PDO
I have a custom function called "query" with PDO statement in the functions.php file: /** * Executes SQL statement, possibly with parameters, returning * an array of all rows in … -
Marked Solved Status for How do I echo table row and div in PHP?
Please, I need help to echo atable row and div tag within PHP code. The following is what I have unsuccessfully tried: echo '<tr>' '<td style="text-align:left">' . '<div class="describe">' . … -
Replied To a Post in How do I echo table row and div in PHP?
Thanks; it worked. -
Created How do I echo table row and div in PHP?
Please, I need help to echo atable row and div tag within PHP code. The following is what I have unsuccessfully tried: echo '<tr>' '<td style="text-align:left">' . '<div class="describe">' . … -
Began Watching How do I echo table row and div in PHP?
Please, I need help to echo atable row and div tag within PHP code. The following is what I have unsuccessfully tried: echo '<tr>' '<td style="text-align:left">' . '<div class="describe">' . … -
Marked Solved Status for Issue deleting data via PHP/MySQL
I'm experiencing an issue deleting data via PHP/MySQL query. The following is the error message: Delete product category failed. You have an error in your SQL syntax; check the manual … -
Replied To a Post in Issue deleting data via PHP/MySQL
Finally, I've been able to get the script to work. As follows is the working code: <?php if (isset($_GET['delete']) && isset($_GET['album']) && isset($_GET['imgId'])) { //$albumId = mysql_real_escape_string($_GET['album']); //$imgId = mysql_real_escape_string($_GET['imgId']); … -
Replied To a Post in Issue deleting data via PHP/MySQL
Those "die" statements didn't have any effect - no error message was printed on the screen. -
Replied To a Post in Issue deleting data via PHP/MySQL
Thanks for the updated code. The following is what I did, and the deletion is still not successful: $sql = "SELECT im_image, im_thumbnail FROM tbl_image WHERE im_id = '$imgId' AND … -
Replied To a Post in Issue deleting data via PHP/MySQL
Thanks for your continued support. As follows is what the latest var dump() returned, after clicking the "Delete" button: array(4) { ["page"]=> string(10) "list-image" ["delete"]=> string(0) "" ["album"]=> string(1) "8" … -
Replied To a Post in Issue deleting data via PHP/MySQL
When I navigate to the page, I see the following code: array(1) { ["page"]=> string(10) "list-image" } After pressing on the "Delete" link, the following code appeared: array(4) { ["page"]=> … -
Replied To a Post in Issue deleting data via PHP/MySQL
@cereal, unfortunately, it still doesn't work. -
Replied To a Post in Issue deleting data via PHP/MySQL
@cereal, I'm overwhelmed by your devotion and patience in enlightening me. I so much appreciate that. Strangely enough, any attempt to delete any image in the desired database row doesn't …
The End.