php-general Digest 11 Feb 2001 07:34:05 -0000 Issue 505 Topics (messages 39087 through 39108): Re: PROBLEM TO CONNECT MYSQL... 39087 by: jason cox Parsing XML 39088 by: Steve Haemelinck mod_rewrite starts driving me crazy ... 39089 by: Maxim Maletsky Parsing XML the Sequel :) 39090 by: Steve Haemelinck 39098 by: Matt McClanahan Re: my bugaboo. 39091 by: Floyd Baker 39100 by: Shane McBride 39104 by: Anna 39105 by: Josh G how to alter assoc_array? 39092 by: Jaxon 39093 by: jason cox 39095 by: Jaxon ibm-db2 connect failure 39094 by: Bill Sneed CAN YOU ADVERTISE TO OVER 20 MILLION E-MAIL ADDRESSES? 39096 by: Luke6 sub 39097 by: claesson set user & group quota; fork or multithreading? 39099 by: Felix C.Courtemanche Re: include("blah.php?var=this"); doesn't work?! 39101 by: Anna Re: shows up in IE but not Netscape 39102 by: Erik Boles newline processing problem? 39103 by: nphyre.evernex.com Re: db forms creator? 39106 by: Jeffrey A. Stuart 39108 by: Maciek Uhlig passthru environment variables 39107 by: Rich Puchalsky 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] ----------------------------------------------------------------------
Felipe, You need to login with the root account to mysql and then issue the following commands where "user1" is the user that your modifying and "pass1" is the new password. after you've logged in successfully as root, issue the following commands: use mysql; update user set password=Password("pass1") where User='user1'; Hope that helps. Jason --- Felipe Lopes <[EMAIL PROTECTED]> wrote: > I have a problem to connect mysql... > Now, when I try login to Mysql it says that my > user-password is wrong. > So I need to know what is the "equation" to delete, > or to change, my > password-user? > What is the "equation" to insert a user after I > delete my last user? > Thank you again!!! > > Felipe Lopes > MailBR - O e-mail do Brasil -- > http://www.mailbr.com.br > Faça já o seu. É gratuito!!! > > -- > 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] __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
I want to parse an XML from nasdaq, but I allways get a blank page when doing so. I also get the notice: undefined index when parsing. What does this mean?
Hello guys, I know it is not exactly a PHP problem, it is about apache's mod_rewrite which after 4 hours of tentative till 3.30am starts making me think that I need a LONG vacation ... I know it's easy... I read all the docs dozens of times and I *feel* that I am very close to the solution ... please help. ... Here: my system: Win2k, Apache 1.3.14, (my test server) my problem: in the virtual host of httpd.conf I added the following: RewriteEngine On RewriteRule ^(/index.html)$ /start.php?go=$1 This works perfectly, however what I really need to do is to make it work not only with /index.html but with everything typed in your browser... (index.html was only a test to let me know I am in a right direction) I tried: RewriteRule ^(.*) /start.php?go=$1 RewriteRule ^(.*)$ /start.php?go=$1 RewriteRule ^(.+) /start.php?go=$1 RewriteRule ^(.+)$ /start.php?go=$1 RewriteRule ^(/.*) /start.php?go=$1 RewriteRule ^(/.*)$ /start.php?go=$1 RewriteRule ^(/.+) /start.php?go=$1 RewriteRule ^(/.+)$ /start.php?go=$1 ...non of these worked .... while something's telling me it had to.... Is that a flag that I need ? (I've tried some combinations of these - didn't work either, I think I need to confirm it by someone) please help me with that, I know many of you have done it already... or I am going to dream about apachectl restart tonight .... Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com
The page I want to parse is: http://213.224.136.110:8080/test.xml And this is my code: <?php //Define Opening Tags of XML $open_tags = array( 'STORY' => '<nasdaqamex-dot-com>', 'STOCK_NAME' => '<issue-name>', 'LAST_SALE' => '<last-sale-price>', 'PREVIOUS_CLOSE' => '<previous-close-price>', 'NET_CHANGE_PCT' => '<net-change-pct>', 'STOCK_URL' => '<issuer-web-site-url>'); //Define Closing Tags of XML $close_tags = array( 'STORY' => '</nasdaqamex-dot-com>', 'STOCK_NAME' => '</issue-name>', 'LAST_SALE' => '</last-sale-price>', 'PREVIOUS_CLOSE' => '</previous-close-price>', 'NET_CHANGE_PCT' => '</net-change-pct>', 'STOCK_URL' => '</issuer-web-site-url>'); // handles the attributes for opening tags // $attrs is a multidimensional array keyed by attribute // name and having the value of that attribute function startElement($parser, $name, $attrs=''){ global $open_tags, $temp, $current_tag; $current_tag = $name; if ($format = $open_tags[$name]){ switch($name){ case 'STORY': echo 'New Story: '; break; default: break; } } } // $current_tag lets us know what tag we are currently // dealing with - we use that later in the characterData // function. // // when we see a </STORY> we know that it is time to // flush our temp variables and prepare to move onto // the next one function endElement($parser, $name, $attrs=''){ global $close_tags, $temp, $current_tag; if ($format = $close_tags[$name]){ switch($name){ case 'STORY': return_page($temp); $temp = ''; break; default: break; } } } // this function is passed data between elements // theu $data would equal 'Title Here' // in the line <TITLE>Title Here</TITLE> function characterData($parser, $data){ global $current_tag, $temp, $catID; switch($current_tag){ case 'STOCK_NAME': $temp['stock_name'] = $data; $current_tag = ''; break; case 'LAST_SALE': $temp['last_sale'] = $data; $current_tag = ''; break; default: break; } } function return_page() { global $temp; echo 'o <A HREF="'.$temp['stock_name'].'">'.$temp['last_sale'].'</A><BR>'; } // what are we parsing? $xml_file = 'test.xml'; // declare the character set - UTF-8 is the default $type = 'UTF-8'; // create our parser $xml_parser = xml_parser_create($type); // set some parser options xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true); xml_parser_set_option($xml_parser, XML_OPTION_TARGET_ENCODING, 'UTF-8'); // this tells PHP what functions to call when it finds an element // these funcitons also handle the element's attributes xml_set_element_handler($xml_parser, 'startElement','endElement'); // this tells PHP what function to use on the character data xml_set_character_data_handler($xml_parser, 'characterData'); if (!($fp = fopen($xml_file, 'r'))) { die("Could not open $xml_file for parsing!\n"); } // loop through the file and parse baby! while ($data = fread($fp, 4096)) { if (!($data = utf8_encode($data))) { echo 'ERROR'."\n"; } if (!xml_parse($xml_parser, $data, feof($fp))) { die(sprintf( "XML error: %s at line %d\n\n", xml_error_string(xml_get_error_code($xml_parser)), xml_get_current_line_number($xml_parser))); } } xml_parser_free($xml_parser); //Just to see if it has done something echo 'yahoo'; ?>
On Sat, Feb 10, 2001 at 07:37:32PM +0100, Steve Haemelinck wrote: > The page I want to parse is: > > http://213.224.136.110:8080/test.xml > > And this is my code: > > <?php > > //Define Opening Tags of XML > $open_tags = array( > 'STORY' => '<nasdaqamex-dot-com>', > 'STOCK_NAME' => '<issue-name>', > 'LAST_SALE' => '<last-sale-price>', > 'PREVIOUS_CLOSE' => '<previous-close-price>', > 'NET_CHANGE_PCT' => '<net-change-pct>', > 'STOCK_URL' => '<issuer-web-site-url>'); (snip) > // handles the attributes for opening tags > // $attrs is a multidimensional array keyed by attribute > // name and having the value of that attribute > function startElement($parser, $name, $attrs=''){ > global $open_tags, $temp, $current_tag; > > $current_tag = $name; > if ($format = $open_tags[$name]){ > switch($name){ > case 'STORY': > echo 'New Story: '; > break; > default: > break; > } > } > } This probably isn't doing what you think it's doing. When the parser hits a new element tag, it will pass the parser object, element name, and its attributes to startElement(). $name will be the name of the element. Equity-quote, issue-name, etc. So when you go to look for $open_tags[$name], you won't find anything because the array is keyed to STORY, STOCK_NAME, etc. It looks like you're expecting the array to be backwards. Switching the keys/values and removing the <, /, > would be enough to make it work. HTH, Matt
Hello and thanks to all for the help on the magic quotes, etc. It gives me a better handle on what I'm dealing with. Except for one more thing. When I bring back text from a field which contains a ', and try to apply it as the value of an input box, it still truncates in the box. When I simply print $text, it prints out correctly as *Don't do this* . When I make $text the default value of an input box, it shows as *Don*. If the slash is still in place, it reads *Don\'t* above the box and *Don\* in the box. My bugaboo continues.. :-> Thanks again for any further advice. Floyd On Sat, 03 Feb 2001 19:42:23 -0500, you wrote: > >Hi.. > >I have a routine where we input text to fields. When there is an apostrophe it >handles it correctly. When the form is brought back for editing, the field >values show up in the input fields, with all apostrophes intact, just as it >should be. > >When I upload this script to my isp, it doesn't work.. The apostrophes truncate >the rest of the text. 'Don't cry over spilled milk', in a field, turns into >'Don'... > >I have php4 mod in my win32 devbox. The isp is php3. Is this the problem? >What is the best way out of it please? > >Thanks in advance. > >Floyd > > >-- --
Look into addslashes() and stripslashes() Are you getting $text from a database query? - Shane DISCLAIMER: I am by no means an expert on this, or any other, topic... ----- Original Message ----- From: "Floyd Baker" <[EMAIL PROTECTED]> To: "Floyd Baker" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, February 10, 2001 1:39 PM Subject: Re: [PHP] my bugaboo. > > Hello and thanks to all for the help on the magic quotes, etc. > It gives me a better handle on what I'm dealing with. > > Except for one more thing. > > When I bring back text from a field which contains a ', and try to apply it as > the value of an input box, it still truncates in the box. > > When I simply print $text, it prints out correctly as *Don't do this* . > When I make $text the default value of an input box, it shows as *Don*. > > If the slash is still in place, it reads *Don\'t* above the box and *Don\* in > the box. > > My bugaboo continues.. :-> > > Thanks again for any further advice. > > Floyd > > > > > > > > On Sat, 03 Feb 2001 19:42:23 -0500, you wrote: > > > > >Hi.. > > > >I have a routine where we input text to fields. When there is an apostrophe it > >handles it correctly. When the form is brought back for editing, the field > >values show up in the input fields, with all apostrophes intact, just as it > >should be. > > > >When I upload this script to my isp, it doesn't work.. The apostrophes truncate > >the rest of the text. 'Don't cry over spilled milk', in a field, turns into > >'Don'... > > > >I have php4 mod in my win32 devbox. The isp is php3. Is this the problem? > >What is the best way out of it please? > > > >Thanks in advance. > > > >Floyd > > > > > >-- > > -- > > > -- > 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] >
----- Original Message ----- From: "Floyd Baker" <[EMAIL PROTECTED]> > > Hello and thanks to all for the help on the magic quotes, etc. > It gives me a better handle on what I'm dealing with. > > Except for one more thing. > > When I bring back text from a field which contains a ', and try to apply it as > the value of an input box, it still truncates in the box. > > When I simply print $text, it prints out correctly as *Don't do this* . > When I make $text the default value of an input box, it shows as *Don*. > > If the slash is still in place, it reads *Don\'t* above the box and *Don\* in > the box. > > My bugaboo continues.. :-> > > Thanks again for any further advice. > > Floyd > That's a problem with HTML. example: <input type='text' name='textName' value='Don't do this'> Sees the ' in Don't as the signal for the end of the value string. I haven't come up with an automatic way to deal with this, but what I have done is in these lines (where there might be an apostrophe) make sure I use double quotes: <input type="text" name="textName" value="Don't do this"> or print "<input type=\"text\" name=\"textName\" value=\"Don't do this\">"; Of course, then you may have the same trouble with double quotes. To avoid that you can do ereg_replace("\"", "''", $text) -- that is, replace a double quote with two single quotes? I think, I've never bothered. Hope this helps somehow. Anna
If replacing " characters for output to html, don't replace them with '' (two single quotes), replace with the magic value " (including the semicolon), which is a special html entity that means "put a quotation mark here" Search google for html entities for more. Gfunk - http://www.gfunk007.com/ I sense much beer in you. Beer leads to intoxication, intoxication to hangovers, and hangovers to... suffering. ----- Original Message ----- From: "Anna" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, February 11, 2001 11:36 AM Subject: Re: [PHP] my bugaboo. > ----- Original Message ----- > From: "Floyd Baker" <[EMAIL PROTECTED]> > > > > > > Hello and thanks to all for the help on the magic quotes, etc. > > It gives me a better handle on what I'm dealing with. > > > > Except for one more thing. > > > > When I bring back text from a field which contains a ', and try to apply > it as > > the value of an input box, it still truncates in the box. > > > > When I simply print $text, it prints out correctly as *Don't do this* . > > When I make $text the default value of an input box, it shows as *Don*. > > > > If the slash is still in place, it reads *Don\'t* above the box and *Don\* > in > > the box. > > > > My bugaboo continues.. :-> > > > > Thanks again for any further advice. > > > > Floyd > > > > That's a problem with HTML. > example: > <input type='text' name='textName' value='Don't do this'> > Sees the ' in Don't as the signal for the end of the value string. > I haven't come up with an automatic way to deal with this, > but what I have done is in these lines (where there might be an apostrophe) > make sure I use double quotes: > <input type="text" name="textName" value="Don't do this"> > or > print "<input type=\"text\" name=\"textName\" value=\"Don't do this\">"; > > Of course, then you may have the same trouble with double quotes. To avoid > that you can do ereg_replace("\"", "''", $text) -- that is, replace a double > quote with two single quotes? I think, I've never bothered. > > Hope this helps somehow. > > Anna > > > -- > 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] >
Hi folks! If $array contains the following: boy => hello girl => hi dog => bark How can I alter all the elements the same way? e.g. so that it now conatins: Xboy => Xhello Xgirl => Xhi Xdog => Xbark thanks! jaxon
I would just loop through the array and grab the key/value pairs and then add them to a new array as you modify them. Jason --- Jaxon <[EMAIL PROTECTED]> wrote: > Hi folks! > > If $array contains the following: > > boy => hello > girl => hi > dog => bark > > How can I alter all the elements the same way? > > e.g. so that it now conatins: > > Xboy => Xhello > Xgirl => Xhi > Xdog => Xbark > > thanks! > jaxon > > > -- > 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] __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/
jason, thanks ... got it. while($row = mysql_fetch_array($result, MYSQL_ASSOC)){ list($key, $value) = each($row); $key_new="X.$key"; $value_new="X.$value"; $new_array=array($key_new => $value_new"); } thanks, jaxon On 2/10/01 2:32 PM, "jason cox" <[EMAIL PROTECTED]> wrote: > I would just loop through the array and grab the > key/value pairs and then add them to a new array as > you modify them. > > Jason > --- Jaxon <[EMAIL PROTECTED]> wrote: >> Hi folks! >> >> If $array contains the following: >> >> boy => hello >> girl => hi >> dog => bark >> >> How can I alter all the elements the same way? >> >> e.g. so that it now conatins: >> >> Xboy => Xhello >> Xgirl => Xhi >> Xdog => Xbark >> >> thanks! >> jaxon >> >> >> -- >> 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] > > > __________________________________________________ > Do You Yahoo!? > Get personalized email addresses from Yahoo! Mail - only $35 > a year! http://personal.mail.yahoo.com/
Greetings all: Using: RH6.2, Apache 1.3.17, PHP4.0.4pl1, IBMdb2 V7.1, & PostgreSQL 7.03 PHP statically linked to Apache. Postgres, php, & Apache all working well together. Have made the appropriate symlinks for db2 & Apache (libdb2.so.1, etc) db2 works fine from the command line or from within >>db2 However, when using the following script: <html> stuff here..... <?php $conn=odbc_connect("sample","db2inst1","ibmdb2"); $query="Select lastname from employee where firstnme='JASON'"; $result=odbc_exec($conn, $query); echo $result; [Only one value should be returned, GOUNOT] odbc_close($conn); ?> </html> I get this error: Warning SQL error, SQL state y[ASCII hex 98]P[ASCII hex 50] SQLConnect in ../../test.php line 5 Using odbc_pconnect produces a similar error message but longer with many more "garbage" characters for a message! Any ideas as to what's going on & how to fix it would be most appreciated. ....tnx..... ....bill sneed, prospect, maine.... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The level which science has reached is determined by how far it is capable of a crisis in its basic concepts. M. Heidegger, S & Z
TO BE REMOVED FROM FUTURE MAILINGS, SIMPLY REPLY TO THIS MESSAGE AND PUT "REMOVE" IN THE SUBJECT. 20 MILLION E-MAIL ADDRESSES FOR ONLY $249 **Over Night International Shipping Included** Many Call This "The "Perfect E-Mail List" Over 20-Million Of The Best E-Mail Addresses Available _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ Our research has found that many people have tried one or more of the following... Free Classifieds? (Don't work anymore) Web Site? (Takes thousands of visitors) Banners? (Expensive and losing their punch) E-Zine? (Hope they have a *huge* subscriber list) Search Engines? (Forget it, unless you're in the top 20) S O W H A T W I L L W O R K ? Although often misunderstood, there is one method that has proven to succeed time-after-time. E - M A I L M A R K E T I N G ! ! IT'S A FACT... If you're not using your computer to generate income, GOOD income, you're leaving money on the table. Here's what the experts have to say about E-Mail Marketing: "E-mail is an incredible lead generation tool" -Crains Magazine "A gold mine for those who can take advantage of bulk e-mail programs" - The New York Times "Blows away traditional Mailing" - Advertising Age Here's an example of your potential earnings if you have a product or service that brings you a profit of around $30. Remember, on the Internet, you can make money 7 days a week, 24 hours a day... even while you sleep, orders come from all over the world! Orders Per Day Weekly Monthly Yearly 1 $ 210 $ 840 $ 10,080 2 420 1,680 20,160 3 630 2,520 30,240 5 1,050 4,200 50,400 10 2,100 8,400 100,000 15 3,150 12,600 151,200 THE QUESTION IS... how do you generate those orders? The least expensive and fastest way is through E-Mail Marketing. You want to make some money? I can put you in touch with over 20 million people at virtually no cost. Can you make one cent from each of theses names? If you can you have a profit of over $200,000.00 That's right, I have over 20 Million Fresh email addresses that I will sell for only $249. These are all fresh addresses that include almost every English person on the Internet today, with no duplications. They are all sorted and ready to be mailed. That is the best deal anywhere today! Don't believe it? People are making that kind of money right now by doing the same thing, that is why you get so much email from people selling you their product....it works! These 20 Million email addresses are yours to keep, so you can use them over and over. This offer is not for everyone. If you can not see just how excellent the risk / reward ratio in this offer is then there is nothing I can do for you. To make money you must stop dreaming and TAKE ACTION. Over the past 2 years, we have gained a reputation for having the cleanest, most responsive e-mail address lists in the industry. No one has gone to the work it takes to produce an e-mail address list of this quality. Here's how we prepare our e-mail lists: 1. We clean and eliminate all duplicates. 2. Next, we use a filter list of 400+ words/phrases to clean even more. No address with inappropriate or profane wording survives! 3. Then we use our private database of thousands of known Internet "extremists", those opposed to any kind of commercial e-mail, and kicked off every one we could find. 4. All domains were verified to insure they're valid. 5. And finally, we sorted the list into easy-to-manage packets of 20,000 addresses in simple text (.txt) format that will work with any computer operating system. ****************************************** It is time to order! Shipping is not an issue. ******FedEx next day world wide shipping included******** As soon as we receive payment we will FedEx your e-mail list via CD straight to your door anywhere in the world FedEx next day guaranteed. ******International Orders Welcome********* US funds paid via paypal.com welcomed PayPal is now available in the following countries: Australia Austria Belgium Brazil Canada Denmark France Germany Hong Kong Ireland Israel Italy Japan Mexico Netherlands New Zealand Norway Portugal Singapore South Africa South Korea Spain Sweden Switzerland United Kingdom PayPal.com is very easy to sign up to. They accept wire transfers, checks and credit cards from any of the countries listed above. This payment process is in your own interest of safety. Paypal.com processes all transactions and keeps all your personal information secret. After signing up please send the U.S. equivalent of $249 to [EMAIL PROTECTED] last name Smith. If there is another way you would like to pay please e-mail me at [EMAIL PROTECTED] and I will get back to you. *******Wondering how to send 20 million E-mails******** I will tell you how/where to download the softwhere you need for free Please NOTE: Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof, or abridging the freedom of speech or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances. Amendment I, The US Constitution
Hello, I am currently trying to find a way to: set user and group quota using PHP. I don'T know how I could use the existing edquota programs, etc, because they automatically open vi to edit instead of taking one line command. I would also like to know if anyone has any ideas on how to do multithreading in PHP? I thought of using a script with a function executed once the script is over, multiple times... would that work? Please, I would really appreciate some ideas, tips on these 2 subjects!! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Félix C.Courtemanche . [EMAIL PROTECTED] Co-Administrator . http://www.can-host.com/ Head Designer . http://www.can-design.com/ .
----- Original Message ----- From: "thor" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, February 08, 2001 11:58 AM Subject: Re: [PHP] include("blah.php?var=this"); doesn't work?! > Any include page you use will automatically use any variable that has been set in the master page. > <snip> Unless you use include(http://file); Then you can pass variables in the filename. This does come in handy in some cases. Anna
Thanks to everyone! Can't believe I missed that, but, then again, can't believe I got married either. ----- Original Message ----- From: Angerer, Chad <[EMAIL PROTECTED]> To: 'Erik Boles' <[EMAIL PROTECTED]>; PHP3 List <[EMAIL PROTECTED]> Sent: Friday, February 09, 2001 10:24 AM Subject: RE: [PHP] shows up in IE but not Netscape > Try closing your table here... or putting the new table in a <td>. Netscape > is very picky with tables. > > > > complete the login process and begin using the site. > </center> > </td> > >>>> </tr> > >>>> <table> > <?php > } > else > { > ?> > <html><head></head><body bgcolor="#FFFFFF"> > <center> > <B> > Your account has temporarily been disabled by the system > administrator. If you > > -----Original Message----- > From: Erik Boles [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 09, 2001 11:09 AM > To: PHP3 List > Subject: [PHP] shows up in IE but not Netscape > > > We are running a webform, that asks for user ID and pass, then passes it on > to a .php3 file that shows them a page to continue (not a security thing, > just a tracking thing). > > This .php3 file, called login.php3 works just fine in IE but when viewed in > netscape it simply shows a white screen. We did a "view source" and all of > the php file is there, and it doesn't show any errors (HTML errors blink in > the 'view source' with Netscape). > > Any ideas why the code below is not working right in Netscape?? > > ----------------------login.php3------------------------------- > > <HTML><BODY> > > <?php > switch ($position) > { > case "process": > require('logon.inc'); > $query = "select userid, company, active from registration where > userid='$userid' and password='$password'"; > $result = mysql_query($query); > $row = @mysql_fetch_array($result); > > file://test section start > > file://print ("Id entered by user is $userid<br>"); > file://print ("Id retrieved from database is"); > file://print $row["userid"]; > file://print ("<br>"); > > file://test section end > > if ($row["userid"] == $userid) > { > if ($row["active"] =="YES") > { > ?> > <html><head></head><body bgcolor="#FFFFFF"> > <center> > <table valign=top nowrap> > <tr> > <td> > > > <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" > > codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0 > ,0" > ID=ptac WIDTH=393 HEIGHT=272 ALIGN=top> > <PARAM NAME=movie VALUE="ptacwebsite.swf"> > <PARAM NAME=loop VALUE=false> > <PARAM NAME=quality VALUE=high> > <PARAM NAME=bgcolor VALUE=#FFFFFF> > <EMBED src="ptacwebsite.swf" quality=high bgcolor=#FFFFFF > loop=false > WIDTH=393 HEIGHT=272 ALIGN=top TYPE="application/x-shockwave-flash" > > PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_ > Version=ShockwaveFlash"> > </EMBED> > </OBJECT> > </td> > > <td> > <Center> > Welcome back to the ColoradoPTAC website, <?PHP print > $row['company']; ?>.<br><br> > Please click <a href="registered/registered.html" > target="_top">here</a> to > complete the login process and begin using the site. > </center> > </td> > </tr> > <table> > <?php > } > else > { > ?> > <html><head></head><body bgcolor="#FFFFFF"> > <center> > <B> > Your account has temporarily been disabled by the system > administrator. If you > feel this was done by mistake, please send an email to > <a href="mailto:[EMAIL PROTECTED]"> > [EMAIL PROTECTED]</a> > to resolve the issue.<BR><BR> > We apologize for any inconvenience this has caused. > </B> > </center> > <?php > } > } > else > { > ?> > <html><head></head><body bgcolor="#FFFFFF"> > <center> > <B> > Either you do not currently have a membership with us or you have entered > an invalid Member ID/Password combination.<br><br> > Please click <a href="register/register.htm" target="_top">here</a> to > join<br><br>-OR-<br><br>Click <a href="index.htm">here</a> to try again. > </B> > </center> > <?php > } > } > ?> > </BODY></HTML> > > -------------------login.php3-------------------------------------- > > > > > > Erik > > > -- > 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] > >
I have some code which generates a large string to be used by the mail() function. At the same point in the string each time, PHP stops processing "\n" correctly and instead of a newline outputs nothing, so the text starts to get run together.. but it doesn't seem to happen on every "\n". Has anyone else run into this problem? It used to work correctly but I made a few changes to portions of the code that were totally uninvolved, and it started behaving this way. Unfortunately, I didn't notice the problem until I'd made a number of small changes to unrelated things and didn't remember what they were. Gordon Morehouse [EMAIL PROTECTED] www.evernex.com
Yes. Take a look at Code Charge. It does what you want and then some! (www.codecharge.com) -- Jeff (FurBall) WebOverdrive Newbie Tech Board http://www.topniche.com/tech/ [EMAIL PROTECTED] -----Original Message----- From: Tim Ward [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 07, 2001 8:06 AM To: 'Jaxon'; [EMAIL PROTECTED] Subject: [PHP] RE: db forms creator? There isn't an easy way as the form is filled in client side (and is html not PHP). Work out the info you need to plug Into the SQL command line (ALTER or CREATE TABLE). Build a form asking for that info and have it submit to the same page which does the PHP and SQL bit using the filled in fields from the form. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html > -----Original Message----- > From: Jaxon [mailto:[EMAIL PROTECTED]] > Sent: 04 February 2001 23:18 > To: [EMAIL PROTECTED] > Subject: db forms creator? > > > Hi, can anyone point me towards an easy way to generate forms > to update a > mysql database? > > I've seen some sites where I can specify a list of table > fields and the > datatype for each, and get an output of: > > 1. the sql to create the table > 2. a php form that can be used to update the table > > problem is I can't find the site now :) > > has anyone else found this? > > Regards, > jaxon > > -- 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]
try http://phpmyedit.sourceforge.net/ Maciek > -----Original Message----- > From: Jaxon [mailto:[EMAIL PROTECTED]] > Sent: Monday, February 05, 2001 12:18 AM > To: [EMAIL PROTECTED] > Subject: [PHP] db forms creator? > > > Hi, can anyone point me towards an easy way to generate forms to update a > mysql database? > > I've seen some sites where I can specify a list of table fields and the > datatype for each, and get an output of: > > 1. the sql to create the table > 2. a php form that can be used to update the table > > problem is I can't find the site now :) > > has anyone else found this?
I'm trying to use passthru in a PHP program to have an external program display some data. The problem is that I was trying to have the external program's environment pick up the form field variables automatically passed into the PHP program as shell environment variables. In other words, if a user typed "Smith" into the last_name field in a form, the PHP program called by that form starts out with $last_name = "Smith", and I would like the external program called by passthru within the PHP program to have a shell environment variable last_name = "Smith". Does anyone know an easy way to do this?