[PHP] Re: Form Name Attribute Help!
Kal Amry <[EMAIL PROTECTED]> wrote: > If I have a form in named formName1 such as: > > > > How can I get the name "formName1" from within file.php you can't. but you can add a hidden form field to each form to pass along a value. for example: ... (then you can just access $form in file.php to figure out which form was submitted.) jim -- 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] Re: Windows/UNIX differences?
Ben Edwards <[EMAIL PROTECTED]> wrote: > Have a regular expression which replaces ' with '' (used to insert ' into db): > preg_replace("/\'/", "''", $text ); > This works great on the UNIX production machine but not on windows > development environment. Actually replaces ' with \'' not ''. > > Before I write a function that loops thought the whole thing looking at > each character and replaces ' with '' has anybody got any ideas? rather than preg_replace behaving differently on windows and unix, it seems more likely that your windows install of php has 'magic_quotes_gpc' set on in php.ini, and the unix install has it set to off. jim -- 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] Re: PHP slash Apache question?
Michael Champagne <[EMAIL PROTECTED]> wrote: > Great, thanks for the response Jim. Would there possibly be a way around this > using mod_rewrite? no. if you'll check your logs, you'll see that the request is never even making it to your server. internet explorer simply barfs on urls that include a port but don't include a scheme. jim -- 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] Re: PHP slash Apache question?
Michael Champagne <[EMAIL PROTECTED]> wrote: > Ok, this is semi-related to PHP. I think it may mainly be our Apache > configuration. We have our listener listening on . > > This URL works: http://hostname.capis.com:/ > This URL does not: hostname.capis.com:/ > > Is there anyway to get the bottom one to work? not without the source to internet explorer. it is a shortcoming of their url parsing (it mistakes the latter format for scheme:host instead of host:port). jim -- 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] Re: GPL and The PHP License
Fábio migliorini <[EMAIL PROTECTED]> wrote: > 2) Can I write a program in php and to distribute it under the gpl license? yes. jim -- 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] Re: Math Inside Strings
Kevin P <[EMAIL PROTECTED]> wrote: > echo " value='$currentPosition+1'>"; > > can anyone tell me how to get this to stop printing: > > echo ""; -- 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] Re: Eregi for Image
Jeff Oien <[EMAIL PROTECTED]> wrote: > I want to check if an uploaded file is an image. This isn't working. > Could anyone help me out? > > if (!eregi("\\.gif$", $img1_name) || > !eregi("\\.jpg$", $img1_name) || > !eregi("\\.jpeg$", $img1_name)) { >error message > } unless you expect the file to have three extensions at once, you probably mean && for each of the places you wrote ||. or you could do this: if (!ereg("\\.(gif|jpe?g)$", $img1_name)) { error message } jim -- 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] Re: Stripping line break characters
Rory O'Connor <[EMAIL PROTECTED]> wrote: > $sql2=str_replace("","\n",$sql2); > $sql2=str_replace("","\r",$sql2); you've got the first two arguments backwards. $sql2=str_replace("\n","",$sql2); $sql2=str_replace("\r","",$sql2); or with php4.0.5 (or later): $sql2=str_replace(array("\n","\r"),"",$sql2); for more details: http://www.php.net/manual/en/function.str-replace.php jim -- 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] Re: print_r question
James <[EMAIL PROTECTED]> wrote: > When I print an array out with print_r (php 4.06 on IIS 4.0) it does not > print newlines even if newlines are embedded in the array element. I must > embed , instead. it probably is printing the newlines, but in html, newlines are treated like any other whitespace, and do not always cause a new line. you can wrap your output in "" to preserve the newlines. jim -- 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] Re: order of update??
Gerard Samuel <[EMAIL PROTECTED]> wrote: > My seem stupid to some, but when running > update tablename set x='$x', y='$y', z='$z' where a=$a; > Does it matter if it the set were in backwards order ie z, y, x ?? the order does not matter. (although unless you're sure $a is an integer value, you may want to wrap it in quotes, too.) jim -- 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] Re: Newbie Question re: Select boxes
Lb <[EMAIL PROTECTED]> wrote: > 1) I thought that PHP automatically created variables for all form elements > on a page. When I run this, the dropdown box contains the first item, but > $Report evaluates as null. I am unclear why. > > > 1 Test Report A > 2 Test Report B > 3 Test Report C > > you have set the value for each option to an empty string. you probably mean either 'Test Report A' or '1 Test Report A'. > 2) Is there any way for PHP to detect the change even on the dropdown, or do > I need to use javascript? you have to use javascript. jim -- 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] Re: hello and a question
Kevin Keeler <[EMAIL PROTECTED]> wrote: > $entry_hidden = eregi_replace(".+","",$entry); try: $entry_hidden = preg_replace("|.+?|i","",$entry); ".+" is 'greedy', meaning it consumes as much as text as it can. with perl-like regular expressions, you can add a trailing "?" which makes the + and * operators non-greedy. jim -- 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] Re: virtual() ignoring str_replace()
Charlie Romero <[EMAIL PROTECTED]> wrote: > $results = virtual("/cgi-bin/search.cgi?q=hello&m=world"); virtual doesn't return the content of the subrequest, it sends it to the browser. you need to use something like popen() to do what you're trying to do. jim -- 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] Re: PHP Newsgroup?
Alexander Skwar <[EMAIL PROTECTED]> wrote: > Is there a PHP newsgroup around? I'm not talking about the ones at > news.php.net, btw. > > Or is alt.php the "official" newsgroup? the only thing resembling official newsgroups are those at news.php.net. jim -- 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] remove me from php list
the unsubscribe address works exactly as advertised, if you can be bothered to read the directions. 347 people have managed to do so this month. (and 372 have managed to subscribe, so i guess the list is growing.) otherwise, you can always contact the list administrators, the address for which is also at the bottom of every message. they don't act as quickly as the automated unsubscribe, but they'll get to your request eventually. > To contact the list administrators, e-mail: [EMAIL PROTECTED] (and, as a general rule, none of the list adminstrators pay attention to unsubscribe requests sent to the mailing lists themselves.) jim Maxim Maletsky <[EMAIL PROTECTED]> wrote: > HA HA HA! > > That was a good one, Jason... > > -maxim maletsky > > > > -Original Message- > From: Jason Bell [mailto:[EMAIL PROTECTED]] > Sent: Thursday, July 19, 2001 4:30 AM > To: danny brown; [EMAIL PROTECTED] > Subject: Re: [PHP] remove me from php list > > > remove yourself. :) > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > - Original Message - > From: "danny brown" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, July 18, 2001 12:25 PM > Subject: [PHP] remove me from php list > > >> thanks -- 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] Re: Manual building/snapshot
Chris Lott <[EMAIL PROTECTED]> wrote: > Since nothing seems to be available at snaps.php.net/manual I grabbed the > phpdoc cvs tree. Could anyone who is building their own manual tell me what > I need to build it? I'm running RedHat Linux 7.1 egon answered the question about what you need, but you may want to keep in mind that the docs available at http://www.php.net/docs.php are built every day (if there have been changes to that particular translation) or weekly. obviously, when the documentation is not in a buildable state, it is not updated, which is why several of the translations have fallen slightly behind. jim -- 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]