-
Posts
1,033 -
Joined
-
Last visited
-
Days Won
17
Everything posted by gw1500se
-
No, we need to see the actual output and how it plans to call the PHP script. However, it does look like JSON was the intention.
-
How do I change this Select Statement to $pdo->query
gw1500se replied to larry29936's topic in PHP Coding Help
Is 't.end' a string or number? Also, to me, it does not make sense to compare >= on IP addresses. IP addresses either are the same or are different. What are you really trying to do there? -
Did you check your maillog for errors? I suggest you use PHPMailer as it is much easier, gives you better control and is also easier to debug.
-
Language doesn't matter. What I want to see is the JSON output or whatever she programmed to be passed to the PHP script. It would be preferable if she programmed it to output it in JSON.
-
I think you need to start on the mobile side and, as gizmola suggested, create the json formatted data. Post a sample of that so we get a better idea of what it looks like and then we can help you go from there with the PHP side.
-
I assumed that they knew how to calculate the distance and just needed some pointers on how to structure the algorithm in PHP.
-
1 and 2 would presumably be input from the web page. The rest would be something like: for ($m=1; $m<=$M; $m++) { for ($l=1; $l<=$L; $l++) { for ($j=1; $j<=$N; $j++) { #do calculation here storing it in a 2D array } # select minimum here (perhaps min() function) } } # use array sort # use PHP vector class # compute distance from vectors # echo results in desired format
-
This is what you need.
-
Inserting rows with 'Checked' boxes into another table
gw1500se replied to PythonHelp's topic in PHP Coding Help
Use isset for checkboxes. -
Inserting rows with 'Checked' boxes into another table
gw1500se replied to PythonHelp's topic in PHP Coding Help
Show your HTML too. I am guessing your checkbox defintion is wrong. -
It doesn't matter. Strtotime includes the date.
-
The returned value of the checkbox will exist only if checked. You should use 'isset' to see it if was checked then take appropriate action if it was. You also left off the value parameter. You need both as I showed you.
-
You don't have your checkbox array specified correctly. Don't confuse the name with the value. <input type="checkbox" name="Part1[]" value="<?echo"$Part1[$count]"?>" >
-
You need to use strtotime. It will create a time stamp then you compare the time stamps directly. if(strtotime("+15 minutes") < strtotime($some_variable)) {
-
Pull Page Content's Styling onto Category Template
gw1500se replied to nvrsmr's topic in PHP Coding Help
That is not how you presented your OP and I'm sorry you took my meaning the wrong way. However, that does not mean you will succeed if you don't understand the basics. That being said you need to post your code here not make people go to a 3rd party site. If you don't even know what it means to echo variables how can you expect us to help? You need to post the problematic code here and its context along with any errors or what you are getting compared to what you expect. This forum has all the tools to post whatever you want to show. -
Search engines are your friend. This article is what you need.
-
Pull Page Content's Styling onto Category Template
gw1500se replied to nvrsmr's topic in PHP Coding Help
I suggest that you learn to program before trying to take on this project. This is a help forum not a free coding forum. Without understanding the basics you are doomed to failure. Perhaps you would be better off asking for help on the job offerings forum. -
Now what does your MySQL query look like and is it returning what you expect?
-
Cookies do not have "descriptions." They have keys and values and keys with spaces are a bad idea. So what does $_COOKIE contain after you set it and where you are trying to verify it.
-
Pull Page Content's Styling onto Category Template
gw1500se replied to nvrsmr's topic in PHP Coding Help
Perhaps you are not getting a response because it is unclear what your terminology means. When you say the formatting and styling is not being pulled, yet the content is, makes no sense, at least to me. Are you saying you CSS is not being pulled? Did you echo $page and $content to make sure it is what you expect? Do they contain valid CSS data and the proper tags? Is error reporting turned on? -
Add that code in various places in your code. That is how you debug this stuff. Put the code in various places where you think your logic is flowing. You can then see where it disappears or is not being set.
-
What do you mean "blank" file? I suggest you look at the cookie array at the beginning of your code as necessary so you can see what is being set and when: echo "<pre>"; print_r($_COOKIE); echo "</pre>";
-
Not necessarily just tags. Any HTML including white space.
-
When using it from a template does the 'setcookie' get executed before any HTML output?