Search found 14 matches
- Tue May 17, 2011 7:13 pm
- Forum: PHP - Code
- Topic: What could be wrong with my SSL encrypt call?
- Replies: 1
- Views: 315
What could be wrong with my SSL encrypt call?
Hi all. I'm having problems encrypting with RSA on both the client and server side. To troubleshoot, I just wanted to encrypt a test string. But the resulting encrypted version is empty, no matter what I do. The public key here ($pubKey) is good; I had additional lines to test whether it was null. T...
- Sun Nov 21, 2010 11:45 pm
- Forum: PHP - Code
- Topic: ARG! How do you pass parameters AND a file in HTTP POST?
- Replies: 7
- Views: 3706
Re: ARG! How do you pass parameters AND a file in HTTP POST
How data gets into the $_POST array is by the web site visitor submitting the form. Thanks for responding, but please note from my original post: I'm sending files to a PHP upload page using HTTP post from C++ So there is no Web site, and no form to submit. The HTTP POST message is being built in C...
- Fri Nov 19, 2010 10:38 pm
- Forum: PHP - Code
- Topic: ARG! How do you pass parameters AND a file in HTTP POST?
- Replies: 7
- Views: 3706
simply pull the destination directory data value out of the $_POST array Thanks. The question is, how does it get into that array? Can you include parameters in the URL just as you would with a GET? UPDATE: Nope. Parameters in the URL aren't parsed for a POST. It looks like you need form fields, an...
- Fri Nov 19, 2010 5:30 pm
- Forum: PHP - Code
- Topic: ARG! How do you pass parameters AND a file in HTTP POST?
- Replies: 7
- Views: 3706
Re: ARG! How do you pass parameters AND a file in HTTP POST
Exactly. I know what happens currently, and I have hard-coded the PHP page to put the uploaded file in a particular place. But some uploads from my app need to go to different places.Are you wanting the receiving PHP page to move your uploaded file to that directory?
- Fri Nov 19, 2010 4:18 pm
- Forum: PHP - Code
- Topic: ARG! How do you pass parameters AND a file in HTTP POST?
- Replies: 7
- Views: 3706
ARG! How do you pass parameters AND a file in HTTP POST?
Hi all. This seems to be an oft-asked but never clearly answered question on the Web. I'm sending files to a PHP upload page using HTTP post from C++, and I also want to send the name of the directory I want the file stored in. I don't know where to put that directory-name string in the POST message...
- Sat Nov 13, 2010 9:36 pm
- Forum: PHP - Code
- Topic: How do we get NULL into date columns w. prepared statements?
- Replies: 1
- Views: 469
How do we get NULL into date columns w. prepared statements?
Hi all. I can't figure out how to get NULLs into MySQL date columns using prepared statements. Neither an empty string nor "NULL" result in a null entry in the DB; the columns wind up with 00-00-00 dates. There's no default value set on the column in the DB, nulls are allowed, and other ro...
- Sat Nov 13, 2010 8:01 pm
- Forum: PHP - Code
- Topic: Can we get old-style result rows from prepared statements?
- Replies: 2
- Views: 233
yeah
OK, the workaround works fine. Here's an example. Right after you call execute() on your prepared statement, hand it to something like this (you don't need $rowName; it's just a string I'm using to label the XML structure I'm building): function resultSetToXML(&$stmt, $rowName) { $data = mysqli_...
- Sat Nov 13, 2010 6:39 pm
- Forum: PHP - Code
- Topic: Can we get old-style result rows from prepared statements?
- Replies: 2
- Views: 233
Re: Can we get old-style result rows from prepared statement
It looks like this is a pretty major omission from mysqli, discussed here: http://www.greebo.net/2010/01/02/conver ... statements
However, people have posted some workarounds in the user notes here:
http://php.net/manual/en/mysqli-stmt.fetch.php#82742
However, people have posted some workarounds in the user notes here:
http://php.net/manual/en/mysqli-stmt.fetch.php#82742
- Sat Nov 13, 2010 6:15 pm
- Forum: PHP - Code
- Topic: Can we get old-style result rows from prepared statements?
- Replies: 2
- Views: 233
Can we get old-style result rows from prepared statements?
Hi all. I want to use prepared statements to issue queries, but process the result rows without binding hard-coded variables to them. My pre-mysqli code iterated through result rows and returned each column name and value as XML elements: foreach($row as $key => $val) { $this->writer->writeElement($...
- Sat Nov 13, 2010 6:08 pm
- Forum: PHP - Code
- Topic: mysqli prepared statement help
- Replies: 1
- Views: 216
same
I have the same problem. Started a new thread with a more descriptive title.
- Sat Nov 13, 2010 5:36 pm
- Forum: PHP - Code
- Topic: Why is PHP escaping already-escaped single quotes?
- Replies: 7
- Views: 582
Re: Why is PHP escaping already-escaped single quotes?
Thanks. I've already starting switching over to prepared statements and mysqli, so the code has now changed and this is most likely moot. If it comes up again, I'll post the relevant code.
- Sat Nov 13, 2010 3:27 pm
- Forum: PHP - Code
- Topic: Why is PHP escaping already-escaped single quotes?
- Replies: 7
- Views: 582
Re: Why is PHP escaping already-escaped single quotes?
magic_quotes of all kinds were already off, so I guess the original question remains: Why did PHP add the slashes to begin with?
- Sat Nov 13, 2010 3:01 pm
- Forum: PHP - Code
- Topic: Why is PHP escaping already-escaped single quotes?
- Replies: 7
- Views: 582
Re: Why is PHP escaping already-escaped single quotes?
Thanks for the replies, guys.
- Thu Nov 11, 2010 4:30 am
- Forum: PHP - Code
- Topic: Why is PHP escaping already-escaped single quotes?
- Replies: 7
- Views: 582
Why is PHP escaping already-escaped single quotes?
Hi all.
I'm trying to pass some params through a URL, and some have to be single-quoted for SQL. I find that even if I URL-encode the quotes, PHP converts them to \'
Why, and is there a workaround other than post-processing every incoming parameter to replace the \' with '
Thanks!
I'm trying to pass some params through a URL, and some have to be single-quoted for SQL. I find that even if I URL-encode the quotes, PHP converts them to \'
Why, and is there a workaround other than post-processing every incoming parameter to replace the \' with '
Thanks!