-
Posts
1,033 -
Joined
-
Last visited
-
Days Won
17
Everything posted by gw1500se
-
PHP uncaught error in script that runs fine in phpmyadmin
gw1500se replied to larry29936's topic in PHP Coding Help
Impossible. I would expect the error to be on 'area'. -
PHP uncaught error in script that runs fine in phpmyadmin
gw1500se replied to larry29936's topic in PHP Coding Help
We've been here before. If you remove 'country' does it return the other values? -
I'm guessing when you changed to POST you did not change the array to $_POST which is why it didn't work.
-
Incorrect. The page waits for a response from the server in background.
- 6 replies
-
- notifications
- php
-
(and 1 more)
Tagged with:
-
Search engines are you friend. https://www.cloudways.com/blog/real-time-php-notification-system/
- 6 replies
-
- notifications
- php
-
(and 1 more)
Tagged with:
-
I guess you need to be more explicit. I was assuming the exception was thrown by the Json_decode. post the exact error message and indicate to which line it refers.
-
Did you var_dump the Json string before decoding it to make sure it is valid?
-
Insert data in html table or form from php sql retrieve
gw1500se replied to larry29936's topic in PHP Coding Help
Part of that problem may be the way you are storing it in you database. You should store it as unsigned int and use the MySQL functions INET_ATON and INET_NTOA in your queries. -
Insert data in html table or form from php sql retrieve
gw1500se replied to larry29936's topic in PHP Coding Help
That is a MySQL error being returned by PDO. Since you claim the echo'ed string works in a MySQL shell you need to do some testing. First try to run it without setting that column. Perhaps the error will move or it may go away. Depending on which, try setting just that column in a separate query. -
Insert data in html table or form from php sql retrieve
gw1500se replied to larry29936's topic in PHP Coding Help
Did you echo $sql1 then copy/paste that into the MySQL shell. -
Insert data in html table or form from php sql retrieve
gw1500se replied to larry29936's topic in PHP Coding Help
That is because there is a problem with your query. You may need take that problem to the MySQL forum but essential t2.country does not exist in that column. -
Insert data in html table or form from php sql retrieve
gw1500se replied to larry29936's topic in PHP Coding Help
Yes. $result is the data returned from the query where each element is a row from the query. The size of that array determines the size of your table. Although when you build the table you really don't need to know that. Jut add rows to the table until you run out of data. You can see what the array looks like with this: echo "<pre>"; print_r($result); echo "</pre>"; -
Insert data in html table or form from php sql retrieve
gw1500se replied to larry29936's topic in PHP Coding Help
This is a bit confusing but the first query seems unnecessary. You don't need a query just to find the count since later you query for the data. The last query does not want to be in a loop. After the execute do a fetch which gives you an array. The size of that array is the count for your table size. -
Inserting values to different tables based on variables
gw1500se replied to sfia's topic in PHP Coding Help
read this to see how to prepare and execute a query. -
Inserting values to different tables based on variables
gw1500se replied to sfia's topic in PHP Coding Help
I still don't understand this mysqli_query($sql1, $conn); mysqli_query($sql2, $conn); mysqli_query($sql3, $conn); when you haven't yet bound the variables. -
Inserting values to different tables based on variables
gw1500se replied to sfia's topic in PHP Coding Help
This code is confusing (please select PHP for your code next time). It appears you are running the query before you bind parameters. I don't seen how this can ever work. -
Help with improving web Form email validation, etc.
gw1500se replied to Chrisj's topic in PHP Coding Help
That is a link. -
Help with improving web Form email validation, etc.
gw1500se replied to Chrisj's topic in PHP Coding Help
Use filter_var. -
Help with improving web Form email validation, etc.
gw1500se replied to Chrisj's topic in PHP Coding Help
Do you mean a properly formatted email address (user@domain.com) or an email address that exists? The former is trivial with filter_var but the latter will require sending a confirmation and getting a reply. -
It is a bit hard to understand what you want but I think you are looking for str_replace.
-
Then you are using a database (MySQL) to store the data? When you store the data, encrypt it.
-
Define "capture." Are you talking about a way to store the info or to obtain it from a web page?
-
The regular PHP hash is a one way encryption. I cannot be decrypted except via brute force.
-
Now uid exists but you have not made its value an array (it is just a string) so there is no element named 'username'.