-
Posts
1,033 -
Joined
-
Last visited
-
Days Won
17
Everything posted by gw1500se
-
Clean URL????
-
You need to explain what you are trying to accomplish. I can not imagine why you want to do this with .htaccess. Perhaps we can suggest a better way.
-
Fix the link rather than try to translate it. It still makes no sense to me.
-
Since those are arguments for the request, I don't understand why you would want to do that. Please explain what you are trying to accomplish. A URL that looks like http://localhost//Active=View/PostCategory=1 makes no sense. If you rewrite it that way with .htaccess, what/how do you expect it to be processed?
-
A non well formed numeric value encountered ..error
gw1500se replied to bidawinner's topic in PHP Coding Help
If that is the output from the echo then it is obvious you cannot multiply that string by anything. It is not numeric just as the error says. I am again just guessing but I think you want: distance($service->distance * 0.6) I don't know how you change the string 'miles' to 'kilometers'. -
https://www.php.net/manual/en/function.htmlentities.php
-
A non well formed numeric value encountered ..error
gw1500se replied to bidawinner's topic in PHP Coding Help
Without knowing what 'distance' does or '$server->distance' contains I can only guess. echo distance($service->distance); You will likely find that the result is not numeric. -
$_SESSION value not being erased even after logout.
gw1500se replied to Robinson's topic in PHP Coding Help
Then you need to move the include to the beginning of the file. -
Sorry, I didn't realize you meant '<' literally. You need to use htmlspecialchars for that. if (isset($_POST['process'])) { print(htmlspecialchars($_POST['data'])); }
-
It works for me. Array ( [data] => test [process] => Submit Query )
-
The first time the page is displayed I would expect it to be blank since nothing has been entered yet. Normally that print should only be executed AFTER the submit. if (isset($_POST['process'])) { echo "<pre>"; print_r($_POST); echo "</pre>"; }
-
It is consider best practice to either leave the action parameter out or if you use it to specify a filename. As an aside, I don't think I've ever seen the method in lower case, it is always POST or GET. Perhaps someone can confirm if that is case sensitive. Also please use the code icon (<>) for your code and select HTML or PHP.
-
Total output of mysql sum query from different columns
gw1500se replied to a topic in PHP Coding Help
Search engines are your friend. https://www.php.net/manual/en/function.array-sum.php -
What is 'MySQLi_query'? Did you write your own function? PHP is case sensitive. I am guessing you meant 'mysqli_query'.
-
$_SESSION value not being erased even after logout.
gw1500se replied to Robinson's topic in PHP Coding Help
File_1.php has no session_start. File_2.php does not have session_start at the beginning. You need to take it out of 'inc_fn_header_and_menu.php' and put it at the beginning of file_2.php. -
First never, ever put web page data directly into a database. Always use prepared statements. Second, you didn't post the code where you are executing the query. Third make sure error reporting is turned on: error_reporting(E_ALL);
-
This is probably a good place as any to start.
-
Leave it in benanamen's format in your database. Change the query result to whatever format you need when you do the compare.
-
Yep, now that I see the code properly posted with the formatter.
-
You are trying to convert the literal string ADDRESS. You need ADDRESS to be a variable, hopefully, in the form xxx.xxx.xxx.xxx.
-
Yep, the error is quite explicit. If you are having trouble seeing it echo $sql.
-
convert unsigned int ip_address from db to string
gw1500se replied to larry29936's topic in PHP Coding Help
inet_ntoa and inet_aton are MySQL functions. Use them in your queries. -
First please use the code icon (<>) and select PHP for your code. Second, where is that string coming from? It looks like the page is using GET not POST so you should me using $_GET. Third, never, ever put posted data directly into a query string. Use prepared statements only.
-
PHP uncaught error in script that runs fine in phpmyadmin
gw1500se replied to larry29936's topic in PHP Coding Help
OK, that is what I figured. You are not accessing the table you think you are. Post the code connecting to the database.