boompa
Members-
Posts
305 -
Joined
-
Last visited
-
Days Won
1
Everything posted by boompa
-
Looks like a test or homework question. Can you figure it out by adding the line I put there? <?php $val = ‘1.2.3.4.5.6.7.8.9.10.11.12’; $arr[] = array(‘a’=>explode(‘.’,$val)); print_r($arr); ?>
-
You need to append the app child to the root element <?php $doc = new DOMDocument("1.0"); $doc->formatOutput = true; // Create root element $root = $doc->createElement("Applications"); // Append the root element to the document $doc->appendChild($root); // Create the child element $child = $doc->createElement( "app" ); // Append the child to the root element $attr = $root->appendChild($child); $attr->setAttribute("AppName", "NotePad++"); echo $doc->saveXML();
- 2 replies
-
- php
- web design
-
(and 1 more)
Tagged with:
-
Try the MySQL forum.
-
$resource = mysql_query($query); if (!$resource) { echo json_encode(array('error' => mysql_error(), 'query' => $query)); exit(); }
-
Get rid of superfish div after php execution
boompa replied to dani33l_87's topic in PHP Coding Help
I'm confused as to whether this is the Superfish jQuery plugin or is somehow related to this Superfish, which is image-related, but doesn't appear to be for developers? More likely the OP is using a browser extension which is including Superfish's adware, like here. -
Get rid of superfish div after php execution
boompa replied to dani33l_87's topic in PHP Coding Help
What browser are you seeing this in? -
Try reading this to get an understanding of what you need to do: http://techoctave.com/c7/posts/60-simple-long-polling-example-with-javascript-and-jquery
-
Sending php results to the end user through email
boompa replied to tamanna's topic in PHP Coding Help
You should also consider using a third-party mail library like PHPMailer or SwiftMailer, which will ensure the mail is properly composed and avoid getting lost in anti-spam filters.- 4 replies
-
- run php in background
-
(and 3 more)
Tagged with:
-
Here's a good comparison article: http://www.rackspace.com/knowledge_center/article/mysql-engines-myisam-vs-innodb I would go with InnoDB for transaction and foreign key support, as well as row-level locking (if two people are editing a ticket, you don't want one overwriting the other's changes).
-
$this->db->fetch_array($this->db->query("SELECT * FROM `settings` WHERE `ident`='skype-api-url'")) This construct sucks anyway, because what if the query fails?
-
$sqlSetning="INSERT INTO Kvarterbestilt(Møtt) WHERE Personnummer='$personnummer' VALUES ('$møtt');"; If you want to change the value of an existing record, you use an UPDATE query, not an INSERT: $sqlSetning="UPDATE Kvarterbestilt SET Møtt="'$møtt'" WHERE Personnummer='$personnummer'";
-
You don't. You need to do some study on database work, because you have some misconceptions of how they work and should be used. Here's something for you to read to get started.
-
How to get this script in a lower version of PHP
boompa replied to alpha_01's topic in PHP Coding Help
Then apply bsmither's advice for starters...to every code that uses a function return as an array directly, like myFunction()[0] -
In that doc you linked, under the API Best Practices heading is an entry "Use Multiple Queries to Retrieve Over 500 Records" that tells you how to do your original task. For the following, use isset() to check if that property is set?
-
Fact is at this point he or she shouldn't be using the mysql_ functions at all as they're deprecated, instead opting for PDO or mysqli. Also, not sure exactly what the goal is, but nested queries are never a good sign.
-
You appear to be missing a }. Next time, please copy and paste the exact error.
-
A little story of my situation and a multi-array help.
boompa replied to mustiej's topic in PHP Coding Help
The URLs in your ean.php file are badly formed, resulting in no ean number: http://blah/11.php?ean= I am guessing that the 11.php should be index.php as well. -
using file_get_contents - is there a way to output progress
boompa replied to imran0's topic in PHP Coding Help
Pretty sure you could do it with cURL and the CURLOPT_PROGRESSFUNCTION callback or the CURLOPT_WRITEFUNCTION callback -
If you look at the manual for mysqli_query, you'll see that it takes an extra first variable.
-
Quick example: <?php $conn = ftp_connect("ftp2.bom.gov.au"); if (!$conn) { echo "Couldn't connect to server\n"; return 1; } if (ftp_login($conn, "anonymous", "test@example.com")) { $files = ftp_nlist($conn, "anon/gen/radar"); foreach($files as $file) { print("File: $file\n"); } }
-
Jeez, you've been at this for a while! Why haven't you taken requinix's advice and fixed the exploit?
-
It's just a copy/paste from a very bad online tutorial (to which I won't link; doesn't deserve it).
-
Why wouldn't you just try it??? SMH
-
OK, that was a massive code posting fail, as you can see. Try reposting your code, because what you've got there is useless as it stands. Also, if this is a payout question, it more likely belongs in the CSS Help forum, or perhaps the HTML Help forum.
-
If you look at the manual page for the file() function, you'll see that it returns FALSE on failure. I suspect that is the case here.
- 3 replies
-
- shuffle()
- switch statement
-
(and 3 more)
Tagged with: