[PHP] Re: Send output before header location
>How can I output before send header >I see some site some output and after that it Jump to >other site >Is that maked by header localtion ?? no, if there\'s output first, then it\'s not using header(\"Location: whatever.php\"), because headers MUST be sent before any other output to the browser. there are other ways to redirect a user to another page: for example: http://www.yourdomain.com/index.html\";> you could use some javascript to do it too. -- 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] Send output before header location
How can I output before send header I see some site some output and after that it Jump to other site !! Is that maked by header localtion ??
php-general Digest 13 Jan 2002 07:34:05 -0000 Issue 1108
php-general Digest 13 Jan 2002 07:34:05 - Issue 1108 Topics (messages 80300 through 80334): mysql_fetch_row win32 to Linux 80300 by: sundogcurt 80312 by: mike cullerton Is DOMXML reliable?? 80301 by: Emile Bosch help with include 80302 by: Brian's News 80304 by: sundogcurt 80332 by: Mehmet Kamil ERISEN Re: Development environment 80303 by: Rafael Perazzo 80326 by: Zeev Suraski Event based applications? 80305 by: Morten Nielsen 80306 by: Andrew Brampton 80307 by: Matt Friedman Record Paging Using Arrays 80308 by: Joe Van Meer form get method 80309 by: Gerard Samuel Re: preg_replace help 80310 by: Boaz Yahav 80333 by: Gaylen Fraley Re: multiple replaces... 80311 by: Paul Roberts 80313 by: Dennis Moore 80318 by: Rambo Amadeus Please "\n" problem 80314 by: Dani 80315 by: Gianluca Baldo 80316 by: Dennis Moore Re: continue [PHP] Please "\n" problem 80317 by: Dani 80319 by: Thomas Holton Print ONCE ONLY? 80320 by: Dani 80321 by: Michael Kimsal 80322 by: Dennis Moore 80323 by: Michael Kimsal 80324 by: Pavel Kharitonov Thanks! Re: [PHP] Print ONCE ONLY? 80325 by: Dani Piping data into a select box 80327 by: Dean Householder 80330 by: hugh danaher 80334 by: Jimmy Time Zone Offset? 80328 by: Marvin Sanders form values and the back button 80329 by: Alastair Re: HTTP Server vars 80331 by: Alastair Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- Hi everybody, I have some scripts running on win32 Apache mySQL and they all run great. I have copied the entire application to my Linux box which I think I have running pretty smoothly now. The database is there and I can access it just fine etc etc. Here is the hitch (there's always a hitch) I can't get PHP to retrieve my data after a SELECT query. I know the query works simply by setting and displaying flags. It seems to choke on mysql_fetch_row. Here is an example. Here is a snippet I have written $myquery = "SELECT * FROM xpackage"; print "myquery = $myquery"; $myresult = mysql_query($myquery); while($myrowz = mysql_fetch_row($myresult)){ print "" . $myrowz[0] . ""; } On the win32 box (identical snippet and identical db on both machines) I get this back myquery = SELECT * FROM xpackage 62 61 60 59 58 57 56 55 54 53 115 114 127 126 111 125 On the Linux box I get this myquery = SELECT * FROM xpackage Warning: Supplied argument is not a valid MySQL result resource in /path to page with error/default.php on line 5 Line 5 is this part while($myrowz = mysql_fetch_row($myresult)){ I am at a total loss, I have not seen anywhere stating that mysql_fetch_row is depreciated, does anybody have anything to add to this to help me out? --- End Message --- --- Begin Message --- on 1/12/02 11:45 AM, sundogcurt at [EMAIL PROTECTED] wrote: > myquery = SELECT * FROM xpackage > Warning: Supplied argument is not a valid MySQL result resource in /path > to page with error/default.php on line 5 > > Line 5 is this part > while($myrowz = mysql_fetch_row($myresult)){ this tells me that $myresult is not a valid mysql result resource identifier. how do you obtain $myresult? -- mike cullerton --- End Message --- --- Begin Message --- Hi list, It seems like domxml is kinda unreliable to build an CMS with because in lotta versions the syntax is different :( Is DOMXML reliable?? Or should i use an alternative, does anyone know an alternative?? Warm regards, Emile Bosch --- End Message --- --- Begin Message --- Hi, I need some help with the include function. I have a phpBB script and want to put the config.inc.php file in a password protected directory, Easy peasy you might say, and I know it is, but the problem comes because the password protected directory isn't on the site the script is on, mainly because the host says I've got to upgrade my account to use password protected dir's. I've got one site with a password protected dir available and would like to put it on there. Any idea's how to do it would be appreciated. Many thanks Brian --- End Message --- --- Begin Message --- I think you can use a URL when you specify your value in the include statement, can you not? [EMAIL PROTECTED] wrote: >Hi, I need some help with the include function. >I have a phpBB script and want to put the config.inc.php file in a password >protected directory, Easy peasy you might say, and I know it is, but the >problem comes because the password protected directory isn't on the site the >script is on, mainly be
Re: [PHP] Piping data into a select box
Hi Dean, > Does anyone know how to give a select pulldown box a default value > from a PHP variable? "January","02"=>"February",...); // $option_list=generate_option_list($key_value,"02"); // //$option_list now contain text January // // February // // NOTE: This will only create the tag, without the tag // while ( list($key,$value) = each($key_value) ) { if ($key==$set) {$var.="$value";} else {$var.="$value";} } return $var; } ?> -- Jimmy Leave loved ones with loving words, it may be the last time you see them -- 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: preg_replace help
First of all, thanks to everyone who replied! I have several good suggestions. Here is one that seems to work pretty well, to cover a multitude of situations: $msg = eregi_replace("([[:alnum:]]+)://([^[:space:]]*)([[:alnum:]#?/&=])","\\1://\\2\\3", $msg); The only problem is that if a correctly formatted link is already in the text, then this routine tries to add an additional href and it gets all messed up. Is there any way that I can use this algorithm and logically tell it not to do the replace if the anchor tags are already in place? I can't just search for an anchor tag because there can be several in the text. Example: $myLink = "http://www.mytest.com\"; target=\"_n\">Testing"; echo makeLink($myLink); Creates $msg = http://www.mytest.com"; target="_blank">http://www.mytest.com" target="_n">Testing Any suggestions? "Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I have need to be able to replace text within a string to turn it into a > link. In other words, I might have a phrase lik: > > "blah, blah, blah, please visit my site at www.mysite.com. blah, > blah,blah". > > I need to have the string converted to "blah, blah, blah, please visit my > site at http://www.mysite.com. blah, blah,blah". The link might have more > than 3 sections and won't necessarily end in .com (.net,.com.nl, etc.). > > Here is what I have been testing (then I get stuck): > $myLink = "Please visit my web site at www.mysite.com. You will be glad you > did!"; > $repLink = preg_replace("/(www.)/i","http://\\1",$myLink); > > which yields > Please visit my web site at http://www.mysite.com. You will be glad > you did! > > What I would need is > Please visit my web site at href=http://www.mysite.com>www.mysite.com. You will be glad you did! > > To be truthful, pattern matching is giving me migraines! Programming has > always been natural to me (32 years of it), but this challenge (eregi, > preg_match,etc.) is making me crazy! Can someone recommend a good tutorial > or book on this subject? > > 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]
Re: [PHP] help with include
I have installed phpBB several times. Your problem should not be the password protected directory. The install.php script tries to wright into the config file. so, you have to chmod your file and give r/w access to everybody. once insallation is completed, then change it the was it was originally. if you give me the url, i can better understand your problem. erisen --- Brian's News <[EMAIL PROTECTED]> wrote: > Hi, I need some help with the include function. > I have a phpBB script and want to put the config.inc.php > file in a password > protected directory, Easy peasy you might say, and I know > it is, but the > problem comes because the password protected directory > isn't on the site the > script is on, mainly because the host says I've got to > upgrade my account to > use password protected dir's. > I've got one site with a password protected dir available > and would like to > put it on there. > > Any idea's how to do it would be appreciated. > > Many thanks > > Brian > > > > -- > 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] > = Mehmet Erisen http://www.erisen.com __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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: HTTP Server vars
I'm not exactly sure what you are asking.. Are you wondering if it is safer to have register_globals on or off? If it is off, you will have to access all the globals through the $HTTP_*_VARS variables. They are quite a bit safer but require a bit of getting used too (just look at my posts in the last few days..). cheers, alastair "Gerard Samuel" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hey all. I was wondering. Is it safe to use HTTP global variables ie > $HTTP_POST_VARS etc in my scripts? > Thought I read somewhere that they weren't safe. > Got a lot of forms to work with, it sure would make life easier... > -- 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]
Fw: [PHP] Piping data into a select box
- Original Message - From: hugh danaher <[EMAIL PROTECTED]> To: Dean Householder <[EMAIL PROTECTED]> Sent: Saturday, January 12, 2002 7:12 PM Subject: Re: [PHP] Piping data into a select box > Dean, give this a try. > > > "; > for ($i=0;$i<=$num;$i++) > { > print "".mysql_tablename($tables,$i); // or. i.e. > $some_array[$i] > } > print ""; > > echo "table ".$table; > > hugh > > > - Original Message - > From: Dean Householder <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, January 12, 2002 6:01 PM > Subject: [PHP] Piping data into a select box > > > Does anyone know how to give a select pulldown box a default value from a > PHP variable? > > I've been able to figure out how to pipe data into every type in > type of form element except for a element. Any solutions would be > helpful! > > Dean > > -- 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] form values and the back button
Is there a way to ensure that the data in a form is not cleared when you click the back button? I have numerous forms that all have some PHP error checking. The standard error page has a simple JavaScript back command. Every time I click it (or the browser's back button), it clears the form on the previous page. I really don't want to have to keep all the data and repopulate the form if I don't have to. thanks, alastair -- 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] Time Zone Offset?
Hopefully a quick question: I'm using the PHP date() function on my site, but since my hosting company (Pair Networks) is on the East Coast and I'm on the West Coast, everything shows as three hours later (for most of my visitors, anyway). Pair tells me there's no setting I can make on my account to change the server time zone. Can anyone recommend a way to set an offset for the date() function in PHP? (I searched on php.net and couldn't find anything.) Thanks for any help! Marvin -- 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] Piping data into a select box
Does anyone know how to give a select pulldown box a default value from a PHP variable? I've been able to figure out how to pipe data into every type in type of form element except for a element. Any solutions would be helpful! Dean
Re: [PHP] Development environment
At 06:00 PM 1/12/2002, Morten Nielsen wrote: >Hi, > >Can anybody recommend a good development environment? It should support PHP, >HTML and JavaScripts. http://www.zend.com/store/beta.php - it doesn't have any special JavaScript support, but it's by far the strongest one for PHP itself. Zeev -- 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] Thanks! Re: [PHP] Print ONCE ONLY?????
Thanks very much! it works! Sincerely, Dani Thomas Holton wrote: > You should be able to use "and" as many times as you want. > You should also make sure that the query you are making below is returning > the number of records you think it should be: > $numrecords = mysql_num_rows($result); > then you can set up a loop to get the results: > while ($i < $numrecords) > { $col_name = mysql_result($result, $i, "column name"); > .. > print "$col_name ..." > $i++; > # for each row > } > > hope this helps. > > .. > > On Sun, 13 Jan 2002, Dani wrote: > > > > > Hi Again! > > > > Why does this print only one record? > > > > 1. I have checked on the table on MYSQL and I have 2 records with this > > data. > > 2. Can I actually use the word "and" twice or three times for filtering > > the data that I need during query?? (example: $query = "select * from > > main_table where item_type = 'hotel' and class = 'melati' and price = > > '200' and facilities = 'swimming pool' " > > > > Could some body help please??? > > > > here is my code > > > > ... > > $query = "select * from main_table where item_type = 'hotel' and class = > > 'melati'"; > > $result = mysql_query($query); > > $row = mysql_fetch_array($result); > > echo "$row[item_id]",""; > > while ($row = mysql_fetch_array($result)) > > { > > echo "WHILE RESULT","$row[item_type]","","$row[class]"; > > } > > > > > > thank you again! > > > > regards, > > Dani > > > > > > > > -- > > 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 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: Print ONCE ONLY?????
I think this is actually the problem The first time you do $row = mysql_fetch_array($result); it reads the first row. Then you don't do anything with that data, but move on to the next one right away in the while: while ($row = mysql_fetch_array($result)) and only then you print out the data. So you are always skipping the first record. Sincerely, Pavel Kharitonov Project Manager Intechnic Corporation http://www.intechnic.com Phone: (847) 816-1231 -Original Message- From: Michael Kimsal [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 12, 2002 5:14 PM To: Dani Cc: PHP LIST Subject: [PHP] Re: Print ONCE ONLY? Dani wrote: > Hi Again! > > Why does this print only one record? > > 1. I have checked on the table on MYSQL and I have 2 records with this > data. > 2. Can I actually use the word "and" twice or three times for filtering > the data that I need during query?? (example: $query = "select * from > main_table where item_type = 'hotel' and class = 'melati' and price = > '200' and facilities = 'swimming pool' " > #2 - yes. that's what SQL is all about... #1 - Why do the $row=, then also do it in a while loop? Why not just do it in a while loop? I'm not sure that'd necessarily help in this case (most likely won't) but it would certainly be less typing in the future. Are you postive 2 rows match the 'hotel' and 'melati'? > Could some body help please??? > > here is my code > > ... > $query = "select * from main_table where item_type = 'hotel' and class = > 'melati'"; > $result = mysql_query($query); > $row = mysql_fetch_array($result); > echo "$row[item_id]",""; > while ($row = mysql_fetch_array($result)) > { > echo "WHILE RESULT","$row[item_type]","","$row[class]"; > } > Michael Kimsal PHP Training Courses http://www.tapinternet.com/php/ 734-480-9961 -- 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 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] Print ONCE ONLY?????
move the following inside your while loop echo "$row[item_id]",""; - Original Message - From: "Dani" <[EMAIL PROTECTED]> To: "PHP LIST" <[EMAIL PROTECTED]> Sent: Saturday, January 12, 2002 8:54 PM Subject: [PHP] Print ONCE ONLY? > > Hi Again! > > Why does this print only one record? > > 1. I have checked on the table on MYSQL and I have 2 records with this > data. > 2. Can I actually use the word "and" twice or three times for filtering > the data that I need during query?? (example: $query = "select * from > main_table where item_type = 'hotel' and class = 'melati' and price = > '200' and facilities = 'swimming pool' " > > Could some body help please??? > > here is my code > > ... > $query = "select * from main_table where item_type = 'hotel' and class = > 'melati'"; > $result = mysql_query($query); > $row = mysql_fetch_array($result); > echo "$row[item_id]",""; > while ($row = mysql_fetch_array($result)) > { > echo "WHILE RESULT","$row[item_type]","","$row[class]"; > } > > > thank you again! > > regards, > Dani > > > > -- > 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 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 ONCE ONLY?????
Dani wrote: > Hi Again! > > Why does this print only one record? > > 1. I have checked on the table on MYSQL and I have 2 records with this > data. > 2. Can I actually use the word "and" twice or three times for filtering > the data that I need during query?? (example: $query = "select * from > main_table where item_type = 'hotel' and class = 'melati' and price = > '200' and facilities = 'swimming pool' " > #2 - yes. that's what SQL is all about... #1 - Why do the $row=, then also do it in a while loop? Why not just do it in a while loop? I'm not sure that'd necessarily help in this case (most likely won't) but it would certainly be less typing in the future. Are you postive 2 rows match the 'hotel' and 'melati'? > Could some body help please??? > > here is my code > > ... > $query = "select * from main_table where item_type = 'hotel' and class = > 'melati'"; > $result = mysql_query($query); > $row = mysql_fetch_array($result); > echo "$row[item_id]",""; > while ($row = mysql_fetch_array($result)) > { > echo "WHILE RESULT","$row[item_type]","","$row[class]"; > } > Michael Kimsal PHP Training Courses http://www.tapinternet.com/php/ 734-480-9961 -- 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] Print ONCE ONLY?????
Hi Again! Why does this print only one record? 1. I have checked on the table on MYSQL and I have 2 records with this data. 2. Can I actually use the word "and" twice or three times for filtering the data that I need during query?? (example: $query = "select * from main_table where item_type = 'hotel' and class = 'melati' and price = '200' and facilities = 'swimming pool' " Could some body help please??? here is my code ... $query = "select * from main_table where item_type = 'hotel' and class = 'melati'"; $result = mysql_query($query); $row = mysql_fetch_array($result); echo "$row[item_id]",""; while ($row = mysql_fetch_array($result)) { echo "WHILE RESULT","$row[item_type]","","$row[class]"; } thank you again! regards, Dani -- 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: continue [PHP] Please "\n" problem????
The \n can be useful for when you want to look at the source code from an HTML page. It will not make a new line within the browser, but it sure can make reading the source alot easier... otherwise all of the code goes onto the same line... which also can be useful if you want it be difficult for others to take your source code! .. On Sun, 13 Jan 2002, Dani wrote: > Thanks Alot Guys!!! > It works! > > now my next question is : > > When do I actually use "\n"??? > > Thank you so much! > > Gianluca Baldo wrote: > > > Dani - > > > > D> echo "Result :\n"; ->>> THIS DOESN'T GIVE ME A > > D> NEW LINE- WHY ? > > If you look at the source code of your page you'll see a new line > > there. > > If you want a new line in the browser output, you must place a at > > that point, not a \n since it's HTML. > > > > Hope this helps. > > Gianluca > > > > D> //CONNECT TO SERVER > > D> include("connect.inc"); > > > > D> //CONNECT DATABASE > > D> include("select_db.inc"); > > > > D> $query = "select * from main_table where item_type = '$type' and class = > > D> '$class' "; > > D> $result = mysql_query($query); > > > > D> $row = mysql_fetch_array($result); > > > > D> echo ("$row[item_id]\n"); - THIS DOESN'T > > D> GIVE ME A NEW LINE EITHER, WHY ?? > > > > D> while ($row = mysql_fetch_array($result)) > > D> { > > D> echo "$row[item_type]" , "$row[class]"; > > D> } > > > > ?>> > > > > D> Any reply is greatly appriciated > > > > D> Regards, > > D> Dani > > > > -- > > ALBASOFTWARE > > C/ Mallorca 186 - 3º 1ª > > 08036 Barcelona (Spain) > > Tel./Fax +34 934549324 > > [EMAIL PROTECTED] > > http://www.gianlucabaldo.com > > http://www.phpauction.org > > > -- > 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 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] multiple replaces...
- Original Message - From: Dennis Moore <[EMAIL PROTECTED]> To: Paul Roberts <[EMAIL PROTECTED]>; Lauri Vain <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: 12. siječanj 2002 23:33 Subject: Re: [PHP] multiple replaces... > try str_replace() ... it allows you to pass an array into the replace > function. > > /dkm > > - Original Message - > From: "Paul Roberts" <[EMAIL PROTECTED]> > To: "Lauri Vain" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Saturday, January 12, 2002 4:35 PM > Subject: Re: [PHP] multiple replaces... > > > > have a look at eval() > > > > Paul Roberts > > [EMAIL PROTECTED] > > > > From: "Lauri Vain" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Saturday, January 12, 2002 11:44 AM > > Subject: [PHP] multiple replaces... > > > > > > Hello there, > > > > I have about 30 markers in the text which need to be replaced with the > value > > of a variable or an array. > > > > Common sense comes up with > > > eregi_replace("!one!","blah",eregi_replace("!heh!",'foobar',eregi_replace("b > > lah","ho-ho-ho",text))); > > > > The list above could go on and on... I'm sure there are better ways to > > replace many markers or spans of text with something else. A loop? > Something > > even more easier and better? > > > > Thanks, > > Lauri > > -- > > Tharapita Creations > > [dynamic web applications] > > [EMAIL PROTECTED] > > Mobile: +372 53 410 610 > > > > > > > > -- > > 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 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 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 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: continue [PHP] Please "\n" problem????
Thanks Alot Guys!!! It works! now my next question is : When do I actually use "\n"??? Thank you so much! Gianluca Baldo wrote: > Dani - > > D> echo "Result :\n"; ->>> THIS DOESN'T GIVE ME A > D> NEW LINE- WHY ? > If you look at the source code of your page you'll see a new line > there. > If you want a new line in the browser output, you must place a at > that point, not a \n since it's HTML. > > Hope this helps. > Gianluca > > D> //CONNECT TO SERVER > D> include("connect.inc"); > > D> //CONNECT DATABASE > D> include("select_db.inc"); > > D> $query = "select * from main_table where item_type = '$type' and class = > D> '$class' "; > D> $result = mysql_query($query); > > D> $row = mysql_fetch_array($result); > > D> echo ("$row[item_id]\n"); - THIS DOESN'T > D> GIVE ME A NEW LINE EITHER, WHY ?? > > D> while ($row = mysql_fetch_array($result)) > D> { > D> echo "$row[item_type]" , "$row[class]"; > D> } > > ?>> > > D> Any reply is greatly appriciated > > D> Regards, > D> Dani > > -- > ALBASOFTWARE > C/ Mallorca 186 - 3º 1ª > 08036 Barcelona (Spain) > Tel./Fax +34 934549324 > [EMAIL PROTECTED] > http://www.gianlucabaldo.com > http://www.phpauction.org -- 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] Please "\n" problem????
I assume you your displaying a web page. HTML ignores \n ... You need to insert a . - Original Message - From: "Dani" <[EMAIL PROTECTED]> To: "PHP LIST" <[EMAIL PROTECTED]> Sent: Saturday, January 12, 2002 8:25 PM Subject: [PHP] Please "\n" problem > Hi! > > thanks for reviewing this email. > > I have wrote this script and I have checked it but for some reasons (I > don't know what) it doesn't work. > > Could any body please check and give some feedback please? > > > include("heading.inc"); > > echo "Result :\n"; ->>> THIS DOESN'T GIVE ME A > NEW LINE- WHY ? > > > //CONNECT TO SERVER > include("connect.inc"); > > //CONNECT DATABASE > include("select_db.inc"); > > $query = "select * from main_table where item_type = '$type' and class = > '$class' "; > $result = mysql_query($query); > > $row = mysql_fetch_array($result); > > echo ("$row[item_id]\n"); - THIS DOESN'T > GIVE ME A NEW LINE EITHER, WHY ?? > > while ($row = mysql_fetch_array($result)) > { > echo "$row[item_type]" , "$row[class]"; > } > > ?> > > > Any reply is greatly appriciated > > Regards, > Dani > > > -- > 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 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] Please "\n" problem????
Dani - D> echo "Result :\n"; ->>> THIS DOESN'T GIVE ME A D> NEW LINE- WHY ? If you look at the source code of your page you'll see a new line there. If you want a new line in the browser output, you must place a at that point, not a \n since it's HTML. Hope this helps. Gianluca D> //CONNECT TO SERVER D> include("connect.inc"); D> //CONNECT DATABASE D> include("select_db.inc"); D> $query = "select * from main_table where item_type = '$type' and class = D> '$class' "; D> $result = mysql_query($query); D> $row = mysql_fetch_array($result); D> echo ("$row[item_id]\n"); - THIS DOESN'T D> GIVE ME A NEW LINE EITHER, WHY ?? D> while ($row = mysql_fetch_array($result)) D> { D> echo "$row[item_type]" , "$row[class]"; D> } ?>> D> Any reply is greatly appriciated D> Regards, D> Dani -- ALBASOFTWARE C/ Mallorca 186 - 3º 1ª 08036 Barcelona (Spain) Tel./Fax +34 934549324 [EMAIL PROTECTED] http://www.gianlucabaldo.com http://www.phpauction.org -- 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] Please "\n" problem????
Hi! thanks for reviewing this email. I have wrote this script and I have checked it but for some reasons (I don't know what) it doesn't work. Could any body please check and give some feedback please? >> THIS DOESN'T GIVE ME A NEW LINE- WHY ? //CONNECT TO SERVER include("connect.inc"); //CONNECT DATABASE include("select_db.inc"); $query = "select * from main_table where item_type = '$type' and class = '$class' "; $result = mysql_query($query); $row = mysql_fetch_array($result); echo ("$row[item_id]\n"); - THIS DOESN'T GIVE ME A NEW LINE EITHER, WHY ?? while ($row = mysql_fetch_array($result)) { echo "$row[item_type]" , "$row[class]"; } ?> Any reply is greatly appriciated Regards, Dani -- 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] multiple replaces...
try str_replace() ... it allows you to pass an array into the replace function. /dkm - Original Message - From: "Paul Roberts" <[EMAIL PROTECTED]> To: "Lauri Vain" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Saturday, January 12, 2002 4:35 PM Subject: Re: [PHP] multiple replaces... > have a look at eval() > > Paul Roberts > [EMAIL PROTECTED] > > From: "Lauri Vain" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, January 12, 2002 11:44 AM > Subject: [PHP] multiple replaces... > > > Hello there, > > I have about 30 markers in the text which need to be replaced with the value > of a variable or an array. > > Common sense comes up with > eregi_replace("!one!","blah",eregi_replace("!heh!",'foobar',eregi_replace("b > lah","ho-ho-ho",text))); > > The list above could go on and on... I'm sure there are better ways to > replace many markers or spans of text with something else. A loop? Something > even more easier and better? > > Thanks, > Lauri > -- > Tharapita Creations > [dynamic web applications] > [EMAIL PROTECTED] > Mobile: +372 53 410 610 > > > > -- > 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 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 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] mysql_fetch_row win32 to Linux
on 1/12/02 11:45 AM, sundogcurt at [EMAIL PROTECTED] wrote: > myquery = SELECT * FROM xpackage > Warning: Supplied argument is not a valid MySQL result resource in /path > to page with error/default.php on line 5 > > Line 5 is this part > while($myrowz = mysql_fetch_row($myresult)){ this tells me that $myresult is not a valid mysql result resource identifier. how do you obtain $myresult? -- mike cullerton -- 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] multiple replaces...
have a look at eval() Paul Roberts [EMAIL PROTECTED] From: "Lauri Vain" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 12, 2002 11:44 AM Subject: [PHP] multiple replaces... Hello there, I have about 30 markers in the text which need to be replaced with the value of a variable or an array. Common sense comes up with eregi_replace("!one!","blah",eregi_replace("!heh!",'foobar',eregi_replace("b lah","ho-ho-ho",text))); The list above could go on and on... I'm sure there are better ways to replace many markers or spans of text with something else. A loop? Something even more easier and better? Thanks, Lauri -- Tharapita Creations [dynamic web applications] [EMAIL PROTECTED] Mobile: +372 53 410 610 -- 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 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] preg_replace help
Here are some scripts to help you : http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1235 http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1234 http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1401 http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1403 Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Gaylen Fraley [mailto:[EMAIL PROTECTED]] Sent: Saturday, January 12, 2002 5:20 AM To: [EMAIL PROTECTED] Subject: [PHP] preg_replace help I have need to be able to replace text within a string to turn it into a link. In other words, I might have a phrase lik: "blah, blah, blah, please visit my site at www.mysite.com. blah, blah,blah". I need to have the string converted to "blah, blah, blah, please visit my site at http://www.mysite.com. blah, blah,blah". The link might have more than 3 sections and won't necessarily end in .com (.net,.com.nl, etc.). Here is what I have been testing (then I get stuck): $myLink = "Please visit my web site at www.mysite.com. You will be glad you did!"; $repLink = preg_replace("/(www.)/i","http://\\1",$myLink); which yields Please visit my web site at http://www.mysite.com. You will be glad you did! What I would need is Please visit my web site at http://www.mysite.com>www.mysite.com. You will be glad you did! To be truthful, pattern matching is giving me migraines! Programming has always been natural to me (32 years of it), but this challenge (eregi, preg_match,etc.) is making me crazy! Can someone recommend a good tutorial or book on this subject? 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 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] form get method
Hey all. I was making a menu, and I was using too many links, so I figure use a form with drop down lists. Im trying to use the form using the get method. echo ''; It doesn't seem to behave correctly. Can one use test.php?ft=first in the action of a get form?? It works great if I make a hidden field for ft=first. Was just wondering.. -- 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] Record Paging Using Arrays
Hi there, I have a small php/data driven website and would like to incorporate record paing. Unfortunately I'm working with sql Server temporarily, but I'm still required to do this. So since I wasn't allowed to use the handy LIMIT in my sql statement I figured I'd dump my results into a mulitdiensional array and navigate through the records that way. I know this propbabbly isn't the best method, but it's the way I have to do it for now. I've managed to display my records out of the array, but would now like to incorporate a "next' and a 'previous' button to navigate through the array. Can someone take a look at my code below and tell me how I'm to go about doing this? I thought maybe by having 2 functions that would advance my array pointer and another to retreat the pointer would do the trick. I'm unsure how to incorporate it. I've added two functions within the below, not sure if they are appropriate or not though. Thx Joe :) Code: if(!isset($consultantarray)){ //connect to db $connectionToDB = odbc_connect("cdxcffcoltant", "jo7gecon", "josje7con"); //create query statement $sqls = "SELECT consultantid, firstname, lastname, city, stateprovince, country, category, yearsexp FROM CONSULTANT WHERE category ='$category' ORDER BY yearsexp DESC" ; //execute the sql statement (query) on the connection made $resultset = odbc_do($connectionToDB, $sqls); //initialize the consultant arrays $consultantdetailsarray[] = array(); $consultantarray[] = array(); //initialize a variable to zero for start of array below in while loop $x = 0; // while there is still results fetch the data from the database --- while loop while(odbc_fetch_row($resultset)){ $consultantdetailsarray[0] = odbc_result($resultset, 1); $consultantdetailsarray[1] = odbc_result($resultset, 2); $consultantdetailsarray[2] = odbc_result($resultset, 3); $consultantdetailsarray[3] = odbc_result($resultset, 4); $consultantdetailsarray[4] = odbc_result($resultset, 5); $consultantdetailsarray[5] = odbc_result($resultset, 6); $consultantdetailsarray[6] = odbc_result($resultset, 7); $consultantdetailsarray[7] = odbc_result($resultset, 8); //dump each consultant into the new array called $consultantarray $consultantarray[$x] = $consultantdetailsarray; //increment to next element of array $x++; } } * function nextFive(&$array, $number){ for ($counter = 0; $counter < $number; $counter++){ next($array); } } function previousFive(&$array, $number){ for ($counter = 0; $counter < $number; $counter++){ prev($array); } } * //loop through the elements of retrieved array (2nd one holding the consultant details) //second loop to grab through $consultant details array elements foreach($consultantarray as $y){ list($cid, $firstname, $lastname, $city, $stateprovince, $country, $category, $yearsexp) = $y; print "" . $firstname . " " . $lastname . "" . $city . "" . $stateprovince . "" . $country . "" . $category . "" . $yearsexp . ""; } -- 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] Event based applications?
JavaScript runs on the client, PHP runs at the server. PHP cannot access client side events directly. JavaScript cannot access the database (actually it can through Internet Explorer, but that's different story...) You'll use a combo of both languages. Matt Friedman Web Applications Developer www.SpryNewMedia.com Email: [EMAIL PROTECTED] -Original Message- From: Morten Nielsen [mailto:[EMAIL PROTECTED]] Sent: Saturday January 12, 2002 1:37 PM To: [EMAIL PROTECTED] Subject: [PHP] Event based applications? Hi, I am about to make an homepage. It is going to be very event based. When the user presses different buttons different functions should be called. At the same time I am going to use a database to store some data. My question is: Should I use PHP or JavaScripts? I would like to have a server based page, but PHP doesn't support the event driven methods like JavaScripts. Please send your comments, Morten -- 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 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] Event based applications?
How do you plan to place stuff in a database without using a "Server based page"? I think you will need to use a combination of the 2. Make the JScript call PHP pages to do the handling of your events. Andrew - Original Message - From: "Morten Nielsen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 12, 2002 7:36 PM Subject: [PHP] Event based applications? > Hi, > > I am about to make an homepage. It is going to be very event based. When the > user presses different buttons different functions should be called. > At the same time I am going to use a database to store some data. > My question is: Should I use PHP or JavaScripts? > I would like to have a server based page, but PHP doesn't support the event > driven methods like JavaScripts. > > Please send your comments, > Morten > > > > -- > 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 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] Event based applications?
Hi, I am about to make an homepage. It is going to be very event based. When the user presses different buttons different functions should be called. At the same time I am going to use a database to store some data. My question is: Should I use PHP or JavaScripts? I would like to have a server based page, but PHP doesn't support the event driven methods like JavaScripts. Please send your comments, Morten -- 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] help with include
I think you can use a URL when you specify your value in the include statement, can you not? [EMAIL PROTECTED] wrote: >Hi, I need some help with the include function. >I have a phpBB script and want to put the config.inc.php file in a password >protected directory, Easy peasy you might say, and I know it is, but the >problem comes because the password protected directory isn't on the site the >script is on, mainly because the host says I've got to upgrade my account to >use password protected dir's. >I've got one site with a password protected dir available and would like to >put it on there. > >Any idea's how to do it would be appreciated. > >Many thanks > >Brian > > > -- 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] Development environment
I know two good IDEs for PHP: PhpEdit -> http://www.phpedit.com PhpCode -> http://www.phpide.de Have fun!! Rafael Perazzo --- Morten Nielsen <[EMAIL PROTECTED]> wrote: > Hi, > > Can anybody recommend a good development > environment? It should support PHP, > HTML and JavaScripts. > Another question...Is it normal procedure to mix the > above 3 languages on a > single page or is it possible to only use 1...i.e > PHP? > > Regards, > Morten __ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- 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] help with include
Hi, I need some help with the include function. I have a phpBB script and want to put the config.inc.php file in a password protected directory, Easy peasy you might say, and I know it is, but the problem comes because the password protected directory isn't on the site the script is on, mainly because the host says I've got to upgrade my account to use password protected dir's. I've got one site with a password protected dir available and would like to put it on there. Any idea's how to do it would be appreciated. Many thanks Brian -- 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] Is DOMXML reliable??
Hi list, It seems like domxml is kinda unreliable to build an CMS with because in lotta versions the syntax is different :( Is DOMXML reliable?? Or should i use an alternative, does anyone know an alternative?? Warm regards, Emile Bosch -- 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] mysql_fetch_row win32 to Linux
Hi everybody, I have some scripts running on win32 Apache mySQL and they all run great. I have copied the entire application to my Linux box which I think I have running pretty smoothly now. The database is there and I can access it just fine etc etc. Here is the hitch (there's always a hitch) I can't get PHP to retrieve my data after a SELECT query. I know the query works simply by setting and displaying flags. It seems to choke on mysql_fetch_row. Here is an example. Here is a snippet I have written $myquery = "SELECT * FROM xpackage"; print "myquery = $myquery"; $myresult = mysql_query($myquery); while($myrowz = mysql_fetch_row($myresult)){ print "" . $myrowz[0] . ""; } On the win32 box (identical snippet and identical db on both machines) I get this back myquery = SELECT * FROM xpackage 62 61 60 59 58 57 56 55 54 53 115 114 127 126 111 125 On the Linux box I get this myquery = SELECT * FROM xpackage Warning: Supplied argument is not a valid MySQL result resource in /path to page with error/default.php on line 5 Line 5 is this part while($myrowz = mysql_fetch_row($myresult)){ I am at a total loss, I have not seen anywhere stating that mysql_fetch_row is depreciated, does anybody have anything to add to this to help me out? -- 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-general Digest 12 Jan 2002 18:34:40 -0000 Issue 1107
php-general Digest 12 Jan 2002 18:34:40 - Issue 1107 Topics (messages 80266 through 80299): two mysql issues :) 80266 by: Mehmet Kamil ERISEN Re: preg_replace help 80267 by: Jimmy Re: Newbie looking for mentor 80268 by: P. Westover Re: PHP question regarding Cold Fusion 80269 by: Philip Olson 80289 by: Wandrer 80290 by: bvr.xs4all.nl name and value tags in a form 80270 by: Kunal Jhunjhunwala 80274 by: Nick Wilson 80275 by: Kunal Jhunjhunwala 80276 by: Nick Wilson 80279 by: Kunal Jhunjhunwala HTTP Server vars 80271 by: Gerard Samuel OT kind of.. 80272 by: Richard Baskett 80273 by: Rasmus Lerdorf Fatal error: Cannot instantiate non-existent class 80277 by: millw0rm 80280 by: Nick Wilson Fatal Error 80278 by: millw0rm multiple replaces... 80281 by: Lauri Vain 80282 by: Nick Wilson 80283 by: Lauri Vain 80285 by: Nick Wilson 80286 by: DL Neil 80287 by: bvr.xs4all.nl 80291 by: Victor Boivie Whoops (was:RE: [PHP] multiple replaces...) 80284 by: Lauri Vain Re: multiple replaces... (2) 80288 by: bvr.xs4all.nl Development environment 80292 by: Morten Nielsen 80293 by: Nick Wilson Mysql('mydb", "SHOW TABLES FROM mydbname") ??? 80294 by: Chris 80296 by: Miles Thompson beginer 80295 by: Vania Lavielle Castro 80297 by: Vania Lavielle Castro 80299 by: Deron DUH Why didn't I see that? 80298 by: Chris Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- --- Begin Message --- Hi All, I am in sql mode today. Two issues that bother me: 1- I had a script" select user_id, username from users having user_id = max(user_id) my max user_id = 150 or something, but script kept bringing 122 I fixed the issue by using a select max(user_id) and select username from users where user_id = $v_user_id 2- select max(commission) where territory=1 and salesperson=2232; this query should return 0 zero b/c it's a sum. but it returns null. any comments how I can work around this!!! thanks. Mehmet Erisen http://www.erisen.com - Do You Yahoo!? Send FREE video emails in Yahoo! Mail. --- End Message --- --- Begin Message --- Hi Gaylen, > Please visit my web site at href=http://www.mysite.com>www.mysite.com. You will be glad you did! assumming all link start with www and all word which start with www must be a link: $repLink = preg_replace("/ (www[^ ]*) /i", "\\1", $myLink); -- Jimmy People are like clouds, all unique. --- End Message --- --- Begin Message --- Hi All, Thank you very much for all the responses to my SOS. Yoda has made contact. P. Westover "P. Westover" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > It all started when I wanted to create a photography competition and forum > on my web site. I searched and searched for a program (script) on the web > that would help me. > > I found one and paid $125.00 for it, but I am very unhappy with the way it > works. It is not very user friendly and I'm loosing potential members > because of it. I have asked the programmer to assist me in creating it the > way I want it, he said he would, > I have yet to see the updates I requested. So I've taken it upon myself to > create a script tailored to my needs. > > I have written HTML, some JavaScript, and very little CGI. I thought I > could handle creating this script. I went to my nearest Barnes and Noble > and bought 5 books on PHP and MySQL. I have been reading them for 2 weeks > and doing the lessons in one of the books until I'm bleary eyed. I have a > basic understanding, but I don't know where to begin. > > I'm looking for someone with a little patience, who can get me on the right > path and guide me through. I don't know what I can give you in return...we > can talk about it if you're interested. > > P. Westover > > --- End Message --- --- Begin Message --- On Fri, 11 Jan 2002, Rasmus Lerdorf wrote: > Google for something called PostToHost I wrote ages ago. Lots of > variations of that around. Basically you just fsockopen() to the site in > question and fputs() your request and POST data and then fgets() the > result. With one variation being sendtohost() http://dodds.net/~cardinal/sendtohost.txt regards, Philip Olson --- End Message --- --- Begin Message --- At 09:43 PM 1/11/02 -0500, you wrote: >The tag I am talking about is . This tag allows you to emulate the >posting of a form, but also allows you to capture t
[PHP] Re: beginer
Go to http://www.interakt.ro/products/PHAkt/index.php for a kick butt PHP development platform extension for DW Ulreadev! Deron Creation Nation "Vania Lavielle Castro" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I need a file php.ini and some advices about configuration of a web server > as internet information server to use php. Also i need to know how use the > sqlserver 2000 on my php's pages. > i use Dreamweaver UltraDev 4 too and i think that i must configurate it. > > thanks vania. > > -- 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] DUH!!!! Why didn't I see that?
DUH Why didn't I see that.. Thanks.. Chris Miles Thompson wrote: > Well, did you try looping though tables with mysql_fetch_array($tables)? > > But, how 'bout mysql_list_tables()? > > Cheers - Miles Thompson > > PS There's a bunch of other interesting stuff relating to database > manipulation there too. /mt > > At 11:48 AM 1/12/2002 -0800, Chris wrote: > >I'm trying to display the tables in my database using $tables = > >mysql('mydb", "SHOW TABLES FROM mydbname") but this statement doesn't > >seem to behave like selecting records from a table. Does this query > >return an array of table names? If I use something like $records = > >mysql('mydb", "SELECT * FROM sometable) everything works fine. There > >must be something I'm missing about the SHOW query. > > > >Thanks > >Chris Williams > > > > > >-- > >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 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] beginer
I need a file php.ini and some advices about configuration of a web server as internet information server to use php. Also i need to know how use the sqlserver 2000 on my php's pages. i use Dreamweaver UltraDev 4 too and i think that i must configurate it. thanks vania. -- 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] Mysql('mydb", "SHOW TABLES FROM mydbname") ???
Well, did you try looping though tables with mysql_fetch_array($tables)? But, how 'bout mysql_list_tables()? Cheers - Miles Thompson PS There's a bunch of other interesting stuff relating to database manipulation there too. /mt At 11:48 AM 1/12/2002 -0800, Chris wrote: >I'm trying to display the tables in my database using $tables = >mysql('mydb", "SHOW TABLES FROM mydbname") but this statement doesn't >seem to behave like selecting records from a table. Does this query >return an array of table names? If I use something like $records = >mysql('mydb", "SELECT * FROM sometable) everything works fine. There >must be something I'm missing about the SHOW query. > >Thanks >Chris Williams > > >-- >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 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] beginer
i have a sql server and i connected with my database but the query no execute on server. my code is it $conexion = @mssql_connect("servername","username","userpass"); // this work if($conexion){ $db = mssql_select_db("Estudiante",$conexion); $qr = mssql_query("select * from tasignatura",$conexion); // this not work the query no execute on the server // here i wanna print the first field of the rows result of the query while($fila = mssql_fetch_row($qr)){ echo $fila[0] } -- 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] Mysql('mydb", "SHOW TABLES FROM mydbname") ???
Im trying to display the tables in my database using $tables = mysql(mydb, SHOW TABLES FROM mydbname) but this statement doesnt seem to behave like selecting records from a table. Does this query return an array of table names? If I use something like $records = mysql(mydb, SELECT * FROM sometable) everything works fine. There must be something Im missing about the SHOW query. Thanks Chris Williams -- 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] Development environment
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 12-01-02 at 17:00 * Morten Nielsen said > Hi, > > Can anybody recommend a good development environment? It should support PHP, > HTML and JavaScripts. What do you mean by 'development enviornment'? > Another question...Is it normal procedure to mix the above 3 languages on a > single page or is it possible to only use 1...i.e PHP? Well, how would you propose you displayed your pages without HTML/XHTML? It is normal, but not advisable to mix the three. You might enjoy this page http://www.explodingnet.com/articles/latest/7/ HTH Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8QF74HpvrrTa6L5oRAo7AAJ4wMMUiPYN5tt8fY1BCecIHP2b9bwCgsqWY BTWVYMl4hvdtYugHZoaCjjQ= =SW2m -END PGP SIGNATURE- -- 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] Development environment
Hi, Can anybody recommend a good development environment? It should support PHP, HTML and JavaScripts. Another question...Is it normal procedure to mix the above 3 languages on a single page or is it possible to only use 1...i.e PHP? Regards, Morten -- 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] multiple replaces...
If you only want to replace strings, then drop the regular expression functions! (a common mistake) Use for example str_replace, or in this case, strtr which is better because it accepts an array as replacement pattern. For example: $foo = array("foo" => "apple", "bar" => "banana"); $string = "I like foos and bars"; $string = strtr($string, $foo); echo $string; output: I like apples and bananas // Victor - Original Message - From: "'Nick Wilson'" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 12, 2002 1:17 PM Subject: Re: [PHP] multiple replaces... > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > * On 12-01-02 at 13:02 > * Lauri Vain said > > > Hi Nick, > > > > Yes, I thought about that. But, what should I do when the markers are absolutely >NOT in any sequence. > > > > I also thought about something like > > $replace[1][1] = "!one!"; //marker > > $replace[1][2] = "hehee"; //replace with > > $replace[1][1] = "test"; //marker > > $replace[1][2] = "foobar"; //replace with > > $replace[1][1] = "repl"; //marker > > $replace[1][2] = "humpty-dumpty"; //replace with > > $replace[1][1] = "blah"; //marker > > $replace[1][2] = "boo"; //replace with > > > > Now, when I would do a loop thingie that goes through all those, then it would be >a pretty nice and compact solution... > > > > What about speed issues regarding this solution? > > I don't think speed will be an issue unless you have thousands of > markers, in which case you'll need to re-think the whole thing. > > Can you not put all of your markers in an array like > > $markers=array("m1", "m2", "m_whatever"); > > and all your replacements likewise > > $replace=array("r1", "r2", "r_whatever"); > > and then loop through like that? > > If not, explain a little more about the context of the problem and let's > see if we can come up with an alternative. > - -- > > Nick Wilson > > Tel: +45 3325 0688 > Fax: +45 3325 0677 > Web: www.explodingnet.com > > > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.0.6 (GNU/Linux) > Comment: For info see http://www.gnupg.org > > iD8DBQE8QCk+HpvrrTa6L5oRAozIAJ4opVPFNwawBmQNIAHLZN/gdCt+lgCeLgmC > 5hurUMezrXCg3cVtYgieGGE= > =xRPE > -END PGP SIGNATURE- > > -- > 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 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] PHP question regarding Cold Fusion
I believe another option is the CURL library module for PHP. see manual: XII. CURL, Client URL Library Functions bvr. On Sat, 12 Jan 2002 09:01:39 -0500, Wandrer wrote: >At 09:43 PM 1/11/02 -0500, you wrote: >>The tag I am talking about is . This tag allows you to emulate the >>posting of a form, but also allows you to capture the results of the post. >>There are a couple of forms written in CF that connect to the merchant >>account, check a credit card, for example, and then wait for the >>approval/denial response. >>Is there anything in PHP that can do this same kind of thing? Any help >>would be appreciated. > >Check out Snoopy - http://snoopy.sourceforge.net/ > > > >-- >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 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] PHP question regarding Cold Fusion
At 09:43 PM 1/11/02 -0500, you wrote: >The tag I am talking about is . This tag allows you to emulate the >posting of a form, but also allows you to capture the results of the post. >There are a couple of forms written in CF that connect to the merchant >account, check a credit card, for example, and then wait for the >approval/denial response. >Is there anything in PHP that can do this same kind of thing? Any help >would be appreciated. Check out Snoopy - http://snoopy.sourceforge.net/ -- 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] multiple replaces... (2)
And so does preg_replace() if you need any regular expressions. Though str_replace() is probably faster when this is not the case. http://www.php.net/manual/en/function.str-replace.php http://www.php.net/manual/en/function.preg-replace.php bvr. -- 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] multiple replaces...
No need to loop. str_replace() already supports arrays! check the manual. bvr. On Sat, 12 Jan 2002 12:57:10 -, DL Neil wrote: >Yes, I thought about that. But, what should I do when the markers are absolutely NOT >in any sequence. > >=sequence would matter if it was possible that one of the markers could replace some >text and that replacement >subsequently became the marker for a further replacement ... nightmare=recursion! > >I also thought about something like >$replace[1][1] = "!one!"; //marker >$replace[1][2] = "hehee"; //replace with >$replace[1][1] = "test"; //marker >$replace[1][2] = "foobar"; //replace with >$replace[1][1] = "repl"; //marker >$replace[1][2] = "humpty-dumpty"; //replace with >$replace[1][1] = "blah"; //marker >$replace[1][2] = "boo"; //replace with > >Now, when I would do a loop thingie that goes through all those, then it would be a >pretty nice and compact >solution... > >What about speed issues regarding this solution? > >=check out string functions. On simple stuff they will beat RegEx for speed hands >down - but watch out if >case-sensitivity is relevant. > >=dn > > > >-- >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 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] multiple replaces...
Yes, I thought about that. But, what should I do when the markers are absolutely NOT in any sequence. =sequence would matter if it was possible that one of the markers could replace some text and that replacement subsequently became the marker for a further replacement ... nightmare=recursion! I also thought about something like $replace[1][1] = "!one!"; //marker $replace[1][2] = "hehee"; //replace with $replace[1][1] = "test"; //marker $replace[1][2] = "foobar"; //replace with $replace[1][1] = "repl"; //marker $replace[1][2] = "humpty-dumpty"; //replace with $replace[1][1] = "blah"; //marker $replace[1][2] = "boo"; //replace with Now, when I would do a loop thingie that goes through all those, then it would be a pretty nice and compact solution... What about speed issues regarding this solution? =check out string functions. On simple stuff they will beat RegEx for speed hands down - but watch out if case-sensitivity is relevant. =dn -- 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] multiple replaces...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 12-01-02 at 13:02 * Lauri Vain said > Hi Nick, > > Yes, I thought about that. But, what should I do when the markers are absolutely NOT >in any sequence. > > I also thought about something like > $replace[1][1] = "!one!"; //marker > $replace[1][2] = "hehee"; //replace with > $replace[1][1] = "test";//marker > $replace[1][2] = "foobar"; //replace with > $replace[1][1] = "repl";//marker > $replace[1][2] = "humpty-dumpty"; //replace with > $replace[1][1] = "blah";//marker > $replace[1][2] = "boo"; //replace with > > Now, when I would do a loop thingie that goes through all those, then it would be a >pretty nice and compact solution... > > What about speed issues regarding this solution? I don't think speed will be an issue unless you have thousands of markers, in which case you'll need to re-think the whole thing. Can you not put all of your markers in an array like $markers=array("m1", "m2", "m_whatever"); and all your replacements likewise $replace=array("r1", "r2", "r_whatever"); and then loop through like that? If not, explain a little more about the context of the problem and let's see if we can come up with an alternative. - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8QCk+HpvrrTa6L5oRAozIAJ4opVPFNwawBmQNIAHLZN/gdCt+lgCeLgmC 5hurUMezrXCg3cVtYgieGGE= =xRPE -END PGP SIGNATURE- -- 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] Whoops (was:RE: [PHP] multiple replaces...)
Whoops, forgot to change the first number in every one of those. The first numbers in the brackets should increase after every two lines... The correct one: $replace[1][1] = "!one!"; //marker $replace[1][2] = "hehee"; //replace with $replace[2][1] = "test";//marker $replace[2][2] = "foobar"; //replace with $replace[3][1] = "repl";//marker $replace[3][2] = "humpty-dumpty"; //replace with $replace[4][1] = "blah";//marker $replace[4][2] = "boo"; //replace with Now, when I would do a loop thingie that goes through all those, then it would be a pretty nice and compact solution... What about speed issues regarding this solution? Yours, Lauri -- Tharapita Creations [dynamic web applications] [EMAIL PROTECTED] Mobile: +372 53 410 610 -- 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] multiple replaces...
Hi Nick, Yes, I thought about that. But, what should I do when the markers are absolutely NOT in any sequence. I also thought about something like $replace[1][1] = "!one!"; //marker $replace[1][2] = "hehee"; //replace with $replace[1][1] = "test";//marker $replace[1][2] = "foobar"; //replace with $replace[1][1] = "repl";//marker $replace[1][2] = "humpty-dumpty"; //replace with $replace[1][1] = "blah";//marker $replace[1][2] = "boo"; //replace with Now, when I would do a loop thingie that goes through all those, then it would be a pretty nice and compact solution... What about speed issues regarding this solution? Yours, Lauri -- Tharapita Creations [dynamic web applications] [EMAIL PROTECTED] Mobile: +372 53 410 610 -Original Message- From: Nick Wilson [mailto:[EMAIL PROTECTED]] Sent: 12. jaanuar 2002. a. 13:53 To: [EMAIL PROTECTED] Subject: Re: [PHP] multiple replaces... If the 'markers' are in some kind of sequence (like marker1, marker2 etc) you could use a loop. -- 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] multiple replaces...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 12-01-02 at 12:49 * Lauri Vain said > Hello there, > > I have about 30 markers in the text which need to be replaced with the value of a >variable or an array. > > Common sense comes up with >eregi_replace("!one!","blah",eregi_replace("!heh!",'foobar',eregi_replace("blah","ho-ho-ho",text))); > > > The list above could go on and on... I'm sure there are better ways to replace many >markers or spans of text with something else. A loop? Something even more easier and >better? > > Thanks, > Lauri If the 'markers' are in some kind of sequence (like marker1, marker2 etc) you could use a loop. - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8QCOJHpvrrTa6L5oRAu8zAJ0ae4AFomhUhUaK8MneNdm/BtnTNACfXhGh 9FydYCt1iS/rmBh83LyBWHs= =CQIT -END PGP SIGNATURE- -- 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] multiple replaces...
Hello there, I have about 30 markers in the text which need to be replaced with the value of a variable or an array. Common sense comes up with eregi_replace("!one!","blah",eregi_replace("!heh!",'foobar',eregi_replace("blah","ho-ho-ho",text))); The list above could go on and on... I'm sure there are better ways to replace many markers or spans of text with something else. A loop? Something even more easier and better? Thanks, Lauri -- Tharapita Creations [dynamic web applications] [EMAIL PROTECTED] Mobile: +372 53 410 610 -- 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] Fatal error: Cannot instantiate non-existent class
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 12-01-02 at 11:10 * millw0rm said > i hav just upgraded from php3 to php4 > > i m getting this error through out my website what can be the problem... can > anyone help me out > > Fatal error: Cannot instantiate non-existent class Let's see the line in question? - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8QBKrHpvrrTa6L5oRAtd2AJ9y4GurINpqh6HLT6wj7rcACGxthgCaAnxw rI2cVPX/pFJUmaviMzaZft4= =TG8d -END PGP SIGNATURE- -- 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] name and value tags in a form
Hey, Did the trick. Thanks! Regards, Kunal Jhunjhunwala - Original Message - From: "Nick Wilson" <[EMAIL PROTECTED]> To: "php-list" <[EMAIL PROTECTED]> Sent: Saturday, January 12, 2002 3:30 PM Subject: Re: [PHP] name and value tags in a form > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > * On 12-01-02 at 10:54 > * Kunal Jhunjhunwala said > > > Hi, > > Here is an example form field: > > > > Forgot Password Subject: > VALUE="kunal"> > > > > Now, I want my php script or get the field name, that is fname, and whatever > > the user entered, in this case kunal. I can easiuly get kunal by echoing > > $fname. But, how do i get what $fname is called :) I dunno how to explain. I > > want the field to get the field name automatically. > > You probably want to have a look at the $HTTP_POST_VARS (I think that's > it) array. See the manual under variables. > > HTH > - -- > > Nick Wilson > > Tel: +45 3325 0688 > Fax: +45 3325 0677 > Web: www.explodingnet.com > > > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.0.6 (GNU/Linux) > Comment: For info see http://www.gnupg.org > > iD8DBQE8QAk1HpvrrTa6L5oRAqfdAJ95ZALl/nmXRfNMo+pJxEsfElTPZACfSCa6 > 1j+W0FkdxLMYpwdeCGKkH0w= > =CXzK > -END PGP SIGNATURE- > > -- > 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 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] Fatal Error
i hav just upgraded from php3 to php4 i m getting this error through out my website what can be the problem... can anyone help me out Fatal error: Cannot instantiate non-existent class -- 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] Fatal error: Cannot instantiate non-existent class
i hav just upgraded from php3 to php4 i m getting this error through out my website what can be the problem... can anyone help me out Fatal error: Cannot instantiate non-existent class -- 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] name and value tags in a form
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 12-01-02 at 10:54 * Kunal Jhunjhunwala said > Hi, > Here is an example form field: > > Forgot Password Subject: VALUE="kunal"> > > Now, I want my php script or get the field name, that is fname, and whatever > the user entered, in this case kunal. I can easiuly get kunal by echoing > $fname. But, how do i get what $fname is called :) I dunno how to explain. I > want the field to get the field name automatically. You probably want to have a look at the $HTTP_POST_VARS (I think that's it) array. See the manual under variables. HTH - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8QAk1HpvrrTa6L5oRAqfdAJ95ZALl/nmXRfNMo+pJxEsfElTPZACfSCa6 1j+W0FkdxLMYpwdeCGKkH0w= =CXzK -END PGP SIGNATURE- -- 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] name and value tags in a form
Hi, Here is an example form field: Forgot Password Subject: Now, I want my php script or get the field name, that is fname, and whatever the user entered, in this case kunal. I can easiuly get kunal by echoing $fname. But, how do i get what $fname is called :) I dunno how to explain. I want the field to get the field name automatically. Regards, Kunal Jhunjhunwala - Original Message - From: "Nick Wilson" <[EMAIL PROTECTED]> To: "php-list" <[EMAIL PROTECTED]> Sent: Saturday, January 12, 2002 3:15 PM Subject: Re: [PHP] name and value tags in a form > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > * On 12-01-02 at 10:18 > * Kunal Jhunjhunwala said > > > Hey, > > Is there any way one can get the name tags for a form?? other then > > explicitly defining the tags in an array or any such thing. I just want to > > be able to get the name tags and there values dynamically... > > Regards, > > Kunal Jhunjhunwala > - -- > > Can you give an example of what you want, your message is a little hard > to visualize :) > > > Nick Wilson > > Tel: +45 3325 0688 > Fax: +45 3325 0677 > Web: www.explodingnet.com > > > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.0.6 (GNU/Linux) > Comment: For info see http://www.gnupg.org > > iD8DBQE8QAW1HpvrrTa6L5oRAiNnAJoCE97Luc/3gLREt+cSVge7SDRdOQCfU8bS > 3QZ+uPRtiTp1ZPRwj2ovnrA= > =3PVM > -END PGP SIGNATURE- > > -- > 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 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] name and value tags in a form
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 12-01-02 at 10:18 * Kunal Jhunjhunwala said > Hey, > Is there any way one can get the name tags for a form?? other then > explicitly defining the tags in an array or any such thing. I just want to > be able to get the name tags and there values dynamically... > Regards, > Kunal Jhunjhunwala - -- Can you give an example of what you want, your message is a little hard to visualize :) Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8QAW1HpvrrTa6L5oRAiNnAJoCE97Luc/3gLREt+cSVge7SDRdOQCfU8bS 3QZ+uPRtiTp1ZPRwj2ovnrA= =3PVM -END PGP SIGNATURE- -- 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] OT kind of..
Includes are not relative to your DocumentRoot. They are system paths. A ScriptAlias would have absolutely no effect. -Rasmus On Sat, 12 Jan 2002, Richard Baskett wrote: > Ok I have looked everywhere to try to figure out why I get the stupid > warning: > > Warning: Failed opening '/phpinc/query.inc' for inclusion > (include_path='.:/usr/local/lib/php') in /Users/murlyn/Sites/bakos/ > index.htm on line 2 > > Ok I know that it's because it can't find the script, but my problem lies in > the Apache httpd.conf file. I put in a ScriptAlias, I put in an Alias in > this fashion: > > Alias /phpinc "/Users/murlyn/Sites/bakos/phpinc" > > And same with ScriptAlias, neither of them works! > > Any help would be appreciated! Thanks! :) And again sorry for it being off > topic.. sort of.. I have searched for the last two days on why this wouldnt > work and I've tried everything I could think of.. so I am going to you guys > and gals since you are all a bunch of geniuses anyways :) > > Rick > > > -- > 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 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] OT kind of..
Ok I have looked everywhere to try to figure out why I get the stupid warning: Warning: Failed opening '/phpinc/query.inc' for inclusion (include_path='.:/usr/local/lib/php') in /Users/murlyn/Sites/bakos/ index.htm on line 2 Ok I know that it's because it can't find the script, but my problem lies in the Apache httpd.conf file. I put in a ScriptAlias, I put in an Alias in this fashion: Alias /phpinc "/Users/murlyn/Sites/bakos/phpinc" And same with ScriptAlias, neither of them works! Any help would be appreciated! Thanks! :) And again sorry for it being off topic.. sort of.. I have searched for the last two days on why this wouldnt work and I've tried everything I could think of.. so I am going to you guys and gals since you are all a bunch of geniuses anyways :) Rick -- 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 Server vars
Hey all. I was wondering. Is it safe to use HTTP global variables ie $HTTP_POST_VARS etc in my scripts? Thought I read somewhere that they weren't safe. Got a lot of forms to work with, it sure would make life easier... -- 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]