-
Posts
6,906 -
Joined
-
Last visited
-
Days Won
99
Everything posted by ginerjm
-
What are you doing with the payments? IF the user paid 5000 why is the array still equal to 5000? Shouldn't it be the remainder of the 5000? I don't understand why you want this array to be created.
-
How did I provide the solution please? I'm sure you meant to give someone else the credit. I didn't even understand what you want to do!
-
The reason you are not getting any errors (from your first post) is you probably don't have error reporting enabled. Add this to the beginning of your php script: error_reporting(E_ALL | E_NOTICE); ini_set('display_errors', '1'); And then add an echo of your query statement and read it.
-
Show us what you mean. A lot of us do not click on random links....
-
Have no idea what you want.
-
PHP - How to take an image from an array and save it to MYSQL?
ginerjm replied to Zorglub's topic in PHP Coding Help
Actually storing images in a table is not a good idea. Better to store a link to the images wherever they are saved. Maybe create a folder for them and simply save the path in a static place and the image names in the table. Storing the path in the table leads to problems should you ever have to move the image folder. Storing the images in the table just adds bloat to the table. My $.02 -
OOP point to array value inside of a stdClass Object
ginerjm replied to jaybo's topic in PHP Coding Help
Aha! Like I said (as in 'IIRC') my syntax was showing a bit of rust. -
OOP point to array value inside of a stdClass Object
ginerjm replied to jaybo's topic in PHP Coding Help
Did I do it incorrectly? Don't use them much at all but I thought they still read the same -
OOP point to array value inside of a stdClass Object
ginerjm replied to jaybo's topic in PHP Coding Help
IIRC - $response['data']['result'][0]['value'] Pretty simple, eh? -
Your first attempt at using PDO with named parms was better. What you left out was the array of those parms being assigned to real values. Instead of using the ? marks, get used to using the :name like you did the first time. Then assign an array like this: $parms = array( 'name'=>$name, 'id'=>$id, ... ... ); $stmt->execute($parms); Much easier to read later on when you are doing maintenance as well as now when you are debugging.
-
1. Organize your code ie, do the file upload and save before you get to the query stuff. Very confusing read here 2. Once you can separate your two tasks and organize the different parts of code you may have a better view which will point out a glaring error in your logic. Hint: It is this line: if(!$stmt) 3. Read up on your use of pdo, especially how you incorporate the arguments into your process.
-
Not buying it. Good bye
-
And you don't have any backups of that either? You should get into a new hobby/business...
-
So where's their backup/restore process?
-
Your host didn't do backups for you? Was this a free host or a paid one? And - where did you actually do your code-writing? On your own pc, no? So where are those files? This doesn't sound like something that can actually happen.
-
sending email with info from mysql database inserted
ginerjm replied to Gunnyk's topic in PHP Coding Help
All you have to do is write a query to pull up the info from your db and generate each email from a loop that includes each query result row's data. Think about it. Of course if you can make the email contents generic then all you have to do is feed all of the mailing addresses to your email generator and send just one email out to multiple people. Do you use PHPMailer? -
Display MQTT data on php page without refreshing the page.
ginerjm replied to michelle1404's topic in Javascript Help
Why not move your post to the js forum instead? -
Display MQTT data on php page without refreshing the page.
ginerjm replied to michelle1404's topic in Javascript Help
I"m going to guess that you can do this with JS but not php. -
And if you are really going to be a programmer you should enable the filename extensions in your windows install. Makes it easier to tell one file from another when it has an .html or .php or a .js or a .inc on it.
-
Whatever that means. Perhaps you should work on your communication instead of your programming. Personally you should probably place sensitive php modules ABOVE your root folder where idle hackers have a bit harder time getting to. Now (if you are showing is the right place) you seem to have this stuff inside your web root folder - not good. And perhaps use an absolute path to avoid future confusion with your scripts.
-
Well - actually it is not recommended to use the asterisk in a query. You should specify the fields you really want so that your maintenance later on is easier and you usage now is clearer. Pro tip.
-
That is not the same folder as you showed us earlier. I quit. You are not AT ALL helpful.
-
BTW - does it matter? Is this a programming concern?
-
PS You posted a line: Posted 31 minutes ago In the php file "create", you can see "include('../db.php');" in line 3. You can see the file "db.php" in here But I don't see the todo folder in there
-
I see that all of the font characters are bigger in the second. looks like just a difference in the character set.