Re: [PHP] Re-directing
Todd Cary wrote: In my Index.html, what do I write so that the Surfer goes to my Start.Php? It should work to have this after your opening HTML tag in index.html: meta http-equiv=refresh content=0; url=start.php / -- 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] Hidden Input and Quotes?
Jason Caldwell wrote: If I have a text box and enter data into that text box with quotes around some of the text... and I want to throw that text into a HTML Hidden Input Field (on my next screen for example) -- the quotes will somehow jackup or truncate that text... because HTML uses quotes within in the Hidden Input Field. So my question is, should I (or, really, can I) encode it? My thinking is I want to encode it with the htmlspecialchars() function... however, eventually, all the data within the Hidden Input Boxes will be stored into my mySQL database, so I'll want to decode it before I send it (restoring the quotes)... is there a way to decode the htmlspecialchars() function? Or, is there a better way to do this (*without* creating a session)? -- I want to use Hidden Input Fields. An easier thing to do would be *not* to use htmlspecialchars(), but instead replace all instances of with quot; . That's assuming your hidden input field uses instead of ' to quote the attribute values. You can just do: ereg_replace(\, quot;, $data); Then you don't have to decode anything to restore the quotes and other characters that have been changed. The quot; will be translated back into when your form is submitted. Young -- 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] Hidden Input and Quotes?
Jason Caldwell wrote: The quot; will be translated back into when your form is submitted. ?? I don't have to convert back?? -- when I eventually submit my Hidden Input Fields into my mySQL DB, they'll be converted back to ? Confused If you have input type=hidden name=data value=The word quot;herequot; is in quotes. /, then when you submit your form, $HTTP_POST_VARS[data] or $HTTP_GET_VARS[data] will be: The word \here\ is in quotes. So you can put the value straight into MySQL. The slashes will not show up in MySQL. The browser converted the quot; into , and PHP for some reason (I still don't know why) adds slashes before your ' and characters. If you use the value elsewhere (aside from just inserting it into MySQL), you'll have to use the stripslashes() function to get rid of the slashes. -- 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] grep all pages
Yamin Prabudy wrote: Hi there I like to know can i grep a page say on http://www.somedomain.com (just the index.html) if it's possible can any guru out there enlight me how to do that I haven't done what you're trying myself, but the info on these two pages might be helpful: http://www.php.net/manual/en/features.remote-files.php http://www.php.net/manual/en/function.preg-grep.php -- 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] Generating XML
Hi, I'm trying to write a script that generates XML dynamically and is viewable in a browser (IE). Even though I send a header saying Content-type: text/xml\n, PHP still puts in a Content-type of text/html before that. How can I write the script so that this doesn't happen? Here's the script: ?php header(Content-type: text/xml\n); echo EOS ?xml version=1.0 encoding=UTF-8? test blahdf/blah /test EOS; ? Thanks so much for your help! (If you could cc a reply to my e-mail address, that'd be really appreciated.) Young -- 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] HTTP message
Is it possible from PHP to look at the HTTP message sent to a script? If so, how can I do it? e.g.: POST /MessageReceiver.jsp HTTP/1.0 Host: www.SomeHost.net Content-Type: application/x-www-form-urlencoded Content-Length: 105 XML=%3C?xml%20version%3D%221.0%22%20encoding%3D%22utf-8%22?%3E%0A%3Cdoc%3Ehello%20world%3E%3C/doc%3E%0A -- 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]