[PHP] Retrieving newly created ID from MySQL?
If I have a MySQL table with an auto-incrementing ID field, is there an easy way to retrieve the new ID after I insert a new row into the table? For example, if I insert a row into a table with ID, Title, & Content fields, is there a way I can get the ID value without doing a separate select where the Title & Content fields are equal to the values I just inserted? -Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PGP?
Any way in PHP to grab form info and then encrypt it with PGP before sending it out as an email? -Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Temporarily turning off magic quotes?
If I have magic quotes turned on for post/get/etc. in my php.ini, is there any way to temporarily turn it off for one page? For example, I have a preview page inbetween my data entry page and the page that actually saves to db. I don't want magic quotes turned on when going from the data entry to the preview page since all quotes keep getting backslashed. Is there a way to do this? -Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Escaping double quotes?
How do you escape double quotes? I have the following which is supposed to make any " in a string into \" but it doesn't seem to work. What's wrong with it? $tmp_string = str_replace ("\"", "\\\"", $tmp_string); -Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Retrieving data from multiple select list
I have a select box that allows the user to select and submit more than one selection at a time. How do I retrieve all the selections in PHP? For example, the select list is named CategoryID. But when I select more than one item and then hit submit, $CategoryID only shows me the last value of the selected items. How do I see all the values that have been selected? -Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Retrieving data from multiple select list
Yeah I saw this in the online manual but is there any other way of doing this that doesn't require naming the select box in HTML with a [] at the end? Cause I have another button that calls a JavaScript to select all the options within CategoryID[] and it doesn't seem to work cause it's looking for a CategoryID[] array instead of a select box named CategoryID[]. -Ben P.S. Please send responses directly to my email address as well since I'm in digest mode. Thanks. At 10:05 AM +0100 3/11/01, Edi Murfy wrote: >try this: > >in the form: > >Item 1 >Item 2 >Item 3 > > >in the script: >$num = sizeof($CategoryID); // Number of array items >for($i=0;$i<$num;$i++) > { > // $CategoryID[$i] --> whatever you wanna do with it... > } > > > >"Ben Cheng" <[EMAIL PROTECTED]> schrieb im Newsbeitrag >news:p05010402b6d0b285663b@[10.10.0.169]... >> I have a select box that allows the user to select and submit more >> than one selection at a time. How do I retrieve all the selections >> in PHP? For example, the select list is named CategoryID. But when >> I select more than one item and then hit submit, $CategoryID only >> shows me the last value of the selected items. How do I see all the > > values that have been selected? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Targetted redirection?
I have a page within a frame that uses Header() to redirect to another page. However, I don't want the redirection to take place just within that frame set. I want the page that it redirects to to cover over the frame. Is this possible? -Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Catching error from mail function?
Hi I'm using the mail() function to send email and I know it's failing because it's returning a false but how do I tell what problem is? Is there an error message that I can grab that will show me why the function is returning false? Any help greatly appreciated. Thanks! -Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php