-
Posts
1,041 -
Joined
-
Last visited
-
Days Won
17
Everything posted by gw1500se
-
How do I split a 'range' string into two lots?
gw1500se replied to simona6's topic in PHP Coding Help
array_chunk -
Good catch. I missed that subtlety.
-
You need to change your loop from a while to a for. for(i=0; i<$rowCountUpdate; i++) What seems strange to me is that you are not changing your query parameters on each pass. It looks like you are always updating the same row thus the infinite loop.
-
Href - use id of href & concatenation inside loop.
gw1500se replied to JonnyDriller's topic in PHP Coding Help
Your syntax was just messed up. You can see how much simpler Barand's code is. There are a couple of ways to do the same thing but none are complicated. When you find yourself adding too many quotes and other symbols you are probably on the wrong track. PHP recognizes anything that starts with $ as a variable and does substitution. If you need to have a string that starts with $ and do not want substitution then you need to escape (\) the $, thus \$whatever. -
You are not passing $Connection to the function so it is undefined. If you had errors turned on you would have seen that.
-
Get data from evert <tr> from external URL with file_get_contents()
gw1500se replied to aThomsson's topic in PHP Coding Help
https://www.php.net/manual/en/class.domnodelist.php -
First, please use the code icon (<>) and select PHP for your code. The formatter makes it much easier to read. As for your question, PHP has a function to handle json called json_decode. It will create and associative array so you can access whatever you need easily.
-
Best way to set up a "Checkout Transaction"?
gw1500se replied to SaranacLake's topic in PHP Coding Help
Excuse me but "all of the experts?" Bull$hit. Requinix IS an expert as well as Kicken. You would be foolish not to heed their advice and it sounds like you will be foolish. -
Why in the world would you store it that way in the first place? Thought it may work now, down the road who knows what kind of problems this will present. Now is the time to fix the schema so it makes sense.
-
I'm getting this error from a PDO connection
gw1500se replied to Michael_Baxter's topic in PHP Coding Help
You can't just copy code and necessarily expect it to work. You need to understand the code presented and then implement your own. -
I'm getting this error from a PDO connection
gw1500se replied to Michael_Baxter's topic in PHP Coding Help
Are you logging in using the same user (root)? Also is the PHP script running on the same server as MySQL (localhost)? -
I'm getting this error from a PDO connection
gw1500se replied to Michael_Baxter's topic in PHP Coding Help
Perhaps not so obvious. The error message indicates that the database it is trying to open is 'lr'. If the global was returning something different, it would not show up that way in the error message. That database must not exist at least in the way it is being referenced. Again a 'show databases' would verify that. -
I'm getting this error from a PDO connection
gw1500se replied to Michael_Baxter's topic in PHP Coding Help
The error is pretty obvious. There is no database named 'Ir' or the parameter Config::get (whatever that is) is not doing what you think. You can see what databases exist by opening a MySQL connection from the command line and entering 'show databases'. -
check if port on remote server is open from client side
gw1500se replied to cappa1983's topic in PHP Coding Help
I think you are confusing what PHP is. It is server side only. PHP does not execute on the client side (user machine). Client side code is javascript. There are some javascript port scan scripts around, just search for javascript port scanner. -
Don’t know how to get values from stored procedure
gw1500se replied to narutofan's topic in PHP Coding Help
This is really a MySQL question. Your stored procedure has no IN/OUT statements. Perhaps this will help. Search engines are your friend. -
I don't understand your code at all. You're putting the rows generation outside of the loop so only 1 row gets created. Plus you are putting your form inside the table. The HTML just doesn't make sense. I suggest you read up on how to create tables in HTML. As for your 2nd question, you create a script that does the connection as a function call and include functions that do your standard queries. Then add that script with require and call those functions from your main script.
-
There is your answer. Either you are not adding a value for email in your insert or there is a problem with your schema.
-
No, you are the programmer. If you want someone to write the program for you there is a form to hire someone.
-
Obviously the query is failing. You need to echo mysqli_error to determine why.
-
You need to figure out why $error is not being set. As a workaround initialize $error to something at the beginning of your code. In any case that has nothing to do with your database not being updated. Which problem are you trying to solve?
-
I suggest you learn to read. I already told you what is wrong. Did you bother to look at the formatted code you posted and the colors? It is very obvious if you just look. That is the point of the the formatter.
-
Because it is not executing due to the syntax errors.
-
I edited my previous post after you replied. Please read.
-
??? Now that you have used the code icon you can see there are syntax errors. Your <?PHP and ?> tags are messed up/missing. There are other glaring flaws in your code. Never ever put user data directly into a database. You are wide open to injection attacks. Use prepared statements and validate the data. I am guessing that you are not validating anything on the web page before submitting it and I see nothing that validates your data in your PHP script.
-
What about my questions?