- Strength to Increase Rep
- +3
- Strength to Decrease Rep
- -0
- Upvotes Received
- 10
- Posts with Upvotes
- 9
- Upvoting Members
- 8
- Downvotes Received
- 5
- Posts with Downvotes
- 5
- Downvoting Members
- 2
Born Again|Father|Software Developer|Gamer|Yooper|American|Dutch|Norwegian|Austin, TX - United States
- Interests
- Software Development, waryway.com, iwbtd.com
Re: I would also suggest further distinction between PHP and HTML. I also updated your submit value from 'Copmlete'. Something like this: <?php //Open Connection require_once("dbconnect.php"); //Gather Information $optionRow = '<option value="%s" >%s</option>'; $sql = "SELECT * FROM diseases"; $result = null; // There are various ways to handle mysql with … | |
Re: This sounds like an interesting problem. It sounds like you know how to do everything else on PHP, except the sockets. I tend to think about these different then most legacy PHP applications. I like https://reactphp.org/socket/ I like to have my PHP and use it too... | |
Re: I've used both extensively. NodeJS and PHP both run server side. ## Relative Features of Node: ## * Typically run standalone without apache or nginx * Is not multi threaded, but is defaulted as async (which makes it non-blocking) * It's javascript syntax (the more complex the feature, the less … | |
Re: This thread, good definition of irony. I prefer windows 8 to other version of windows. Custom KDE over Gnome. I do not like the fractured file system that Linux defaults to for program installations. Nor do I like most Linux fonts. XP was dead to me before this post even … | |
Re: Nightrain is an interesting Python wrapper of a PHP webserver running on localhost. It still uses up a port. Essentially, someone made a browser for PHP and burried all the browser elements to make it look like an application. Yes, it does allow you to make a 'application' looking thing. … | |
Re: Hello suneet, Judging by your question, I think you might need an ajax style request built into the page. But there is another option. You have a server / client interaction going on - php can only work on the server side, the client cannot interact directly. So, unless you … | |
Re: Hi Douglas, Do you have any examples of what you've tried to date? I could write something in PHP that talks to the API, but without your input, it won't truly be helpful. Maybe some of the code area where you are looking to add the API call for an … | |
Re: You are correct in your suspicion, you do need an SMTP server. If you are running in a Windows environment, the 'mail' function might use a built in Windows SMTP (which might need to be configured). Here is the PHP [documentation](http://php.net/manual/en/book.mail.php). More specifically, the [runtime configuration](http://php.net/manual/en/mail.configuration.php) Also, are you getting … | |
Re: Hi Ramsiva, this seems more like a Javascript question then a PHP question. If still relevant, I would suggest migrating this question there. | |
Re: Just an FYI: str_replace is much more efficient then preg_replace. It's like using a bulldozer vs. a shovel. (Also, please mark as solved, thank-you) | |
Re: To Ips's point, I would recommend [asort](http://php.net/manual/en/function.asort.php). It also helps to reduce the 'scope' of the issue. You have a double array, but only the sort on the outer array is relevant. I've removed everything else. Now, you may not need asort if you don't care about the index. The … | |
Re: You would need to connect to an external timeserver or use a third party app that connects to a time server. PHP only knows the time for the box it is on | |
Re: Hello, I do not see anything particularily tied to PHP in this question. This looks like a general problem that you are looking to have solved. I would suggest approaching the problem and asking for assistance on particular points. | |
Re: # Huge Disclaimer about security # The first, and most critical piece of information is that your query is vulnerable to an injection attack. In fact, your current problem is the equivalent to how an injection attack works. Here's a not quite appreviated rundown of how PHP interacts with SQL. … | |
Re: A join might be what you are looking for. In order to join, you need to identify a map between the each table. For offersescription and odoffersimagegallery it would likely be spaid. I cannot tell what it would be for spa. Sorry for typoes, on a phone atm. A join … | |
Re: It looks like this logic might be a little askew in cms.php: $something = isset($_POST['user_name'])?$_POST['user_name']:''; if($something) { $_SESSION['user_name']=$something; } As you are attempting to pull it out of the session in cms.php after the login, it should be $something = isset($_SESSION['user_name']) ? $_SESSION['user_name'] : null; if ($something === null) { … | |
Re: If you do want to continue using login.php to run your sql query, as you are populating a session variable, then you would need to use the session variable in cms.php to get the username back out. replace your 'post' check in cms.php with a $_SESSION check. if (isset($_SESSION['user_name'])) { … | |
Re: If you are inserting programmatically, you can determine the query failed then log the error and the query that you built to be sent to the server. Of course, you might be inserting a large collection, in which case you will need to use pritaeas' answer. | |
Re: Indeed, cursors are intrinsically slow (but don't lock tables as much). What is preventing you from using a set based approach? What does your dataset look like? Constructing this type of query depends entirely on how well formed your data is. | |
Re: # Background # The direct relationship between php and javascript is primarily one way. PHP on the server can be built out to print out javascript. However, javascript is a client side language. Once the code reaches the client, the only way to get back to the PHP is to … | |
Re: It is complaining because you have a 'where' clause at the end of an insert statement. You will want to change it to `INSERT INTO event(guest_num) VALUES('$total')`. You would only need a where clause if you were trying to update or select (pretty much where you need to check existing … | |
Re: Make certain your query string is building correctly, check for erros and based on [This](http://us3.php.net/mysqli_query) You might need to free the results. Change to free results: for ($i = 0; $i < count($stk); $i++) { $res[$i] = $stk[$i] - $qu[$i]; $result = mysqli_query($con, "UPDATE phar SET $stk = '$res[$i]' WHERE … | |
Re: Here's a stab at it with a previous and next button. There are probably pagination 'widgets' out there, and you could easily replace my hard coded JS with some jQuery. An alternate approach without JS would involve passing a variable and reloading the page. <?php $json = json_decode(file_get_contents("https://api.twitch.tv/kraken/channels/greatbritishbg/follows?limit=25")); $currentFollower = … | |
Re: Essentially, you want some way to keep track of the particular session (server side) from page to page (client side). Often this involves a session id that the client side tracks and the server side maintains. As suggested, you can keep track of a session id through a cookie. You … | |
Ok, here goes, I've got a staticwindow where I am putting the information from keyboard presses and onscreen button presses. When I run the program, I can press the keys and they show up just fine. I then press the button on the screen with my mouse which also works. … | |
Re: a char array needs to be assigned to a string. [CODE] //assuming null termination word[arraySize-1].assign(rawWord); [/CODE] | |
Re: You need to supply more information and understand the problem. Are you looking for a sum of areas of multiple circles, Or a printout of the different circles. Also, are these circles independent or overlapping. You need to understand the problem before you can achieve a solution. How would you … | |
Re: Looking for something unrelated and found your unresolved issue. Replying in case someone else bumps into it, or you still have the issue from many months ago. Essentially, the problem is where you are declaring your variables. In the GameManager.h, you are declaring them inside of the private member of … |