[PHP] help, please, understanding my problem
I have a PHP page that has require_once(genMyOverlay.js.php); . . . echo body; echo script language=\JavaScript\doit(\mydiv\);/scriptbr; echo /body; genMyOverlay.js.php contains: createDiv() (see below) that creates a DIV ID=mydiv and sets it up to overlay a portion of the wbe page and doit()starts it off. invoke the web page once and it works like it should. invoke the web page a second time (and thereafter until a new session) and it gets error: doit is not defined view the source (at the client browser) and it is identical both (all) times can anyone please help me understand what is happening? genMyOverlay.js.php contains script language=PHP echo script language=\JavaScript\; echo function createDiv(); echo {; . . . echo }; echo function doit(ElementID); echo {; echo creatDIV(); . . . echo }; echo /script; /script -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help, please, understanding my problem
On Mon, 2010-02-22 at 09:09 -0600, Stan wrote: I have a PHP page that has require_once(genMyOverlay.js.php); . . . echo body; echo script language=\JavaScript\doit(\mydiv\);/scriptbr; echo /body; genMyOverlay.js.php contains: createDiv() (see below) that creates a DIV ID=mydiv and sets it up to overlay a portion of the wbe page and doit()starts it off. invoke the web page once and it works like it should. invoke the web page a second time (and thereafter until a new session) and it gets error: doit is not defined view the source (at the client browser) and it is identical both (all) times can anyone please help me understand what is happening? genMyOverlay.js.php contains script language=PHP echo script language=\JavaScript\; echo function createDiv(); echo {; . . . echo }; echo function doit(ElementID); echo {; echo creatDIV(); . . . echo }; echo /script; /script Going on just that sample, there's no issue. As it works the first time, there isn't a problem with it not getting included. Have you tried it on other browsers to see what happens there? Also, Firefox has a brilliant addon called Firebug, which can show you the contents of included .js files on your page, which will show up any problems you may have. Aside from these points, have you a good reason for including a PHP file that just outputs javascript? Why not just include the .js file as part of the header? Also, your script tags need a type attribute: script language=javascript type=text/javascript And lastly, instead of lots and lots of echo statements in your page, have you looked at heredoc and nowdoc syntax in PHP? echo EOC lots and lots of output lines go here. EOC; Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] help, please, understanding my problem
At 3:15 PM + 2/22/10, Ashley Sheridan wrote: Also, your script tags need a type attribute: script language=javascript type=text/javascript Actually, you only need this: script type=text/javascript The language attribute will throw an error in validation. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help, please, understanding my problem
On Mon, 2010-02-22 at 12:33 -0500, tedd wrote: At 3:15 PM + 2/22/10, Ashley Sheridan wrote: Also, your script tags need a type attribute: script language=javascript type=text/javascript Actually, you only need this: script type=text/javascript The language attribute will throw an error in validation. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com Never thrown an error for me! I guess it depends on what doctype you use? Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] help, please, understanding my problem
At 5:32 PM + 2/22/10, Ashley Sheridan wrote: On Mon, 2010-02-22 at 12:33 -0500, tedd wrote: At 3:15 PM + 2/22/10, Ashley Sheridan wrote: Also, your script tags need a type attribute: script language=javascript type=text/javascript Actually, you only need this: script type=text/javascript The language attribute will throw an error in validation. Cheers, tedd Never thrown an error for me! I guess it depends on what doctype you use? I was trying to be discreet. The language attribute has been depreciated. If you use a transitional DOCTYPE, then it won't throw an error -- but the language attribute is outdated and some consider it poor coding practice to use depreciated attributes. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help, please! UTF-8 encoding problem
Hi, I would like some help with an encoding problem, please. I would like to encode some text (a news entry entered via a form, to be exact) into UTF-8 and then save it in an XML file for persistent storage. My problem is, some of the users are Japanese and would like to enter Japanese multi-byte characters. The following should work, I believe: // Open file if (!$handle = fopen($filename, wb)) { echo(Error! Cannot open file $filename); exit; } // Generate XML string $newsXML = ?xml version=\1.0\ encoding=\UTF-8\?\n; $newsXML .= newsItem\n; $newsXML .= headline.mb_convert_encoding($headline, UTF-8); $newsXML .= /headline\n; $newsXML .= maintext.mb_convert_encoding($maintext, UTF-8); $newsXML .= /maintext\n; $newsXML .= /newsItem\n; // Encode $newsXML = mb_convert_encoding($newsXML, UTF-8,auto); $encodedNewsXML = utf8_encode($newsXML); echo(p.mb_detect_encoding($encodedNewsXML)./p); echo(p.$encodedNewsXML./p); // Write news item content to the file if (fwrite($handle, $encodedNewsXML) == FALSE) { echo(Error! Could not write to file $filename); exit; } echo(Success, wrote news item to the file $filename); fclose($handle); ... but it doesn't! :-( Whenever I run this, it displays ASCII followed by the Japanese text characters (both kanji and kana). Note that the caharcters _are_ displayed correctly, although the encoding is detected as ASCII, which doesn't make sense to me. The script then happily proceeds to save in ASCII-format, and consequently, when the main script reads the saved file, it replaces all characters by . Other UTF-8 files, saved in an external editor such as Bluefish or GEdit _can_ be read correctly. The problem simply must be in the encoding. And before you ask, yes, mb_*** is supported in the PHP server. What am I doing wrong? Please let me know; I've been struggling a long time with this and will be very grateful for any assistance. Best regards, Jan This message was sent using IMP, the Internet Messaging Program. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help please!!
Having a very frustrating problem and I can't seem to figure out why it's happening. 1. As of last week, all of our applications have started to work intermittingly. The codebase has not changed. 2. Sometimes the application will display, sometimes it won't. The browsers loading progress bar will move for about 25% then just stop. No timeout or 401 errors occur. 3. There are no errors message in any of the logs files. To test if it's our application we have done the following in our main php file which runs the rest of the application ?php echo Step 0 br; --Segment of our code is here-- echo Step 1 br; --Segment of our code is here-- echo Step 2 br; ? Sometimes it doesn't even get to the first line of php code which is the first echo statement, sometimes it gets to step 0 and step 1 and sometimes it gets to all steps. The code between each of these steps is nothing major, nothing calls mysql or anything like that. It's mainly just variable initialization. Again, the entire application runs fine every couple of refreshes. Then sometimes it'll just stop completely. I have turned on all sorts of debugging and nothing. I have reinstalled apache, mysql, and php 2 times. We have also optimize both apache and mysql for for than enough client connections as well are using persistant db connections. But like I said, the application works sometimes, sometimes it doesn't. And the data is pretty static. I am running RHEL 3 U3 with RH php version php-4.3.2-19.ent, RH mysql server version mysql-server-3.23.58-2.3, and RH apache version httpd-2.0.46-44.ent Thanks guys for any help troubleshooting this. -Brent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help please!!
[snip] Thanks guys for any help troubleshooting this. [/snip] Is the drive full? Enough memory? An unusual number of connections? Any other applications added to the system? what do you see when you run top? Have you looked at a MySQL process list? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help please!!
I would check what hitting the machine from the network. At the most basic level, just try netstat 1 on the command line. Also try iostat 1 to see what load the machine has. It may not be PHP or Apache but something else, maybe a denial of service attack. On Jan 13, 2005, at 10:02 PM, Brent Clements wrote: Having a very frustrating problem and I can't seem to figure out why it's happening. 1. As of last week, all of our applications have started to work intermittingly. The codebase has not changed. 2. Sometimes the application will display, sometimes it won't. The browsers loading progress bar will move for about 25% then just stop. No timeout or 401 errors occur. 3. There are no errors message in any of the logs files. To test if it's our application we have done the following in our main php file which runs the rest of the application ?php echo Step 0 br; --Segment of our code is here-- echo Step 1 br; --Segment of our code is here-- echo Step 2 br; ? Sometimes it doesn't even get to the first line of php code which is the first echo statement, sometimes it gets to step 0 and step 1 and sometimes it gets to all steps. The code between each of these steps is nothing major, nothing calls mysql or anything like that. It's mainly just variable initialization. Again, the entire application runs fine every couple of refreshes. Then sometimes it'll just stop completely. I have turned on all sorts of debugging and nothing. I have reinstalled apache, mysql, and php 2 times. We have also optimize both apache and mysql for for than enough client connections as well are using persistant db connections. But like I said, the application works sometimes, sometimes it doesn't. And the data is pretty static. I am running RHEL 3 U3 with RH php version php-4.3.2-19.ent, RH mysql server version mysql-server-3.23.58-2.3, and RH apache version httpd-2.0.46-44.ent Thanks guys for any help troubleshooting this. -Brent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Brent Baisley Systems Architect Landover Associates, Inc. Search Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help please.
JUST FOR ALL OF YOU OUTTHERE TO KNOW... the problem was that site had Frontpage 2002 extensions installed. Incredibly enough, that was sufficient not to accept the files. Thanks again to all that answered. Vamp Jason Sheets [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] Check the filesystem permissions of the destination folder to make sure the web server user has write access to it. What does line 20 of d:\inetpub\sites\www.kamasutra.com.mx\web\mbt\includes\photographs.php attempt to do. With NTFS filesystems you must always remember to set the filesystem permissions (just like you have to in Unix). Jason -Original Message- From: Elliot J. Balanza [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 28, 2004 8:03 PM To: [EMAIL PROTECTED] Subject: [PHP] Help please. Hi, I'm running the same class in two different sites on the same sever (apparently under the exact same conditions) yet one server sends me an error Warning: copy(d:/inetpub/sites/www.kamasutra.com.mx/web/fotos/bobl-39409.jpg): failed to open stream: Permission denied in d:\inetpub\sites\www.kamasutra.com.mx\web\mbt\includes\photographs.php on line 20 whenever I try to upload an image while the second one does loads it. This is driving me crazy, any ideas? Help will be appreciated. Vamp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help please
hi! i have a class called DB that i include in a page as include(classes/DB.php); however when i run this page i get an error saying Warning: main(/home/bikkar/public_html/ajay/classes/DB.php): failed to open stream: No such file or directory in /home/bikkar/public_html/ajay/index.php on line 18 Warning: main(): Failed opening '/home/bikkar/public_html/ajay/classes/DB.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/bikkar/public_html/ajay/index.php on line 18 but i have verified that DB.php is there, is full(non-corrupted) and there are a few other classes in that folder that upload fine. can someone please help thanks -- ajay --- Who Dares Wins - This mail sent through IMP: www-mail.usyd.edu.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help please
Hello ajay, Sunday, February 22, 2004, 7:57:21 PM, you wrote: a hi! a i have a class called DB that i include in a page as include(classes/DB.php); a however when i run this page i get an error saying a Warning: main(/home/bikkar/public_html/ajay/classes/DB.php): failed to open a stream: No such file or directory in a /home/bikkar/public_html/ajay/index.php a on line 18 a Warning: main(): Failed opening a '/home/bikkar/public_html/ajay/classes/DB.php' a for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') a in /home/bikkar/public_html/ajay/index.php on line 18 a but i have verified that DB.php is there, is a full(non-corrupted) and there are a a few other classes in that folder that upload fine. a can someone please help a thanks a -- a ajay a --- -- would you like to show us part of the code (especially on -- index.php line 18) -- Best regards, adwinwijayamailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help please
hi! the code is ?php include(classes/DB.php); include(classes/PageMaker.php); $page = new PageMaker(main.css, USYD Basketball); $page-print_header(); printf(body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0); $page-print_banner(); $page-print_menu(); $db = new DB(localhost, usydbasketball, , ); $query = SELECT * FROM updates ORDER BY ID DESC; thanks ajay Quoting adwinwijaya [EMAIL PROTECTED]: Hello ajay, Sunday, February 22, 2004, 7:57:21 PM, you wrote: a hi! a i have a class called DB that i include in a page as include(classes/DB.php); a however when i run this page i get an error saying a Warning: main(/home/bikkar/public_html/ajay/classes/DB.php): failed to open a stream: No such file or directory in a /home/bikkar/public_html/ajay/index.php a on line 18 a Warning: main(): Failed opening a '/home/bikkar/public_html/ajay/classes/DB.php' a for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') a in /home/bikkar/public_html/ajay/index.php on line 18 a but i have verified that DB.php is there, is a full(non-corrupted) and there are a a few other classes in that folder that upload fine. a can someone please help a thanks a -- a ajay a --- -- would you like to show us part of the code (especially on -- index.php line 18) -- Best regards, adwinwijayamailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- ajay --- Who Dares Wins - This mail sent through IMP: www-mail.usyd.edu.au -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re[2]: [PHP] help please
Hello ajay, Sunday, February 22, 2004, 9:05:52 PM, you wrote: a hi! a the code is a ?php a include(classes/DB.php); a include(classes/PageMaker.php); hmm... may be you need to add '/' in front of classess try this one: include(dirname(__FILE__)./classes/DB.php); hope it will work :) good luck -- Best regards, adwin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HELP PLEASE!
this is my first post, so please bear with me. I'm developing a Mayan Oracle based on PHP and MySQL. the program and database work perfectly, and do all I want them to. however, the thing has a graphical interface that I built using Macromedia Fireworks and Dreamweaver, with some images chaning along with other things, and this is the part that's faulty. the program checks whether a form has been filled. if not, it displays the form. if it has, it then validates, and on a false shows the form again. on a true, it does lots of processing and MySQL checking, and then shows the output page. both form pages along with the output page are included as different files to facilitate graphical edition. all the snippets of actual human language are included in another external file, to facilitate addition of languages. the form pages are both one page, form.php, which distinguishes between first and second filling in case of invalid data. the output page is called canvas.php, and right now I have canvas.php as completely static, and canvas2.php with all the coding needed to display properly. the main program, 01.php, does not send the client any code in itself (just the included files in their entirety, alone). THE PROBLEM: when I load the canvas.php page independently in Firefox/Mozilla/Netscape and Explorer it displays perfectly. the problem comes when I load this file through 01.php, and then it gets rumbled up. I've seen this on most computers with Firefox/Mozilla/netscape, and not on Explorer. what the hell? any hel would be welcome. I have http://200.39.201.43/hideout/project/final/01.php pointing to the static canvas.php and http://200.39.201.43/hideout/project/final/02.php pointing to the dynamic canvas2.php if you can sort this out I'll be eternally grateful. I'll post the programs on request - they're quite large for mailing. thanks in advance, 3mip1s4la The Official Dream Theater Site - http://www.dreamtheater.net/ ___ Get your own Web-based E-mail Service at http://www.zzn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HELP PLEASE!
look at the html code, this is no problem related to php, but the HTML. Hope that helps Nitin - Original Message - From: 3mip1s4la/Nath/Pisanty [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 21, 2004 7:24 AM Subject: [PHP] HELP PLEASE! this is my first post, so please bear with me. I'm developing a Mayan Oracle based on PHP and MySQL. the program and database work perfectly, and do all I want them to. however, the thing has a graphical interface that I built using Macromedia Fireworks and Dreamweaver, with some images chaning along with other things, and this is the part that's faulty. the program checks whether a form has been filled. if not, it displays the form. if it has, it then validates, and on a false shows the form again. on a true, it does lots of processing and MySQL checking, and then shows the output page. both form pages along with the output page are included as different files to facilitate graphical edition. all the snippets of actual human language are included in another external file, to facilitate addition of languages. the form pages are both one page, form.php, which distinguishes between first and second filling in case of invalid data. the output page is called canvas.php, and right now I have canvas.php as completely static, and canvas2.php with all the coding needed to display properly. the main program, 01.php, does not send the client any code in itself (just the included files in their entirety, alone). THE PROBLEM: when I load the canvas.php page independently in Firefox/Mozilla/Netscape and Explorer it displays perfectly. the problem comes when I load this file through 01.php, and then it gets rumbled up. I've seen this on most computers with Firefox/Mozilla/netscape, and not on Explorer. what the hell? any hel would be welcome. I have http://200.39.201.43/hideout/project/final/01.php pointing to the static canvas.php and http://200.39.201.43/hideout/project/final/02.php pointing to the dynamic canvas2.php if you can sort this out I'll be eternally grateful. I'll post the programs on request - they're quite large for mailing. thanks in advance, 3mip1s4la The Official Dream Theater Site - http://www.dreamtheater.net/ ___ Get your own Web-based E-mail Service at http://www.zzn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HELP PLEASE PHP
Hi, I have an situation on my hands I have a form that I am stuck using PHP for thanks to my friends choice of hosting company, I have no idea on how to setup a form in PHP other than HTML or in Flash, I need some one any one to give me some advice on this Posted layout it seems to work but not really, I managed to get it set up but for some reason when you hit Submit and an error message goes off at the top the form is Reset. Other than that I am not sure I wrote all the code correctly. Sorry About the long post Any advice would be great. www.mdycentrutionmtg.com/formtest.php Formtest.php-- ?PHP if ($submit) { if ($firstname = ) $message = Please enter your first name.; else if ($lastname = ) $message = Please enter your last name.; else if ($homephone = ) $message = Please enter your home phone number.; else if ($address = ) $message = Please enter your current home address.; else if ($city = ) $message = Please enter which city you currently live in.; else if ($state = ) $message = Please enter which state you currently live in.; else if ($zip = ) $message = Please enter your zip code.; else if ($monthlypayment = ) $message = Please enter the amount of your monthly payment.; else if ($presentemployer = ) $message = Please enter the name of your present employer.; else if ($rateofpay = ) $message = Please enter your rate of pay.; else if ($hoursperweek = ) $message = Please enter the average amount of hours worked in a week.; else if ($deposit = ) $message = Please enter the amount of your deposit.; else if ($maxpayment = ) $message = Please enter an average payment your comfortable with.; if ($message) echo ($yo); else { mail([EMAIL PROTECTED], Form Results, First Name $firstname, Middle Initial $middleinital, Last Name $lastname, Social Security Number $ss, Marital Status $maritalstatus, Home Phone $homephone, Address $address, City $city, State $state, Zip $zip, Apt Number $apt, Time at address $monthsataddress Months $yearsataddress Years, Type of residence $typeofres, Monthly Payment $monthlypayment, Current Employer $presentemployer, Time with Employer $monthswithemployer Months $yearswithemployer Years, Rate of Pay $rateofpay Dollars per $rateofpayper, Hours per week $hoursperweek, Work Phone $workphone, Work History $workhistory, Other Income $otherincome, Deposit $deposit, Maximum Payment $maxpayment, Type of Loan $typeofloan, Co First Name $cofirstname, Co Middle Initial $comiddleinital, Co Last Name $colastname, Co Social Security Number $coss, Co Marital Status $comaritalstatus, Co Home Phone $cohomephone, Co Address $coaddress, Co City $cocity, Co State $costate, Co Zip $cozip, Co Apt Number $coapt, Co Time at address $comonthsataddress Months $coyearsataddress Years, Co Type of residence $cotypeofres, Co Monthly Payment $comonthlypayment, Co Current Employer $copresentemployer, Co Time with Employer $comonthswithemployer Months $coyearswithemployer Years, Co Rate of Pay $corateofpay Dollars per $corateofpayper, Co Hours per week $cohoursperweek, Co Work Phone $coworkphone, From: $firstname $lastname, Subject: Online Form Application); $message = Thank You.; } } ? html head titleCenturion Loan Form/title /head body bgcolor=#71c4ca form method=post p div align=center table border=0 cellpadding=0 cellspacing=0 width=660 tr td colspan=2 div align=center bLoan Form/b addressfont size=-2Please fill in all the fields below to the best of your knowledge if you have any questions /fontfont size=-2please feel free to call me at 248-770-7518br /font/address /div address div align=center font size=2?php echo $message; ?/font/div p /p /address /td /tr tr td pBorrower/p /td tdCo-Borrower/td /tr tr td /td td/td /tr tr tdFirst Name/td tdFirst Name/td /tr tr tdinput type=text name=firstname size=25 maxlength=30 tabindex=1 MI input type=text name=middleinitial size=2 maxlength=2 tabindex=2/td tdinput type=text name=cofirstname size=25 maxlength=30 tabindex=23 MI input type=text name=comiddleinitial size=2 maxlength=2 tabindex=24/td /tr tr tdLast Name/td tdLast Name/td /tr tr tdinput type=text name=lastname size=25 maxlength=30 tabindex=3/td tdinput type=text name=colastname size=25 maxlength=30 tabindex=25/td /tr tr td pS.S. #/p /td td pS.S. #/p /td /tr tr td pinput type=text name=ss size=25 maxlength=11 tabindex=4/p /td td pinput type=text name=coss size=25 maxlength=11
Re: [PHP] HELP PLEASE PHP
Hello Patrick. Where to start, where to start Patrick wrote: Hi, I have an situation on my hands I have a form that I am stuck using PHP for thanks to my friends choice of hosting company, I have no idea on how to setup a form in PHP other than HTML or in Flash, I need some one any one to give me some advice on this Posted layout it seems to work but not really, I managed to get it set up but for some reason when you hit Submit and an error message goes off at the top the form is Reset. Other than that I am not sure I wrote all the code correctly. Sorry About the long post Any advice would be great. www.mdycentrutionmtg.com/formtest.php Formtest.php-- ?PHP Chances are, all your variables here are going to be empty, since I'm sure the hosting company has register_globals turned off. You can use the global _POST array... $_POST['firstname']...$_POST['lastname']...etc, etc Also, for your 'error' messages, a, well, I would if ( ! isset ( $_POST['firstname'] ) ) { $message .= Please enter your first name.br /\n; } Get rid of the 'else's, and use .= when setting your message value so that if multiple items are not filled out, you won't be constantly overwriting the error message. if ($submit) { if ($firstname = ) $message = Please enter your first name.; else if ($lastname = ) $message = Please enter your last name.; else if ($homephone = ) $message = Please enter your home phone number.; else if ($address = ) $message = Please enter your current home address.; else if ($city = ) $message = Please enter which city you currently live in.; else if ($state = ) $message = Please enter which state you currently live in.; else if ($zip = ) $message = Please enter your zip code.; else if ($monthlypayment = ) $message = Please enter the amount of your monthly payment.; else if ($presentemployer = ) $message = Please enter the name of your present employer.; else if ($rateofpay = ) $message = Please enter your rate of pay.; else if ($hoursperweek = ) $message = Please enter the average amount of hours worked in a week.; else if ($deposit = ) $message = Please enter the amount of your deposit.; else if ($maxpayment = ) $message = Please enter an average payment your comfortable with.; if ($message) echo ($yo); Don't know what $yo is here...I'm guessing that you're testing something? However, 'mail()' below here is going to crap out, and give you an error. Look here http://us2.php.net/manual/en/function.mail.php else { mail([EMAIL PROTECTED], Form Results, First Name $firstname, Middle Initial $middleinital, Last Name $lastname, Social Security Number $ss, Marital Status $maritalstatus, Home Phone $homephone, Address $address, City $city, State $state, Zip $zip, Apt Number $apt, Time at address $monthsataddress Months $yearsataddress Years, Type of residence $typeofres, Monthly Payment $monthlypayment, Current Employer $presentemployer, Time with Employer $monthswithemployer Months $yearswithemployer Years, Rate of Pay $rateofpay Dollars per $rateofpayper, Hours per week $hoursperweek, Work Phone $workphone, Work History $workhistory, Other Income $otherincome, Deposit $deposit, Maximum Payment $maxpayment, Type of Loan $typeofloan, Co First Name $cofirstname, Co Middle Initial $comiddleinital, Co Last Name $colastname, Co Social Security Number $coss, Co Marital Status $comaritalstatus, Co Home Phone $cohomephone, Co Address $coaddress, Co City $cocity, Co State $costate, Co Zip $cozip, Co Apt Number $coapt, Co Time at address $comonthsataddress Months $coyearsataddress Years, Co Type of residence $cotypeofres, Co Monthly Payment $comonthlypayment, Co Current Employer $copresentemployer, Co Time with Employer $comonthswithemployer Months $coyearswithemployer Years, Co Rate of Pay $corateofpay Dollars per $corateofpayper, Co Hours per week $cohoursperweek, Co Work Phone $coworkphone, From: $firstname $lastname, Subject: Online Form Application); $message = Thank You.; } } ? snip -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HELP PLEASE PHP
John Nichel wrote: Hello Patrick. Where to start, where to start Patrick wrote: Hi, I have an situation on my hands I have a form that I am stuck using PHP for thanks to my friends choice of hosting company, I have no idea on how to setup a form in PHP other than HTML or in Flash, I need some one any one to give me some advice on this Posted layout it seems to work but not really, I managed to get it set up but for some reason when you hit Submit and an error message goes off at the top the form is Reset. Other than that I am not sure I wrote all the code correctly. Sorry About the long post Any advice would be great. www.mdycentrutionmtg.com/formtest.php Formtest.php-- ?PHP Chances are, all your variables here are going to be empty, since I'm sure the hosting company has register_globals turned off. You can use the global _POST array... $_POST['firstname']...$_POST['lastname']...etc, etc Also, for your 'error' messages, a, well, I would if ( ! isset ( $_POST['firstname'] ) ) { $message .= Please enter your first name.br /\n; } Get rid of the 'else's, and use .= when setting your message value so that if multiple items are not filled out, you won't be constantly overwriting the error message. if ($submit) { or you could use this... if(empty($firstname)) { $message .= } elseif(empty($lastname)) { $message .= You might have to use it like this though depending on if your using GET or POST if(empty($_POST[$firstname]) { $message .= } elseif(empty($_POST[$lastname]) { $message .= Or you could just combine them all like so... if((empty($_POST[$firstname]) || (emtpy($_POST[$lastname])) || ... { $message = nothing filled out... HTH Jas if ($firstname = ) $message = Please enter your first name.; else if ($lastname = ) $message = Please enter your last name.; else if ($homephone = ) $message = Please enter your home phone number.; else if ($address = ) $message = Please enter your current home address.; else if ($city = ) $message = Please enter which city you currently live in.; else if ($state = ) $message = Please enter which state you currently live in.; else if ($zip = ) $message = Please enter your zip code.; else if ($monthlypayment = ) $message = Please enter the amount of your monthly payment.; else if ($presentemployer = ) $message = Please enter the name of your present employer.; else if ($rateofpay = ) $message = Please enter your rate of pay.; else if ($hoursperweek = ) $message = Please enter the average amount of hours worked in a week.; else if ($deposit = ) $message = Please enter the amount of your deposit.; else if ($maxpayment = ) $message = Please enter an average payment your comfortable with.; if ($message) echo ($yo); Don't know what $yo is here...I'm guessing that you're testing something? However, 'mail()' below here is going to crap out, and give you an error. Look here http://us2.php.net/manual/en/function.mail.php else { mail([EMAIL PROTECTED], Form Results, First Name $firstname, Middle Initial $middleinital, Last Name $lastname, Social Security Number $ss, Marital Status $maritalstatus, Home Phone $homephone, Address $address, City $city, State $state, Zip $zip, Apt Number $apt, Time at address $monthsataddress Months $yearsataddress Years, Type of residence $typeofres, Monthly Payment $monthlypayment, Current Employer $presentemployer, Time with Employer $monthswithemployer Months $yearswithemployer Years, Rate of Pay $rateofpay Dollars per $rateofpayper, Hours per week $hoursperweek, Work Phone $workphone, Work History $workhistory, Other Income $otherincome, Deposit $deposit, Maximum Payment $maxpayment, Type of Loan $typeofloan, Co First Name $cofirstname, Co Middle Initial $comiddleinital, Co Last Name $colastname, Co Social Security Number $coss, Co Marital Status $comaritalstatus, Co Home Phone $cohomephone, Co Address $coaddress, Co City $cocity, Co State $costate, Co Zip $cozip, Co Apt Number $coapt, Co Time at address $comonthsataddress Months $coyearsataddress Years, Co Type of residence $cotypeofres, Co Monthly Payment $comonthlypayment, Co Current Employer $copresentemployer, Co Time with Employer $comonthswithemployer Months $coyearswithemployer Years, Co Rate of Pay $corateofpay Dollars per $corateofpayper, Co Hours per week $cohoursperweek, Co Work Phone $coworkphone, From: $firstname $lastname, Subject: Online Form Application); $message = Thank You.; } } ? snip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HELP PLEASE PHP
Hello Patrick, I have good news and even better news for you. The good news is that you can make all your form-related woes disappear in less than a day. The even better news is that everything you need to know in order to solve your problem can be found in one convenient location: http://www.php.net/manual/en/index.php You'll probably be able to fix your form just by reading sections I and II. By the way, punctuation was invented for a reason, you know. You might want to consider using it. Good luck, Erik On 29 Jan 2004 at 1:56, Patrick wrote: Hi, I have an situation on my hands I have a form that I am stuck using PHP for thanks to my friends choice of hosting company, I have no idea on how to setup a form in PHP other than HTML or in Flash, I need some one any one to give me some advice on this Posted layout it seems to work but not really, I managed to get it set up but for some reason when you hit Submit and an error message goes off at the top the form is Reset. Other than that I am not sure I wrote all the code correctly. Sorry About the long post Any advice would be great. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HELP PLEASE PHP
Man, you really are a card Erik. Fellow manual reader, Jas [EMAIL PROTECTED] wrote: Hello Patrick, I have good news and even better news for you. The good news is that you can make all your form-related woes disappear in less than a day. The even better news is that everything you need to know in order to solve your problem can be found in one convenient location: http://www.php.net/manual/en/index.php You'll probably be able to fix your form just by reading sections I and II. By the way, punctuation was invented for a reason, you know. You might want to consider using it. Good luck, Erik On 29 Jan 2004 at 1:56, Patrick wrote: Hi, I have an situation on my hands I have a form that I am stuck using PHP for thanks to my friends choice of hosting company, I have no idea on how to setup a form in PHP other than HTML or in Flash, I need some one any one to give me some advice on this Posted layout it seems to work but not really, I managed to get it set up but for some reason when you hit Submit and an error message goes off at the top the form is Reset. Other than that I am not sure I wrote all the code correctly. Sorry About the long post Any advice would be great. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help Please in using fopen in PHP
On Monday 11 August 2003 18:23, [EMAIL PROTECTED] wrote: I am currently learning php and Mysql a scripting language and DB i just feel in love with. I am currently having problem in opening file to put data collected from clients when the purchase from an online shop. The scripts is as follows. where i am having problem is this // open file for appending $fp = fopen($DOCUMENT_ROOT/../orders/orders.txt , 'a'); flock($fp, LOCK_EX); Please can someone advise me on how i should go about this. Do i need to creat a file for orders/orders or is i the script that will do it for me authomatically. I am confused here. I will be glad if someone can help me out. Thanks. manual fwrite() for example on how to write to a file. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Any time things appear to be going better, you have overlooked something. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help Please in using fopen in PHP
Hi Folks, I am currently learning php and Mysql a scripting language and DB i just feel in love with. I am currently having problem in opening file to put data collected from clients when the purchase from an online shop. The scripts is as follows. where i am having problem is this // open file for appending $fp = fopen($DOCUMENT_ROOT/../orders/orders.txt , 'a'); flock($fp, LOCK_EX); Please can someone advise me on how i should go about this. Do i need to creat a file for orders/orders or is i the script that will do it for me authomatically. I am confused here. I will be glad if someone can help me out. Thanks. OZ UK The scripts is below: = ?php //create short variable names $tireqty = $HTTP_POST_VARS['tireqty']; $oilqty = $HTTP_POST_VARS['oilqty']; $sparkqty = $HTTP_POST_VARS['sparkqty']; $address = $HTTP_POST_VARS['address']; $DOCUMENT_ROOT = $HTTP_SERVER_VARS['DOCUMENT_ROOT']; ? html head titleBob's Auto Parts - Order Results/title /head body h1Bob's Auto Parts/h1 h2Order Results/h2 ?php $totalqty = 0; $totalqty += $tireqty; $totalqty += $oilqty; $totalqty += $sparkqty; $totalamount = 0.00; define('TIREPRICE', 100); define('OILPRICE', 10); define('SPARKPRICE', 4); $date = date('H:i, jS F'); echo 'pOrder processed at '; echo $date; echo 'br /'; echo 'pYour order is as follows:'; echo 'br /'; if( $totalqty == 0 ) { echo 'You did not order anything on the previous page!br /'; } else { if ( $tireqty0 ) echo $tireqty.' tiresbr /'; if ( $oilqty0 ) echo $oilqty.' bottles of oilbr /'; if ( $sparkqty0 ) echo $sparkqty.' spark plugsbr /'; } $total = $tireqty * TIREPRICE + $oilqty * OILPRICE + $sparkqty * SPARKPRICE; $total=number_format($total, 2, '.', ' '); echo 'PTotal of order is '.$total.'/p'; echo 'PAddress to ship to is '.$address.'br /'; $outputstring = $date.\t.$tireqty. tires \t.$oilqty. oil\t .$sparkqty. spark plugs\t\$.$total .\t. $address.\n; // open file for appending $fp = fopen($DOCUMENT_ROOT/../orders/orders.txt , 'a'); flock($fp, LOCK_EX); if (!$fp) { echo 'pstrong Your order could not be processed at this time. ' .'Please try again later./strong/p/body/html'; exit; } fwrite($fp, $outputstring); flock($fp, LOCK_UN); fclose($fp); echo 'pOrder written./p'; ? /body /html
[PHP] Help please!
Hi php-general-digest, I have subscribed to news://news.php.net/php.general. But when I post something (i'm using Outlook Express), it seems that the post is sent; but in fact it isn't and so I don't find my post(s) on the newsgroup. Help please! Nadim Attari
[PHP] HELP PLEASE
AGES AND TRYING TO FIND A GOOD RSS CREATOR , PLEASE HELP, NOTE THAT I TRIED http://www.phpclasses.org . PHP Classes Repository BUT I DIDN'T MANAGE PLEASE HELP ME -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HELP PLEASE
On Sun, 8 Jun 2003 13:31:25 +0300, you wrote: AGES AND TRYING TO FIND A GOOD RSS CREATOR , PLEASE HELP, NOTE THAT I TRIED http://www.phpclasses.org . PHP Classes Repository BUT I DIDN'T MANAGE PLEASE HELP ME A simple RSS document is pretty easy to generate. It's just text... even using XML classes is overkill. Output a header like this: header (Content-Type: text/xml); and then a document like this: ?xml version=1.0 encoding=ISO-8859-1 ? rss version=2.0 channel titleBBC News Online/title linkhttp://news.bbc.co.uk//link descriptionBBC News Online/description image titleBBC News Online/title urlhttp://news.bbc.co.uk/furniture/syndication/bbc_news_120x60.gif/url linkhttp://news.bbc.co.uk//link /image item titleSharon warns Palestinians on terror/title linkhttp://news.bbc.co.uk/go/click/rss/1.0/ticker/-/1/hi/world/middle_east/2973816.stm/link /item item titleLull in Mauritania coup violence/title linkhttp://news.bbc.co.uk/go/click/rss/1.0/ticker/-/1/hi/world/africa/2974006.stm/link /item /channel /rss There are more tags you can use (see http://backend.userland.com/rss2) but that's the basic structure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help please was: openssl php 4.3.1
here is a real example: $fp = fopen (http://store.el.net/index.html;, r); while (!feof($fp)) { echo fgets ($fp,4096); } this works fine... if you try it with https you'll get an error - file not found from php if you try the same url with https in the any browser you wont have any problems can somebody explain where to look at - i do have open ssl compiled within php and everything else works fine - php 4.3.1 * openssl 0.9.6h * apache 1.3.27 on FreeBSD 4.6 i got a response earlier from a list member pointing out a security vulnerability for this version of openssl. how can that influence the fopen()'s https request, if at all? how exactly is the https request from fopen() passed to the ssl? if the ssl works through the broser what can be the reasons that it would not through php's fopen() or fsockopen() will going back to php 4.3.0 help? or getting another (newer/older) openssl? i am desperate for a solution. thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HELP PLEASE ! Need PHP Advice !!!
can anyone give me some good advise on how abouts I should go about maintaining a newspaper website. here is what is currently in place and how i want it to be managed right now the newspapers are published in a quark file from that file pictures have to be placed in photoshop and resized , croped and what not and then inserted into a html page, the content i.e text is in this quark file as well and is copied and pasted into a html file, what i want to do is have the site automated to some extent so i do not have to be doing all this copying and pasteing it's a total waste valueable time. what i would like to have it some way to have a php script to take this info from the quark file and the pictures and have them either transfered to a html page or to a database from there i could call from the php script. ANYONE HAVE ANY IDEAS ON A GOOD WAY TO GO ABOUT THIS ... PLEASE CONTACT ME [EMAIL PROTECTED] remove the NOSPAM from address -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HELP PLEASE ! Need PHP Advice !!!
First of all, are they paying you to automate or to repurpose the content for the web? Taking a page designed for print and then automating it into a page for the web is the wrong approach, your problem is not technical it is a design problem. Technically it is easy, I think, does Quark not have XML output? Or I think it is able to save document as HTML for the web too, then if you want to automate all u have to do is make a script that includes those pages inside a site shell. I actually wrote something like this that one could save an html file from word and upload it and it would be on the site, but again, I think it's a bad idea. You should NOT try to automate this, you should look into hiring a fulltime repurposing designer, at LEAST you should read designing Web Usability by Jacob Nielson, then maybe u get a better idea of what you SHOULD do. - Vic -Original Message- From: justin brenton [mailto:[EMAIL PROTECTED] Sent: Thursday, February 27, 2003 7:24 AM To: [EMAIL PROTECTED] Subject: [PHP] HELP PLEASE ! Need PHP Advice !!! can anyone give me some good advise on how abouts I should go about maintaining a newspaper website. here is what is currently in place and how i want it to be managed right now the newspapers are published in a quark file from that file pictures have to be placed in photoshop and resized , croped and what not and then inserted into a html page, the content i.e text is in this quark file as well and is copied and pasted into a html file, what i want to do is have the site automated to some extent so i do not have to be doing all this copying and pasteing it's a total waste valueable time. what i would like to have it some way to have a php script to take this info from the quark file and the pictures and have them either transfered to a html page or to a database from there i could call from the php script. ANYONE HAVE ANY IDEAS ON A GOOD WAY TO GO ABOUT THIS ... PLEASE CONTACT ME [EMAIL PROTECTED] remove the NOSPAM from address -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Post your free ad now! http://personals.yahoo.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HELP PLEASE ! Need PHP Advice !!!
Right, well there's a few issues here. 1. You're asking if there's a way to parse a QXD file so retrieve the text from it. I doubt this can be done. I had a quick google for it, to no luck. I also bothered to open up a Quark 3.32 file in my text editor, to check out the source. It looks pretty complex. However, there MAY be some light at the end of the tunnel. a) PHP *IS* able to read and write PDF format. Prerhaps if your newspaper designers export a PDF of the newspaper (relatively easy). you can pick up the pieces you need through the PDF, rather than the QXD file. b) What you're really talking about is using one set of data in multiple ways (web print, then maybe email, WAP, PDA, etc). What I'd be aiming to do is have all the text/content stored in a shared database or easy-to-parse file format (like XML), so that the writers write to this format, then the designers copy + paste to Quark, the editors can edit directly in the XML file or via database GUIs, and people in charge of other content formats (like web_ can either copy + paste from the central content, or parse it with a program like PHP. c) Perhaps your company should look at Adobe InDesign 2 -- I read an article which briefly discussed it's ability to parse or read from XML files -- so you could have a simple XML doc: --- article id28/id titleLearning about XML/heading subtitleI wish I had time to explore this properly!/subtitle authorJustin French/author email[EMAIL PROTECTED]/email keywordsXML,Justin,Foo,Bah,PHP/keywords content p class=introIn this article, I'll attempt to show you some blah blah./p pParagraph 1/p pParagraph 2/p pParagraph 3/p p class=footerThis is my footer/p /content /article --- I *think* InDesign 2 can take this data, and with the designer's help, format it to a designed article. At the very least, you could export some nice clean plain text for the designer to copy+paste, which is probably what they already do (copy+paste from Word to Quark. 2. Image files in Quark need to be either TIFF or EPS format. So, what you need is a way of copying these files, converting them to JPEGs, GIFs or PNGs, and resizing them to suit the web. I don't really know if the image functions in PHP can do this... best left to others. You *could* batch convert everything to a RGB JPEG using photoshops batch processing and actions, THEN get PHP or Photoshop to do the resizing etc. However, cropping and whatnot of a file is often something that can ONLY be done by eye... You may never be able to achieve this with automated computer programs. Think about the real issue. Is it taking stuff from quark and messing with it, or is it having a good clean source of data which can be used many ways? Justin French on 28/02/03 12:24 AM, justin brenton ([EMAIL PROTECTED]) wrote: can anyone give me some good advise on how abouts I should go about maintaining a newspaper website. here is what is currently in place and how i want it to be managed right now the newspapers are published in a quark file from that file pictures have to be placed in photoshop and resized , croped and what not and then inserted into a html page, the content i.e text is in this quark file as well and is copied and pasted into a html file, what i want to do is have the site automated to some extent so i do not have to be doing all this copying and pasteing it's a total waste valueable time. what i would like to have it some way to have a php script to take this info from the quark file and the pictures and have them either transfered to a html page or to a database from there i could call from the php script. ANYONE HAVE ANY IDEAS ON A GOOD WAY TO GO ABOUT THIS ... PLEASE CONTACT ME [EMAIL PROTECTED] remove the NOSPAM from address -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help please
Hello all, I am having problems with a script. The script works great on one of my sights, however, when I transferred it to another site, it does not function. I contacted my hosting company (both sites are on the same server), they told me that I needed to check the script and that it has nothing to do with them, since they ran a test.php and it worked fine. Here is the script: ?PHP $ToEmail = [EMAIL PROTECTED]; $ToSubject = Flash Contact Form; $EmailBody = Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n; mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName. .$Email.); ? Please if anyone knows anything about this stuff (Im a newbie to this) You help is greatly appreciated! Thanks in advance, mark johnson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help please
Hello all, I am having problems with a script. The script works great on one of my sights, however, when I transferred it to another site, it does not function. I contacted my hosting company (both sites are on the same server), they told me that I needed to check the script and that it has nothing to do with them, since they ran a test.php and it worked fine. Here is the script: ?PHP $ToEmail = [EMAIL PROTECTED]; $ToSubject = Flash Contact Form; $EmailBody = Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n; mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName. .$Email.); ? Please if anyone knows anything about this stuff (Im a newbie to this) You help is greatly appreciated! Thanks in advance, mark johnson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fwd: Re: [PHP] help please
There is no need to post this thrice. Anyway. What went wrong? Did you get an error message? Are both sites on the same machine? At 18:40 25-2-03, you wrote: Hello all, I am having problems with a script. The script works great on one of my sights, however, when I transferred it to another site, it does not function. I contacted my hosting company (both sites are on the same server), they told me that I needed to check the script and that it has nothing to do with them, since they ran a test.php and it worked fine. Here is the script: ?PHP $ToEmail = [EMAIL PROTECTED]; $ToSubject = Flash Contact Form; $EmailBody = Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n; mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName. .$Email.); ? Please if anyone knows anything about this stuff (Im a newbie to this) You help is greatly appreciated! Thanks in advance, mark johnson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help please
Mark, you've GOT to give us something to work on. We're not ESP, well, at least I am not. Try debugging a bit. Echo all values just before you do the mail(), see whether they really are what you thought they were. Try a simple script that will only send a mail, take the example from the manual (www.php.net/mail) Try setting the error warning level high for a while, by adding this to the file: error_reporting (E_ALL); PS please keep the discussion in the list At 19:15 25-2-03, you wrote: Chris, Im so sorry about the posting three times, I didnt know how to do it, then I subscribed after I sent it twice. I cant figure out what is wrong with the script. I do not get an error message. Basically, I am suppsed to get an email with the info that the user entered. I get the email from http://www.bionicegg.com/html/Mail.html , but It doesnt work for http://www.nypalet.com/Mail.html . I do not know jack about PDP, I got the script from www.flashkit.com. Thanks so much for the response. Mark J - Original Message - From: Chris Hayes [EMAIL PROTECTED] To: bionicegg [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 1:07 PM Subject: Re: [PHP] help please There is no need to post this thrice. Anyway. What went wrong? Did you get an error message? Are both sites on the same machine? At 18:40 25-2-03, you wrote: Hello all, I am having problems with a script. The script works great on one of my sights, however, when I transferred it to another site, it does not function. I contacted my hosting company (both sites are on the same server), they told me that I needed to check the script and that it has nothing to do with them, since they ran a test.php and it worked fine. Here is the script: ?PHP $ToEmail = [EMAIL PROTECTED]; $ToSubject = Flash Contact Form; $EmailBody = Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n; mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName. .$Email.); ? Please if anyone knows anything about this stuff (Im a newbie to this) You help is greatly appreciated! Thanks in advance, mark johnson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help please
Do you need an answer for each of the times that you posted it? 1) Posting code is good, however telling us it doesn't work is no good. What are the error messages, if any? Why is it not working, ie what did you expect it to do? 2) What version of php on the old site as compared to the new site? 3) Where are your variables coming from? Like $Firstname and $Email? 4) Did you look at this http://www.php.net/manual/en/language.variables.scope.php http://www.php.net/manual/en/language.variables.external.php bionicegg wrote: Hello all, I am having problems with a script. The script works great on one of my sights, however, when I transferred it to another site, it does not function. I contacted my hosting company (both sites are on the same server), they told me that I needed to check the script and that it has nothing to do with them, since they ran a test.php and it worked fine. Here is the script: ?PHP $ToEmail = [EMAIL PROTECTED]; $ToSubject = Flash Contact Form; $EmailBody = Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n; mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName. .$Email.); ? Please if anyone knows anything about this stuff (Im a newbie to this) You help is greatly appreciated! Thanks in advance, mark johnson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] help please
It would be helpful to find out what error messages you are getting when you run the script. if(!mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName..$Email.)) die(Unable to send message); would be a good start. I'm not sure if there is a system error you could replace unable to send message with. Robbert van Andel -Original Message- From: bionicegg [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 9:41 AM To: [EMAIL PROTECTED] Subject: [PHP] help please Hello all, I am having problems with a script. The script works great on one of my sights, however, when I transferred it to another site, it does not function. I contacted my hosting company (both sites are on the same server), they told me that I needed to check the script and that it has nothing to do with them, since they ran a test.php and it worked fine. Here is the script: ?PHP $ToEmail = [EMAIL PROTECTED]; $ToSubject = Flash Contact Form; $EmailBody = Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n; mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName. .$Email.); ? Please if anyone knows anything about this stuff (Im a newbie to this) You help is greatly appreciated! Thanks in advance, mark johnson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help please
My guess is that register globals is turned off on your new site. Or maybe, the new site isn't set up to parse php with *.html extensions. Being that it's all embedded flash, I can't give you much more than that. bionicegg wrote: John, Im so sorry about the posting three times, I didnt know how to do it, then I subscribed after I sent it twice. I cant figure out what is wrong with the script. I do not get an error message. Basically, I am suppsed to get an email with the info that the user entered. I get the email from http://www.bionicegg.com/html/Mail.html , but It doesnt work for http://www.nypalet.com/Mail.html . I do not know jack about PDP, I got the script from www.flashkit.com. Thanks so much for the response. Mark J - Original Message - From: John Nichel [EMAIL PROTECTED] To: bionicegg [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, February 25, 2003 1:20 PM Subject: Re: [PHP] help please Do you need an answer for each of the times that you posted it? 1) Posting code is good, however telling us it doesn't work is no good. What are the error messages, if any? Why is it not working, ie what did you expect it to do? 2) What version of php on the old site as compared to the new site? 3) Where are your variables coming from? Like $Firstname and $Email? 4) Did you look at this http://www.php.net/manual/en/language.variables.scope.php http://www.php.net/manual/en/language.variables.external.php bionicegg wrote: Hello all, I am having problems with a script. The script works great on one of my sights, however, when I transferred it to another site, it does not function. I contacted my hosting company (both sites are on the same server), they told me that I needed to check the script and that it has nothing to do with them, since they ran a test.php and it worked fine. Here is the script: ?PHP $ToEmail = [EMAIL PROTECTED]; $ToSubject = Flash Contact Form; $EmailBody = Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n; mail($ToName. .$ToEmail.,$ToSubject, $EmailBody, From: .$FirstName. .$Email.); ? Please if anyone knows anything about this stuff (Im a newbie to this) You help is greatly appreciated! Thanks in advance, mark johnson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help Please
Hi All, i am new to qmail and linux so bear with me.first of all i would like to clearly state my situation here.we have to servers linux+windows.we have qmail installed on linux.wesite is hosted on windows.now i want to create user from my webbased signin form.(which is on win2k).how can i do this?. 2nd thing.is it necessary to create system accounts for users on linux.(just want to give them email account from qmail).what is the best colution for this. please help me.as i am new to qmail. thanx Haseeb --- Msg sent via Mail - http://atmail.nl/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help Please
Hi, Sunday, February 23, 2003, 10:43:36 PM, you wrote: HI Hi All, HI i am new to qmail and linux so bear with me.first of all i would like to clearly state my situation here.we have to HI servers linux+windows.we have qmail installed on linux.wesite is hosted on windows.now i want to create user from my HI webbased signin form.(which is on win2k).how can i do this?. HI 2nd thing.is it necessary to create system accounts for users on linux.(just want to give them email account from HI qmail).what is the best colution for this. HI please help me.as i am new to qmail. HI thanx HI Haseeb HI --- Msg sent via @Mail - http://atmail.nl/ Take a look at vpopmail, it will do all you need http://www.inter7.com/vpopmail.html -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HELP please quickly
Here is a brief description of what I want to do. I want to use PHP to grab a list of numbers in one file. Check it against a bigger file and strip the ones that match out of the bigger file, into a holding file. so here is what it might look like. file1.txt 456789 456790 456791 456792 456793 456794 file2.log some time stamp code=001;number=456784;name=blahblah;date=012403; some time stamp code=001;number=456785;name=blahblah;date=012403; some time stamp code=001;number=456786;name=blahblah;date=012303; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456790;name=blahblah;date=012603; some time stamp code=001;number=456791;name=blahblah;date=012703; notice there might be more then one of the same number, I only need one so I need to ignore the rest, rip out the time stamp, which is a seperate line. file3.txt code=001;number=456789;name=blahblah;date=012503; code=001;number=456790;name=blahblah;date=012603; code=001;number=456791;name=blahblah;date=012703; can anyone help, any suggestions? _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HELP please quickly
You first file just requires loading into an array and you can use unique array functions to remove duplicates etc.. The other files simply load into an array and use preg to strip out what you want and follow the same checking and removal of duplicates. Checkout: preg_match and array functions in the www.php.net manual. Timothy Hitchens (HiTCHO) Open Source Consulting e-mail: [EMAIL PROTECTED] -Original Message- From: Didier McGillis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 22 January 2003 11:22 PM To: [EMAIL PROTECTED] Subject: [PHP] HELP please quickly Here is a brief description of what I want to do. I want to use PHP to grab a list of numbers in one file. Check it against a bigger file and strip the ones that match out of the bigger file, into a holding file. so here is what it might look like. file1.txt 456789 456790 456791 456792 456793 456794 . file2.log some time stamp code=001;number=456784;name=blahblah;date=012403; some time stamp code=001;number=456785;name=blahblah;date=012403; some time stamp code=001;number=456786;name=blahblah;date=012303; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456790;name=blahblah;date=012603; some time stamp code=001;number=456791;name=blahblah;date=012703; notice there might be more then one of the same number, I only need one so I need to ignore the rest, rip out the time stamp, which is a seperate line. file3.txt code=001;number=456789;name=blahblah;date=012503; code=001;number=456790;name=blahblah;date=012603; code=001;number=456791;name=blahblah;date=012703; can anyone help, any suggestions? _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HELP please quickly
In that case, I don't know of any PHP classes to help you. - Original Message - From: Didier McGillis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 22, 2003 7:53 AM Subject: Re: [PHP] HELP please quickly No. The numbers are coming from two text files. The first text file is the file that I need to compare against the second file, and if I find one match in the second file, I need to move it to the third file. From: Rick Emery [EMAIL PROTECTED] Reply-To: Rick Emery [EMAIL PROTECTED] To: Didier McGillis [EMAIL PROTECTED],[EMAIL PROTECTED] Subject: Re: [PHP] HELP please quickly Date: Wed, 22 Jan 2003 07:45:20 -0600 Are the numbers coming from a mysql database? If so, mysql can handle this chore. - Original Message - From: Didier McGillis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 22, 2003 7:21 AM Subject: [PHP] HELP please quickly Here is a brief description of what I want to do. I want to use PHP to grab a list of numbers in one file. Check it against a bigger file and strip the ones that match out of the bigger file, into a holding file. so here is what it might look like. file1.txt 456789 456790 456791 456792 456793 456794 file2.log some time stamp code=001;number=456784;name=blahblah;date=012403; some time stamp code=001;number=456785;name=blahblah;date=012403; some time stamp code=001;number=456786;name=blahblah;date=012303; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456790;name=blahblah;date=012603; some time stamp code=001;number=456791;name=blahblah;date=012703; notice there might be more then one of the same number, I only need one so I need to ignore the rest, rip out the time stamp, which is a seperate line. file3.txt code=001;number=456789;name=blahblah;date=012503; code=001;number=456790;name=blahblah;date=012603; code=001;number=456791;name=blahblah;date=012703; can anyone help, any suggestions? _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HELP please quickly
Cool I'll report back what I have found. Question. I have tried fopen and file and was wondering for opening the file and loading it into an array which one is better? From: Timothy Hitchens \(HiTCHO\) [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: 'Didier McGillis' [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [PHP] HELP please quickly Date: Wed, 22 Jan 2003 23:26:10 +1000 You first file just requires loading into an array and you can use unique array functions to remove duplicates etc.. The other files simply load into an array and use preg to strip out what you want and follow the same checking and removal of duplicates. Checkout: preg_match and array functions in the www.php.net manual. Timothy Hitchens (HiTCHO) Open Source Consulting e-mail: [EMAIL PROTECTED] -Original Message- From: Didier McGillis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 22 January 2003 11:22 PM To: [EMAIL PROTECTED] Subject: [PHP] HELP please quickly Here is a brief description of what I want to do. I want to use PHP to grab a list of numbers in one file. Check it against a bigger file and strip the ones that match out of the bigger file, into a holding file. so here is what it might look like. file1.txt 456789 456790 456791 456792 456793 456794 . file2.log some time stamp code=001;number=456784;name=blahblah;date=012403; some time stamp code=001;number=456785;name=blahblah;date=012403; some time stamp code=001;number=456786;name=blahblah;date=012303; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456790;name=blahblah;date=012603; some time stamp code=001;number=456791;name=blahblah;date=012703; notice there might be more then one of the same number, I only need one so I need to ignore the rest, rip out the time stamp, which is a seperate line. file3.txt code=001;number=456789;name=blahblah;date=012503; code=001;number=456790;name=blahblah;date=012603; code=001;number=456791;name=blahblah;date=012703; can anyone help, any suggestions? _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HELP please quickly
I'm pretty new to PHP so I can't help you with the code per se, but how about as an outline; Open the first file and read values into an array. Open the 2nd file and read in the first line. Compare each value in the array to see if it occurs in the line from the 2nd file you just read in. If it occurs then write that value to the 3rd file Repeat until the array ends File functions are here - http://www.php.net/manual/en/ref.filesystem.php - the only one I can't see is the ability to delete a line in a file - at least without creating another holding filevery messy that way tho...I'll keep looking. As an exercise to myself I'll try and recreate it using the 2 example files belowdunno how long it'll take me tho ;o) Good luck Nick -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: 22 January 2003 13:57 To: Didier McGillis Cc: [EMAIL PROTECTED] Subject: Re: [PHP] HELP please quickly In that case, I don't know of any PHP classes to help you. - Original Message - From: Didier McGillis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 22, 2003 7:53 AM Subject: Re: [PHP] HELP please quickly No. The numbers are coming from two text files. The first text file is the file that I need to compare against the second file, and if I find one match in the second file, I need to move it to the third file. From: Rick Emery [EMAIL PROTECTED] Reply-To: Rick Emery [EMAIL PROTECTED] To: Didier McGillis [EMAIL PROTECTED],[EMAIL PROTECTED] Subject: Re: [PHP] HELP please quickly Date: Wed, 22 Jan 2003 07:45:20 -0600 Are the numbers coming from a mysql database? If so, mysql can handle this chore. - Original Message - From: Didier McGillis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 22, 2003 7:21 AM Subject: [PHP] HELP please quickly Here is a brief description of what I want to do. I want to use PHP to grab a list of numbers in one file. Check it against a bigger file and strip the ones that match out of the bigger file, into a holding file. so here is what it might look like. file1.txt 456789 456790 456791 456792 456793 456794 file2.log some time stamp code=001;number=456784;name=blahblah;date=012403; some time stamp code=001;number=456785;name=blahblah;date=012403; some time stamp code=001;number=456786;name=blahblah;date=012303; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456790;name=blahblah;date=012603; some time stamp code=001;number=456791;name=blahblah;date=012703; notice there might be more then one of the same number, I only need one so I need to ignore the rest, rip out the time stamp, which is a seperate line. file3.txt code=001;number=456789;name=blahblah;date=012503; code=001;number=456790;name=blahblah;date=012603; code=001;number=456791;name=blahblah;date=012703; can anyone help, any suggestions? _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This private and confidential e-mail has been sent to you by Egg. The Egg group of companies includes Egg Banking plc (registered no. 2999842), Egg Financial Products Ltd (registered no. 3319027) and Egg Investments Ltd (registered no. 3403963) which carries out investment business on behalf of Egg and is regulated by the Financial Services Authority. Registered in England and Wales. Registered offices: 1 Waterhouse Square, 138-142 Holborn, London EC1N 2NA. If you are not the intended recipient of this e-mail and have received it in error, please notify the sender by replying with 'received in error' as the subject and then delete it from your mailbox. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HELP please quickly
file already returns an array so this would be best for that :). Thomas On Wed, 22 Jan 2003 14:00:09 + [EMAIL PROTECTED] (Didier McGillis) wrote: Cool I'll report back what I have found. Question. I have tried fopen and file and was wondering for opening the file and loading it into an array which one is better? From: Timothy Hitchens \(HiTCHO\) [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: 'Didier McGillis' [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [PHP] HELP please quickly Date: Wed, 22 Jan 2003 23:26:10 +1000 You first file just requires loading into an array and you can use unique array functions to remove duplicates etc.. The other files simply load into an array and use preg to strip out what you want and follow the same checking and removal of duplicates. Checkout: preg_match and array functions in the www.php.net manual. Timothy Hitchens (HiTCHO) Open Source Consulting e-mail: [EMAIL PROTECTED] -Original Message- From: Didier McGillis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 22 January 2003 11:22 PM To: [EMAIL PROTECTED] Subject: [PHP] HELP please quickly Here is a brief description of what I want to do. I want to use PHP to grab a list of numbers in one file. Check it against a bigger file and strip the ones that match out of the bigger file, into a holding file. so here is what it might look like. file1.txt 456789 456790 456791 456792 456793 456794 . file2.log some time stamp code=001;number=456784;name=blahblah;date=012403; some time stamp code=001;number=456785;name=blahblah;date=012403; some time stamp code=001;number=456786;name=blahblah;date=012303; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456790;name=blahblah;date=012603; some time stamp code=001;number=456791;name=blahblah;date=012703; notice there might be more then one of the same number, I only need one so I need to ignore the rest, rip out the time stamp, which is a seperate line. file3.txt code=001;number=456789;name=blahblah;date=012503; code=001;number=456790;name=blahblah;date=012603; code=001;number=456791;name=blahblah;date=012703; can anyone help, any suggestions? _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail -- Thomas Seifert mailto:[EMAIL PROTECTED] http://www.MyPhorum.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HELP please quickly
Cool. Thanks for the information. I try and organize my thoughts like that as well. I dont really need to delete anything, mostly move and copy. One problem I have run into is my second file seems to be too big. In just doing a simple count the first file was fine, found my 470 lines. The second file is 7.1MB and seems to fail telling me Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 81 bytes) So it seems to be on hurrdle at a time. From: Clarkson, Nick [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: [PHP] HELP please quickly Date: Wed, 22 Jan 2003 14:15:32 - I'm pretty new to PHP so I can't help you with the code per se, but how about as an outline; Open the first file and read values into an array. Open the 2nd file and read in the first line. Compare each value in the array to see if it occurs in the line from the 2nd file you just read in. If it occurs then write that value to the 3rd file Repeat until the array ends File functions are here - http://www.php.net/manual/en/ref.filesystem.php - the only one I can't see is the ability to delete a line in a file - at least without creating another holding filevery messy that way tho...I'll keep looking. As an exercise to myself I'll try and recreate it using the 2 example files belowdunno how long it'll take me tho ;o) Good luck Nick -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: 22 January 2003 13:57 To: Didier McGillis Cc: [EMAIL PROTECTED] Subject: Re: [PHP] HELP please quickly In that case, I don't know of any PHP classes to help you. - Original Message - From: Didier McGillis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 22, 2003 7:53 AM Subject: Re: [PHP] HELP please quickly No. The numbers are coming from two text files. The first text file is the file that I need to compare against the second file, and if I find one match in the second file, I need to move it to the third file. From: Rick Emery [EMAIL PROTECTED] Reply-To: Rick Emery [EMAIL PROTECTED] To: Didier McGillis [EMAIL PROTECTED],[EMAIL PROTECTED] Subject: Re: [PHP] HELP please quickly Date: Wed, 22 Jan 2003 07:45:20 -0600 Are the numbers coming from a mysql database? If so, mysql can handle this chore. - Original Message - From: Didier McGillis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 22, 2003 7:21 AM Subject: [PHP] HELP please quickly Here is a brief description of what I want to do. I want to use PHP to grab a list of numbers in one file. Check it against a bigger file and strip the ones that match out of the bigger file, into a holding file. so here is what it might look like. file1.txt 456789 456790 456791 456792 456793 456794 file2.log some time stamp code=001;number=456784;name=blahblah;date=012403; some time stamp code=001;number=456785;name=blahblah;date=012403; some time stamp code=001;number=456786;name=blahblah;date=012303; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456790;name=blahblah;date=012603; some time stamp code=001;number=456791;name=blahblah;date=012703; notice there might be more then one of the same number, I only need one so I need to ignore the rest, rip out the time stamp, which is a seperate line. file3.txt code=001;number=456789;name=blahblah;date=012503; code=001;number=456790;name=blahblah;date=012603; code=001;number=456791;name=blahblah;date=012703; can anyone help, any suggestions? _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This private and confidential e-mail has been sent to you by Egg. The Egg group of companies includes Egg Banking plc (registered no. 2999842), Egg Financial Products Ltd (registered no. 3319027) and Egg Investments Ltd (registered no. 3403963) which carries out investment business on behalf of Egg and is regulated by the Financial Services Authority. Registered in England and Wales. Registered offices: 1 Waterhouse Square, 138-142 Holborn, London EC1N 2NA. If you are not the intended recipient of this e-mail and have received it in error, please notify the sender by replying with 'received in error' as the subject
Re: [PHP] HELP please quickly
You need to use fopen + fgets instead of file Didier McGillis wrote: Cool. Thanks for the information. I try and organize my thoughts like that as well. I dont really need to delete anything, mostly move and copy. One problem I have run into is my second file seems to be too big. In just doing a simple count the first file was fine, found my 470 lines. The second file is 7.1MB and seems to fail telling me Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 81 bytes) So it seems to be on hurrdle at a time. From: Clarkson, Nick [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: [PHP] HELP please quickly Date: Wed, 22 Jan 2003 14:15:32 - I'm pretty new to PHP so I can't help you with the code per se, but how about as an outline; Open the first file and read values into an array. Open the 2nd file and read in the first line. Compare each value in the array to see if it occurs in the line from the 2nd file you just read in. If it occurs then write that value to the 3rd file Repeat until the array ends File functions are here - http://www.php.net/manual/en/ref.filesystem.php - the only one I can't see is the ability to delete a line in a file - at least without creating another holding filevery messy that way tho...I'll keep looking. As an exercise to myself I'll try and recreate it using the 2 example files belowdunno how long it'll take me tho ;o) Good luck Nick -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: 22 January 2003 13:57 To: Didier McGillis Cc: [EMAIL PROTECTED] Subject: Re: [PHP] HELP please quickly In that case, I don't know of any PHP classes to help you. - Original Message - From: Didier McGillis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 22, 2003 7:53 AM Subject: Re: [PHP] HELP please quickly No. The numbers are coming from two text files. The first text file is the file that I need to compare against the second file, and if I find one match in the second file, I need to move it to the third file. From: Rick Emery [EMAIL PROTECTED] Reply-To: Rick Emery [EMAIL PROTECTED] To: Didier McGillis [EMAIL PROTECTED],[EMAIL PROTECTED] Subject: Re: [PHP] HELP please quickly Date: Wed, 22 Jan 2003 07:45:20 -0600 Are the numbers coming from a mysql database? If so, mysql can handle this chore. - Original Message - From: Didier McGillis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 22, 2003 7:21 AM Subject: [PHP] HELP please quickly Here is a brief description of what I want to do. I want to use PHP to grab a list of numbers in one file. Check it against a bigger file and strip the ones that match out of the bigger file, into a holding file. so here is what it might look like. file1.txt 456789 456790 456791 456792 456793 456794 file2.log some time stamp code=001;number=456784;name=blahblah;date=012403; some time stamp code=001;number=456785;name=blahblah;date=012403; some time stamp code=001;number=456786;name=blahblah;date=012303; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456790;name=blahblah;date=012603; some time stamp code=001;number=456791;name=blahblah;date=012703; notice there might be more then one of the same number, I only need one so I need to ignore the rest, rip out the time stamp, which is a seperate line. file3.txt code=001;number=456789;name=blahblah;date=012503; code=001;number=456790;name=blahblah;date=012603; code=001;number=456791;name=blahblah;date=012703; can anyone help, any suggestions? _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This private and confidential e-mail has been sent to you by Egg. The Egg group of companies includes Egg Banking plc (registered no. 2999842), Egg Financial Products Ltd (registered no. 3319027) and Egg Investments Ltd (registered no. 3403963) which carries out investment business on behalf of Egg and is regulated by the Financial Services Authority. Registered in England and Wales. Registered offices: 1 Waterhouse Square, 138-142 Holborn, London EC1N 2NA. If you are not the intended recipient of this e-mail and have received it in error, please notify
RE: [PHP] HELP please quickly
I managed this bit of code, but I doubt it does exactly what you want, but it's a start. And just to add to it I couldn't get the preg_match to work - so that needs sorting. I'm at work, so I'm afraid I can't spend any more time right now on this. If anyone can help on the preg_match bit (it just needs to compare/match 2 strings) then could you add to this ? I looked at the preg_match function on the php site, but I couldn't make head nor tail of it :o/ Good luck with it Nick ?php // load file1.txt into array $file1 = file ('./file1.txt'); // open file2.log for read only $file2 = fopen (./file2.log, r); // open results.txt for write $results = fopen (./results.txt, w); while (!feof($file2)) { $buffer = fgets($file2, 4096); foreach ($file1 as $line_num = $line) { //if (preg_match (/$line/, $buffer)) - CAN'T GET THIS TO WORK ;o( { fwrite ($results, $buffer); } } } ? -Original Message- From: Didier McGillis [mailto:[EMAIL PROTECTED]] Sent: 22 January 2003 14:33 To: [EMAIL PROTECTED] Subject: RE: [PHP] HELP please quickly Cool. Thanks for the information. I try and organize my thoughts like that as well. I dont really need to delete anything, mostly move and copy. One problem I have run into is my second file seems to be too big. In just doing a simple count the first file was fine, found my 470 lines. The second file is 7.1MB and seems to fail telling me Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 81 bytes) So it seems to be on hurrdle at a time. From: Clarkson, Nick [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: [PHP] HELP please quickly Date: Wed, 22 Jan 2003 14:15:32 - I'm pretty new to PHP so I can't help you with the code per se, but how about as an outline; Open the first file and read values into an array. Open the 2nd file and read in the first line. Compare each value in the array to see if it occurs in the line from the 2nd file you just read in. If it occurs then write that value to the 3rd file Repeat until the array ends File functions are here - http://www.php.net/manual/en/ref.filesystem.php - the only one I can't see is the ability to delete a line in a file - at least without creating another holding filevery messy that way tho...I'll keep looking. As an exercise to myself I'll try and recreate it using the 2 example files belowdunno how long it'll take me tho ;o) Good luck Nick -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: 22 January 2003 13:57 To: Didier McGillis Cc: [EMAIL PROTECTED] Subject: Re: [PHP] HELP please quickly In that case, I don't know of any PHP classes to help you. - Original Message - From: Didier McGillis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 22, 2003 7:53 AM Subject: Re: [PHP] HELP please quickly No. The numbers are coming from two text files. The first text file is the file that I need to compare against the second file, and if I find one match in the second file, I need to move it to the third file. From: Rick Emery [EMAIL PROTECTED] Reply-To: Rick Emery [EMAIL PROTECTED] To: Didier McGillis [EMAIL PROTECTED],[EMAIL PROTECTED] Subject: Re: [PHP] HELP please quickly Date: Wed, 22 Jan 2003 07:45:20 -0600 Are the numbers coming from a mysql database? If so, mysql can handle this chore. - Original Message - From: Didier McGillis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 22, 2003 7:21 AM Subject: [PHP] HELP please quickly Here is a brief description of what I want to do. I want to use PHP to grab a list of numbers in one file. Check it against a bigger file and strip the ones that match out of the bigger file, into a holding file. so here is what it might look like. file1.txt 456789 456790 456791 456792 456793 456794 file2.log some time stamp code=001;number=456784;name=blahblah;date=012403; some time stamp code=001;number=456785;name=blahblah;date=012403; some time stamp code=001;number=456786;name=blahblah;date=012303; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456790;name=blahblah;date=012603; some time stamp code=001;number=456791;name=blahblah;date=012703; notice there might be more then one of the same number, I only need one so I need to ignore the rest, rip out the time stamp, which is a seperate line. file3.txt code=001;number=456789;name=blahblah;date=012503; code=001;number=456790;name=blahblah;date=012603; code=001;number=456791;name=blahblah;date=012703; can anyone help, any suggestions
RE: [PHP] HELP please quickly
I'm currently looking at this. This particular code creates a file 10-20 times the size of the orginial file. A minor alteration of this code copies the file to the results file. Basically I think the problem is, is in the preg_match, and I can't think of why that would die when it is placed back into the code. Any thoughts. From: Clarkson, Nick [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: [PHP] HELP please quickly Date: Wed, 22 Jan 2003 15:21:32 - I managed this bit of code, but I doubt it does exactly what you want, but it's a start. And just to add to it I couldn't get the preg_match to work - so that needs sorting. I'm at work, so I'm afraid I can't spend any more time right now on this. If anyone can help on the preg_match bit (it just needs to compare/match 2 strings) then could you add to this ? I looked at the preg_match function on the php site, but I couldn't make head nor tail of it :o/ Good luck with it Nick ?php // load file1.txt into array $file1 = file ('./file1.txt'); // open file2.log for read only $file2 = fopen (./file2.log, r); // open results.txt for write $results = fopen (./results.txt, w); while (!feof($file2)) { $buffer = fgets($file2, 4096); foreach ($file1 as $line_num = $line) { //if (preg_match (/$line/, $buffer)) - CAN'T GET THIS TO WORK ;o( { fwrite ($results, $buffer); } } } ? -Original Message- From: Didier McGillis [mailto:[EMAIL PROTECTED]] Sent: 22 January 2003 14:33 To: [EMAIL PROTECTED] Subject: RE: [PHP] HELP please quickly Cool. Thanks for the information. I try and organize my thoughts like that as well. I dont really need to delete anything, mostly move and copy. One problem I have run into is my second file seems to be too big. In just doing a simple count the first file was fine, found my 470 lines. The second file is 7.1MB and seems to fail telling me Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 81 bytes) So it seems to be on hurrdle at a time. From: Clarkson, Nick [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: [PHP] HELP please quickly Date: Wed, 22 Jan 2003 14:15:32 - I'm pretty new to PHP so I can't help you with the code per se, but how about as an outline; Open the first file and read values into an array. Open the 2nd file and read in the first line. Compare each value in the array to see if it occurs in the line from the 2nd file you just read in. If it occurs then write that value to the 3rd file Repeat until the array ends File functions are here - http://www.php.net/manual/en/ref.filesystem.php - the only one I can't see is the ability to delete a line in a file - at least without creating another holding filevery messy that way tho...I'll keep looking. As an exercise to myself I'll try and recreate it using the 2 example files belowdunno how long it'll take me tho ;o) Good luck Nick -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: 22 January 2003 13:57 To: Didier McGillis Cc: [EMAIL PROTECTED] Subject: Re: [PHP] HELP please quickly In that case, I don't know of any PHP classes to help you. - Original Message - From: Didier McGillis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 22, 2003 7:53 AM Subject: Re: [PHP] HELP please quickly No. The numbers are coming from two text files. The first text file is the file that I need to compare against the second file, and if I find one match in the second file, I need to move it to the third file. From: Rick Emery [EMAIL PROTECTED] Reply-To: Rick Emery [EMAIL PROTECTED] To: Didier McGillis [EMAIL PROTECTED],[EMAIL PROTECTED] Subject: Re: [PHP] HELP please quickly Date: Wed, 22 Jan 2003 07:45:20 -0600 Are the numbers coming from a mysql database? If so, mysql can handle this chore. - Original Message - From: Didier McGillis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 22, 2003 7:21 AM Subject: [PHP] HELP please quickly Here is a brief description of what I want to do. I want to use PHP to grab a list of numbers in one file. Check it against a bigger file and strip the ones that match out of the bigger file, into a holding file. so here is what it might look like. file1.txt 456789 456790 456791 456792 456793 456794 file2.log some time stamp code=001;number=456784;name=blahblah;date=012403; some time stamp code=001;number=456785;name=blahblah;date=012403; some time stamp code=001;number=456786;name=blahblah;date=012303; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456790;name=blahblah;date=012603; some time
Re: [PHP] HELP please quickly
Are the numbers coming from a mysql database? If so, mysql can handle this chore. - Original Message - From: Didier McGillis [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 22, 2003 7:21 AM Subject: [PHP] HELP please quickly Here is a brief description of what I want to do. I want to use PHP to grab a list of numbers in one file. Check it against a bigger file and strip the ones that match out of the bigger file, into a holding file. so here is what it might look like. file1.txt 456789 456790 456791 456792 456793 456794 file2.log some time stamp code=001;number=456784;name=blahblah;date=012403; some time stamp code=001;number=456785;name=blahblah;date=012403; some time stamp code=001;number=456786;name=blahblah;date=012303; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456789;name=blahblah;date=012503; some time stamp code=001;number=456790;name=blahblah;date=012603; some time stamp code=001;number=456791;name=blahblah;date=012703; notice there might be more then one of the same number, I only need one so I need to ignore the rest, rip out the time stamp, which is a seperate line. file3.txt code=001;number=456789;name=blahblah;date=012503; code=001;number=456790;name=blahblah;date=012603; code=001;number=456791;name=blahblah;date=012703; can anyone help, any suggestions? _ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help Please
From: SpiderWebb [EMAIL PROTECTED] Subject: Help nedded Date: 09 December 2002 16:46 I dont know if this is possible in PHP (Newbie) im working on a project where each product has 3 diffierent prices depending on the amount sold so say for example 1- 100 price A 101-299 price B and above 300 Price C. What I need to be able to do is increment an mysql database field each time an item is sold then look at that field to decide which price variable to write to the price field of the database. Could someone point me in the right direction where I could solve this or to someone who could Thanks in advance. Spiderwebb -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help Please
SpiderWebb wrote: From: SpiderWebb [EMAIL PROTECTED] Subject: Help nedded Date: 09 December 2002 16:46 I dont know if this is possible in PHP (Newbie) im working on a project where each product has 3 diffierent prices depending on the amount sold so say for example 1- 100 price A 101-299 price B and above 300 Price C. What I need to be able to do is increment an mysql database field each time an item is sold then look at that field to decide which price variable to write to the price field of the database. Could someone point me in the right direction where I could solve this or to someone who could Thanks in advance. Spiderwebb This seems a matter of database design. For simple solution, use COUNT in SQL. But having a record for each item would probably exceed the limit of either harddisc or database one day. -- BABA Yoshihiko -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help Please
Forget my previous advice. I'd misunderstood it. BABA Yoshihiko wrote: This seems a matter of database design. For simple solution, use COUNT in SQL. But having a record for each item would probably exceed the limit of either harddisc or database one day. -- BABA Yoshihiko -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help please: Unable to get $_POST[variable]; to work in a form.
I am going through the introductory tutorial on http://www.php.net/ and am stuck on this page: http://www.php.net/manual/en/tutorial.forms.php I have been able to get all of the examples up to this point to work. The form is simple: it asks for a text name, a text age and has a submit button. The information is submitted to action.php. Action.php contains this code: Hi ?php echo $_POST[name]; ?. You are ?php echo $_POST[age]; ? years old. I saved action.php as a text file with only the information above. When I enter JoeBob into the name field and 27 into the age field, I get this for output: Hi Notice: Undefined index: name in c:\inetpub\wwwroot\action.php on line 1 . You are Notice: Undefined index: age in c:\inetpub\wwwroot\action.php on line 2 years old. What can I do to remedy this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] Help please: Unable to get $_POST[variable]; to work in a form.
Try $_POST['name'] and $_POST['age'] Try $HTTP_POST_VARS['name'] and $HTTP_POST_VARS['age'] - Original Message - From: David Scott [EMAIL PROTECTED] To: Sent: Tuesday, December 10, 2002 10:56 AM Subject: [PHP] Help please: Unable to get $_POST[variable]; to work in a form. I am going through the introductory tutorial on http://www.php.net/ and am stuck on this page: http://www.php.net/manual/en/tutorial.forms.php I have been able to get all of the examples up to this point to work. The form is simple: it asks for a text name, a text age and has a submit button. The information is submitted to action.php. Action.php contains this code: Hi ?php echo $_POST[name]; ?. You are ?php echo $_POST[age]; ? years old. I saved action.php as a text file with only the information above. When I enter JoeBob into the name field and 27 into the age field, I get this for output: Hi Notice: Undefined index: name in c:\inetpub\wwwroot\action.php on line 1 . You are Notice: Undefined index: age in c:\inetpub\wwwroot\action.php on line 2 years old. What can I do to remedy this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help please.
Hi, I have been trying for most of the day to pull a variable from a db. Finally managed that. Now I need to pass the result of a function to another function. How do you do this? I assume the following if called in another page can be used? function get_shipping($shipping) { $conn = db_connect(); $query = SELECT * FROM receipts ORDER BY receipt_id DESC LIMIT 1; $result = mysql_query($query); //$shippingvar = $myrow[shipping]; if(mysql_numrows($result)0) $shipping = mysql_result($result, 0, shipping); return $shipping; } If I return $shipping how can I display that? I have called it in another page by doing get_shipping($shipping) And then Echo test $shipping; But that doesn't work. Ideas where I'm going wrong this time? Steve Jackson Web Developer Viola Systems Ltd. http://www.violasystems.com [EMAIL PROTECTED] Mobile +358 50 343 5159 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help please.
On Friday 01 November 2002 22:04, Steve Jackson wrote: Please use a descriptive subject! I have called it in another page by doing get_shipping($shipping) And then Echo test $shipping; $returned_variable = get_shipping($shipping); echo $returned_variable; Or you can use the returned value directly: echo get_shipping($shipping); -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* The computing field is always in need of new cliches. -- Alan Perlis */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help please
Hello; I have a Mandrake 8.2 machine that I'm trying to get a php webmail application running on. Apache is running, php is installed, and when I attempt to view/use index.php my browser offers to download index.php for me. I have tried 4 different browsers on three different machines. I have absolutely no idea what I did wrong. Can someone point me in the right direction? Thanks so much in advance. Paul Kelly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help Please
Hello Again Everyone, Thank you to those of you who sent me suggestions. Unfortunately none so far have solved the problem. I think I need to give you more information. I am running a Mandrake 8.3 linux box. Apache 1.3.23. PHP 4.2.1-8mdk. Installed from RPM's. PHP shows in my active list of modules on Webmin. I am trying to get Squirrelmail working. I have added fake directory aliases for it to httpd.conf so that apache thinks it's /squirrelmail. When I comment out the following two lines in httpd.conf that tweak mime extensions, AddType application/x-httpd-php .php AddType application/x-httpd-php-source .php the behavior no longer happens, namely, when I invoke /squirrelmail/index.php my browser then asks me where I would like to download it to. Actually, it does this when I invoke any file ending in .php. What I get is the following. You have chosen to download a file of type: application/x-httpd-php from httpd://localhost/squirrelmail/ What should Mozilla do with this file? And a list of choices as to where I would like to keep it. Internet Exploder also offers to save the file somewhere. What's supposed to happen is that I get the Squirrelmail login screen. Has anyone seen this behavior before? Is there any more information needed by anyone that might be able to tell me what to change to make this work properly? I know it's something simple. But I have no idea what. Come to think of it, this might be an apache question. Either way, any help is greatly appreciated. Thanks very much in advance; Paul Kelly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help Please
This means that you do not have the PHP module loaded properly. Do you have a LoadModule line for PHP in your httpd.conf file? -Rasmus On 15 Aug 2002, paul wrote: Hello Again Everyone, Thank you to those of you who sent me suggestions. Unfortunately none so far have solved the problem. I think I need to give you more information. I am running a Mandrake 8.3 linux box. Apache 1.3.23. PHP 4.2.1-8mdk. Installed from RPM's. PHP shows in my active list of modules on Webmin. I am trying to get Squirrelmail working. I have added fake directory aliases for it to httpd.conf so that apache thinks it's /squirrelmail. When I comment out the following two lines in httpd.conf that tweak mime extensions, AddType application/x-httpd-php .php AddType application/x-httpd-php-source .php the behavior no longer happens, namely, when I invoke /squirrelmail/index.php my browser then asks me where I would like to download it to. Actually, it does this when I invoke any file ending in .php. What I get is the following. You have chosen to download a file of type: application/x-httpd-php from httpd://localhost/squirrelmail/ What should Mozilla do with this file? And a list of choices as to where I would like to keep it. Internet Exploder also offers to save the file somewhere. What's supposed to happen is that I get the Squirrelmail login screen. Has anyone seen this behavior before? Is there any more information needed by anyone that might be able to tell me what to change to make this work properly? I know it's something simple. But I have no idea what. Come to think of it, this might be an apache question. Either way, any help is greatly appreciated. Thanks very much in advance; Paul Kelly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help Please
Hi, I am trying to run a sample program. It connects to a postgres database verifies user name and password and if correct, displays the login screen. But in that program wherever there there are setcookies() or header() functions, I get following error Warning: Cannot add header information - headers already sent by (output started at var/www/html/processing.php:5) in /var/www/html/common.php on line 63 I checked the settings of my browser, it can accept all cookies. Someone help please!!! __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help Please
Hi, I am trying to run a sample program. It connects to a postgres database verifies user name and password and if correct, displays the login screen. But in that program wherever there there are setcookies() or header() functions, I get following error Warning: Cannot add header information - headers already sent by (output started at var/www/html/processing.php:5) in /var/www/html/common.php on line 63 I checked the settings of my browser, it can accept all cookies. Someone help please!!! __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help Please
you cannot print or echo anything back to the browser before running the header() function... - Original Message - From: Varsha Agarwal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 29, 2002 4:00 PM Subject: [PHP] Help Please Hi, I am trying to run a sample program. It connects to a postgres database verifies user name and password and if correct, displays the login screen. But in that program wherever there there are setcookies() or header() functions, I get following error Warning: Cannot add header information - headers already sent by (output started at var/www/html/processing.php:5) in /var/www/html/common.php on line 63 I checked the settings of my browser, it can accept all cookies. Someone help please!!! __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help Please
Hi, I am trying to run a sample program. It connects to a postgres database verifies user name and password and if correct, displays the login screen. But in that program wherever there there are setcookies() or header() functions, I get following error Warning: Cannot add header information - headers already sent by (output started at var/www/html/processing.php:5) in /var/www/html/common.php on line 63 Read the error message. Output started at var/www/html/processing.php:5. that means line 5 of that file output something to the browser, after which, you cannot send any cookies or headers. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help Please
You can't send headers after the page has left the server. If you try to write to the HTML file in ANY way, even a hard return in your code, then you are telling the server that the headers have been completed and should be sent to the client (browser). Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Varsha Agarwal [EMAIL PROTECTED] 07/29/02 04:00PM Hi, I am trying to run a sample program. It connects to a postgres database verifies user name and password and if correct, displays the login screen. But in that program wherever there there are setcookies() or header() functions, I get following error Warning: Cannot add header information - headers already sent by (output started at var/www/html/processing.php:5) in /var/www/html/common.php on line 63 I checked the settings of my browser, it can accept all cookies. Someone help please!!! __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help Please
That's not entirely correct, though. If you are using output bufferng, then you can. Also, for example, say this is your file, with the makeshift line representing the top of the text editor: Start ?php header(Location: index.php?msg=blah); ? -End That will produce the same error as before, since a hard return was entered before the parser began it's work, therefore finishing the headers and sending the data to the client for rendering. Hope this clears something up :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Dennis Moore [EMAIL PROTECTED] 07/29/02 04:18PM you cannot print or echo anything back to the browser before running the header() function... - Original Message - From: Varsha Agarwal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 29, 2002 4:00 PM Subject: [PHP] Help Please Hi, I am trying to run a sample program. It connects to a postgres database verifies user name and password and if correct, displays the login screen. But in that program wherever there there are setcookies() or header() functions, I get following error Warning: Cannot add header information - headers already sent by (output started at var/www/html/processing.php:5) in /var/www/html/common.php on line 63 I checked the settings of my browser, it can accept all cookies. Someone help please!!! __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help Please
Hi, I did not find any print or echo stetement in the sample example before hearder or setcookie function. Is there any way to find out what really is causing error or trace the program. Actually i am very new to this cookies and all stuff. Is there any way of tracing the program? I am using it on red hat 7.3. --- Dennis Moore [EMAIL PROTECTED] wrote: you cannot print or echo anything back to the browser before running the header() function... - Original Message - From: Varsha Agarwal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 29, 2002 4:00 PM Subject: [PHP] Help Please Hi, I am trying to run a sample program. It connects to a postgres database verifies user name and password and if correct, displays the login screen. But in that program wherever there there are setcookies() or header() functions, I get following error Warning: Cannot add header information - headers already sent by (output started at var/www/html/processing.php:5) in /var/www/html/common.php on line 63 I checked the settings of my browser, it can accept all cookies. Someone help please!!! __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help Please
-Original Message- From: Varsha Agarwal [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 4:27 PM To: Dennis Moore; [EMAIL PROTECTED] Subject: Re: [PHP] Help Please Hi, I did not find any print or echo stetement in the sample example before hearder or setcookie function. Is there any way to find out what really is causing error or trace the program. Actually i am very new to this cookies and all stuff. Is there any way of tracing the program? I am using it on red hat 7.3. Read the message php sent. The answer is there (line 63): ||| vvv Warning: Cannot add header information - headers already sent by (output started at var/www/html/processing.php:5) in /var/www/html/common.php on line 63 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help Please
Copy and paste the code (minus and indisclosurables) and we can take a look at it :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Varsha Agarwal [EMAIL PROTECTED] 07/29/02 04:27PM Hi, I did not find any print or echo stetement in the sample example before hearder or setcookie function. Is there any way to find out what really is causing error or trace the program. Actually i am very new to this cookies and all stuff. Is there any way of tracing the program? I am using it on red hat 7.3. --- Dennis Moore [EMAIL PROTECTED] wrote: you cannot print or echo anything back to the browser before running the header() function... - Original Message - From: Varsha Agarwal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 29, 2002 4:00 PM Subject: [PHP] Help Please Hi, I am trying to run a sample program. It connects to a postgres database verifies user name and password and if correct, displays the login screen. But in that program wherever there there are setcookies() or header() functions, I get following error Warning: Cannot add header information - headers already sent by (output started at var/www/html/processing.php:5) in /var/www/html/common.php on line 63 I checked the settings of my browser, it can accept all cookies. Someone help please!!! __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help Please
Show us the first 6 lines of processing.php. ---John Holmes... - Original Message - From: Varsha Agarwal [EMAIL PROTECTED] To: Dennis Moore [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, July 29, 2002 4:27 PM Subject: Re: [PHP] Help Please Hi, I did not find any print or echo stetement in the sample example before hearder or setcookie function. Is there any way to find out what really is causing error or trace the program. Actually i am very new to this cookies and all stuff. Is there any way of tracing the program? I am using it on red hat 7.3. --- Dennis Moore [EMAIL PROTECTED] wrote: you cannot print or echo anything back to the browser before running the header() function... - Original Message - From: Varsha Agarwal [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 29, 2002 4:00 PM Subject: [PHP] Help Please Hi, I am trying to run a sample program. It connects to a postgres database verifies user name and password and if correct, displays the login screen. But in that program wherever there there are setcookies() or header() functions, I get following error Warning: Cannot add header information - headers already sent by (output started at var/www/html/processing.php:5) in /var/www/html/common.php on line 63 I checked the settings of my browser, it can accept all cookies. Someone help please!!! __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help please - strange session behaviour on IIS with php4.1.2
i've written a simple script, which tests the session behaviour on the IIS, since it didnt seem to work the following script should increase the session-var $testVar and display it but it always stays at the same value can someone explain that? is that a bug? also if i would increase $_SESSION['testVar'] it doesnt work. i have been looking at the server and the session-file is also updated, but not with the new values, only the timestamp is updated, it seems session_start(); // make the session variable globally available // we have register_globals = Off $testVar = $_SESSION['testVar']; // init testVar to 1 or increase it if( !isset($testVar) ) { print 'set testVar to 1br'; $testVar = 1; } else { print 'increasebr'; $testVar++; } // i can put session_register before // or after the 'if' it always happens the same session_register('testVar'); print $testVar; the environment: - IIS-Server5.0, WIN2k - PHP4.1.2 - session.auto_start = 0 - register_globals = Off i am using the recommended-php.ini, that's why register_globals is off thanks for help -- Wolfram ... translating template engine http://sf.net/projects/simpletpl ... authentication system http://sf.net/projects/auth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help please - strange session behaviour on IIS with php4.1.2
Hi, It sounds like you are experiencing a similar problem to one I had. It seems there are some problems with setting cookies when using IIS, and as I understand it one of the ways that sessions work is by storing the data in a cookie on the clients machine. On the page at www.php.net it suggests appending the session id to the url, go here to look at that http://www.php.net/manual/en/ref.session.php, An example of this would be; ?php if (!session_is_registered('count')) { session_register('count'); $count = 1; } else { $count++; } ? Hello visitor, you have seen this page ?php echo $count; ? times.p; ?php # the ?php echo SID? (?=SID? can be used if short tag is enabled) # is necessary to preserve the session id # in the case that the user has disabled cookies ? To continue, A HREF=nextpage.php??php echo SID?click here/A on the notes at the bottom someone said this, sounds like a similar problem, [EMAIL PROTECTED] 01-Apr-2002 04:30 Using PHP 4.1.2 on IIS 5.0, Win2k, haven't migrated app yet to Linux (later!) Managed to eventually get the sessions to work as follows. In the php.ini, session.auto_start = 1 Then without a session_start(); $xvar = something ; Use session_register(xvar); then u CAN retrieve from a later page using the new way: $var = $_SESSION[xvar] ; also without session_start(); even doing a var_dump($_SESSION); seems to work at least some of the time! The odd thing is that storing vars using the new way: $_SESSION[xvar] = something; will save only for the CURRENT page, this gets lost when moving on to the next page! best regards Mike Hope this helps with your problem, Steve. - Original Message - From: Wolfram Kriesing [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 02, 2002 10:44 AM Subject: [PHP] help please - strange session behaviour on IIS with php4.1.2 i've written a simple script, which tests the session behaviour on the IIS, since it didnt seem to work the following script should increase the session-var $testVar and display it but it always stays at the same value can someone explain that? is that a bug? also if i would increase $_SESSION['testVar'] it doesnt work. i have been looking at the server and the session-file is also updated, but not with the new values, only the timestamp is updated, it seems session_start(); // make the session variable globally available // we have register_globals = Off $testVar = $_SESSION['testVar']; // init testVar to 1 or increase it if( !isset($testVar) ) { print 'set testVar to 1br'; $testVar = 1; } else { print 'increasebr'; $testVar++; } // i can put session_register before // or after the 'if' it always happens the same session_register('testVar'); print $testVar; the environment: - IIS-Server5.0, WIN2k - PHP4.1.2 - session.auto_start = 0 - register_globals = Off i am using the recommended-php.ini, that's why register_globals is off thanks for help -- Wolfram ... translating template engine http://sf.net/projects/simpletpl ... authentication system http://sf.net/projects/auth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help please - strange session behaviour on IIS with php4.1.2
On Tuesday 02 April 2002 15:34, Stephen Phillips wrote: Hi, It sounds like you are experiencing a similar problem to one I had. It seems there are some problems with setting cookies when using IIS, and as I understand it one of the ways that sessions work is by storing the data in a cookie on the clients machine. On the page at www.php.net it suggests appending the session id to the url, go here to look at that http://www.php.net/manual/en/ref.session.php, i can definitely say, that the session-ID is always appended on the links etc. session.use_trans_sid is on, so all links etc. are extended by the SID automatically, so it should not be the problem with the cookies :-( any other suggestions? -- Wolfram ... translating template engine http://sf.net/projects/simpletpl ... authentication system http://sf.net/projects/auth -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help please - strange session behaviour on IIS with php4.1.2
I have the same problem, while I'm using Apache for web server / Win2k. It seems that it depends on register_globals=On or Off. When the register_globals=On, it works well. But when the register_globals=Off I've got the same situation; session doesn't work. I guess this is a bug of PHP4.1.2/Win, isn't it?, Regards, Hiroshi Ayukawa http://hoover.ktplan.ne.jp/kaihatsu/php_en/index.php?type=top -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: [PHP] help please - strange session behaviour on IIS with
I run this setup on Win2k Advanced Server talking to a Microsoft SQL 2000 Server, with sessions of both cookie type and URL-SessionID server side based, with absolutely no problems. Adam Voigt [EMAIL PROTECTED] On Wed, 03 Apr 2002 04:37:07 +0900, Hiroshi Ayukawa [EMAIL PROTECTED] wrote: I have the same problem, while I'm using Apache for web server / Win2k. It seems that it depends on register_globals=On or Off. When the register_globals=On, it works well. But when the register_globals=Off I've got the same situation; session doesn't work. I guess this is a bug of PHP4.1.2/Win, isn't it?, Regards, Hiroshi Ayukawa http://hoover.ktplan.ne.jp/kaihatsu/php_en/index.php?type=top -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] HELP PLEASE!
At 27.03.2002 21:20, you wrote: Even if I didn´t read your code exactly, the fault is the do while loop replace it with something like this while ($row = mysql_fetch_array($result)) { for($i=0,$i count($row);$i++) { // add something to make it fancy like a table or so echo $row[$i]; } } in php4* there is something like foreach, which I do not exactly know HTH Oliver Hello, My problem is I have a form that submits it info to a mysql table, well then I have a page that calls it from the mysql table and displays whatever is in the mysql table. So, what script do I use to make it display multiple entrys?? Here is the code: --- ?php $title = Powder Basin Motocross, INC. | | Rider Profiles; include('header.php'); $conn = mysql_connect (host, un, pw) or die(Coudn't connect to the MySQL server.); mysql_select_db (pbmi_riderprofiles) or die(Couldn't the select MySQL database.); ? table border=0 cellspacing=0 cellpadding=0tr td class=mainheader width=475 align=center bgcolor=#66:: Rider Profiles ::/td /tr tr td valign=top align=left font size=?=$fontsize? face=?=$fontface?a href=index.php? topic=addprofileAdd your profile/a/font hr width=475 align=left noshade table border=0 cellspacing=0 cellpadding=0 tr tdfont size=?=$fontsize? face=?=$fontface?bnbsp;First Name:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles first_name); if ($row = mysql_fetch_array($result)) { do { echo $row[first_name]; } while ($row = mysql_fetch_array($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface?bnbsp;Last Name:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles last_name); if ($row = mysql_fetch_array($result)) { do { echo $row[last_name]; } while ($row = mysql_fetch_array($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface? bnbsp;D.O.B:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles dob); if ($row = mysql_fetch_array ($result)) { do { echo $row[dob]; } while ($row = mysql_fetch_array ($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface? bnbsp;City:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles city); if ($row = mysql_fetch_array ($result)) { do { echo $row[city]; } while ($row = mysql_fetch_array ($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface? bnbsp;State:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles state); if ($row = mysql_fetch_array ($result)) { do { echo $row[state]; } while ($row = mysql_fetch_array ($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface?bnbsp;E- mail:/b/font/td tdfont size=?=$fontsize? face=?=$fontface?a href=mailto:? =$riderfile[$i + 5]??php $result = mysql_query (SELECT * FROM riderprofiles email); if ($row = mysql_fetch_array($result)) { do { echo $row [email]; } while ($row = mysql_fetch_array($result)); } ?/a/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface?bnbsp;Dirt Bike:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles dirt_bike); if ($row = mysql_fetch_array($result)) { do { echo $row[dirt_bike]; } while ($row = mysql_fetch_array($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface? bnbsp;Class:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles race_class); if ($row = mysql_fetch_array($result)) { do { echo $row[race_class]; } while ($row = mysql_fetch_array($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface?bnbsp;Years Riding:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles yr); if ($row = mysql_fetch_array ($result)) { do { echo $row[yr]; } while ($row = mysql_fetch_array ($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface?bnbsp;Favorite Track:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles favorite_track); if ($row = mysql_fetch_array($result)) { do { echo $row[favorite_track]; } while ($row = mysql_fetch_array($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface? bnbsp;Sponsors:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles sponsors); if ($row = mysql_fetch_array($result)) { do { echo $row[sponsors]; } while ($row = mysql_fetch_array($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface? bnbsp;Injuries:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles injuries); if ($row =
Re: [PHP] HELP PLEASE!
The difficulty of using a FOR loop in a WHILE loop is that the data record doesn't change until the next WHILE loop. I've used variations of the following to get multiple columns of data from a database query. A variation of this should work. while ($cards=mysql_fetch_array($result)) { if ($num==1) print tr; print td; print $db[item]; print /td; $num++; if ($num==3) { print /tr; $num=1; } } if ($num==2) print /tr; print /table; Hope this helps, Hugh - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 28, 2002 12:33 AM Subject: Re: [PHP] HELP PLEASE! At 27.03.2002 21:20, you wrote: Even if I didn´t read your code exactly, the fault is the do while loop replace it with something like this while ($row = mysql_fetch_array($result)) { for($i=0,$i count($row);$i++) { // add something to make it fancy like a table or so echo $row[$i]; } } in php4* there is something like foreach, which I do not exactly know HTH Oliver Hello, My problem is I have a form that submits it info to a mysql table, well then I have a page that calls it from the mysql table and displays whatever is in the mysql table. So, what script do I use to make it display multiple entrys?? Here is the code: --- ?php $title = Powder Basin Motocross, INC. | | Rider Profiles; include('header.php'); $conn = @mysql_connect (host, un, pw) or die(Coudn't connect to the MySQL server.); mysql_select_db (pbmi_riderprofiles) or die(Couldn't the select MySQL database.); ? table border=0 cellspacing=0 cellpadding=0tr td class=mainheader width=475 align=center bgcolor=#66:: Rider Profiles ::/td /tr tr td valign=top align=left font size=?=$fontsize? face=?=$fontface?a href=index.php? topic=addprofileAdd your profile/a/font hr width=475 align=left noshade table border=0 cellspacing=0 cellpadding=0 tr tdfont size=?=$fontsize? face=?=$fontface?bnbsp;First Name:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles first_name); if ($row = mysql_fetch_array($result)) { do { echo $row[first_name]; } while ($row = mysql_fetch_array($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface?bnbsp;Last Name:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles last_name); if ($row = mysql_fetch_array($result)) { do { echo $row[last_name]; } while ($row = mysql_fetch_array($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface? bnbsp;D.O.B:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles dob); if ($row = mysql_fetch_array ($result)) { do { echo $row[dob]; } while ($row = mysql_fetch_array ($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface? bnbsp;City:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles city); if ($row = mysql_fetch_array ($result)) { do { echo $row[city]; } while ($row = mysql_fetch_array ($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface? bnbsp;State:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles state); if ($row = mysql_fetch_array ($result)) { do { echo $row[state]; } while ($row = mysql_fetch_array ($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface?bnbsp;E- mail:/b/font/td tdfont size=?=$fontsize? face=?=$fontface?a href=mailto:? =$riderfile[$i + 5]??php $result = mysql_query (SELECT * FROM riderprofiles email); if ($row = mysql_fetch_array($result)) { do { echo $row [email]; } while ($row = mysql_fetch_array($result)); } ?/a/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface?bnbsp;Dirt Bike:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles dirt_bike); if ($row = mysql_fetch_array($result)) { do { echo $row[dirt_bike]; } while ($row = mysql_fetch_array($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface? bnbsp;Class:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles race_class); if ($row = mysql_fetch_array($result)) { do { echo $row[race_class]; } while ($row = mysql_fetch_array($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface?bnbsp;Years Riding:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles yr); if ($row = mysql_fetch_array ($result)) { do { echo $row[yr]; } while ($row = mysql_fetch_array ($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface?bnbsp;Favorite Track:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles
[PHP] HELP PLEASE!
Hello, My problem is I have a form that submits it info to a mysql table, well then I have a page that calls it from the mysql table and displays whatever is in the mysql table. So, what script do I use to make it display multiple entrys?? Here is the code: --- ?php $title = Powder Basin Motocross, INC. | | Rider Profiles; include('header.php'); $conn = mysql_connect (host, un, pw) or die(Coudn't connect to the MySQL server.); mysql_select_db (pbmi_riderprofiles) or die(Couldn't the select MySQL database.); ? table border=0 cellspacing=0 cellpadding=0tr td class=mainheader width=475 align=center bgcolor=#66:: Rider Profiles ::/td /tr tr td valign=top align=left font size=?=$fontsize? face=?=$fontface?a href=index.php? topic=addprofileAdd your profile/a/font hr width=475 align=left noshade table border=0 cellspacing=0 cellpadding=0 tr tdfont size=?=$fontsize? face=?=$fontface?bnbsp;First Name:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles first_name); if ($row = mysql_fetch_array($result)) { do { echo $row[first_name]; } while ($row = mysql_fetch_array($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface?bnbsp;Last Name:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles last_name); if ($row = mysql_fetch_array($result)) { do { echo $row[last_name]; } while ($row = mysql_fetch_array($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface? bnbsp;D.O.B:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles dob); if ($row = mysql_fetch_array ($result)) { do { echo $row[dob]; } while ($row = mysql_fetch_array ($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface? bnbsp;City:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles city); if ($row = mysql_fetch_array ($result)) { do { echo $row[city]; } while ($row = mysql_fetch_array ($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface? bnbsp;State:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles state); if ($row = mysql_fetch_array ($result)) { do { echo $row[state]; } while ($row = mysql_fetch_array ($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface?bnbsp;E- mail:/b/font/td tdfont size=?=$fontsize? face=?=$fontface?a href=mailto:? =$riderfile[$i + 5]??php $result = mysql_query (SELECT * FROM riderprofiles email); if ($row = mysql_fetch_array($result)) { do { echo $row [email]; } while ($row = mysql_fetch_array($result)); } ?/a/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface?bnbsp;Dirt Bike:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles dirt_bike); if ($row = mysql_fetch_array($result)) { do { echo $row[dirt_bike]; } while ($row = mysql_fetch_array($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface? bnbsp;Class:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles race_class); if ($row = mysql_fetch_array($result)) { do { echo $row[race_class]; } while ($row = mysql_fetch_array($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface?bnbsp;Years Riding:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles yr); if ($row = mysql_fetch_array ($result)) { do { echo $row[yr]; } while ($row = mysql_fetch_array ($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface?bnbsp;Favorite Track:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles favorite_track); if ($row = mysql_fetch_array($result)) { do { echo $row[favorite_track]; } while ($row = mysql_fetch_array($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface? bnbsp;Sponsors:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles sponsors); if ($row = mysql_fetch_array($result)) { do { echo $row[sponsors]; } while ($row = mysql_fetch_array($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface? bnbsp;Injuries:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles injuries); if ($row = mysql_fetch_array($result)) { do { echo $row[injuries]; } while ($row = mysql_fetch_array($result)); } ?/font/td /tr tr tdfont size=?=$fontsize? face=?=$fontface? bnbsp;Comments:/b/font/td tdfont size=?=$fontsize? face=?=$fontface??php $result = mysql_query (SELECT * FROM riderprofiles comments); if ($row = mysql_fetch_array($result)) { do { echo $row[comments]; } while ($row =
RE: [PHP] help please -- error compiling php 4.1.2 (4.0.6 compiles fine)
I dont know if Rasmus or someone else on the Dev team wants to know more -- but I found that by making the following change to filestat.c, 4.1.2 at least compiled on my system... #if defined(HAVE_SYS_STATVFS_H) defined(HAVE_STATVFS) # include sys/statvfs.h /* *#elif defined(HAVE_SYS_STATFS_H) defined(HAVE_STATFS) *# include sys/statfs.h */ #elif defined(HAVE_SYS_MOUNT_H) defined(HAVE_STATFS) # include sys/mount.h #endif I'm still not sure where the duplication of the structure originated - but this at least lets it compile. System is a kernel 2.0.36 gcc is version 2.7.2.1 (yes, old, I know) -Original Message- From: Scott Brown [mailto:[EMAIL PROTECTED]] Sent: March 1, 2002 9:16 PM To: [EMAIL PROTECTED] Subject: [PHP] help please -- error compiling php 4.1.2 (4.0.6 compiles fine) I'm trying to deal with the recent security advisory... but I cant get 4.1.2 to compile on my system I'm getting : gcc -I. -I/home/webmaster/new_build/php-4.1.2/ext/standard -I/home/webmaster /new_build/php-4.1.2/main -I/home/webmaster/new_build/ph p-4.1.2 -I/home/webmaster/new_build/apache_1.3.23/src/include -I/home/webmas ter/new_build/apache_1.3.23/src/os/unix -I/home/webmaste r/new_build/php-4.1.2/Zend -I/home/webmaster/new_build/gd-1.8.4 -I/usr/local /include -I/home/webmaster/new_build/php-4.1.2/ext/mysql /libmysql -I/home/webmaster/new_build/php-4.1.2/ext/xml/expat -I/home/webma ster/new_build/php-4.1.2/TSRM -O2 -fomit-frame-pointer - ffast-math -fexpensive-optimizations -c filestat.c touch filestat.lo In file included from /usr/include/sys/statfs.h:26, from filestat.c:49: /usr/include/statfsbuf.h:25: redefinition of `struct statfs' make[3]: *** [filestat.lo] Error 1 make[3]: Leaving directory `/home/webmaster/new_build/php-4.1.2/ext/standard' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/webmaster/new_build/php-4.1.2/ext/standard' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/webmaster/new_build/php-4.1.2/ext' make: *** [all-recursive] Error 1 [root@apollo /home/webmaster/new_build/php-4.1.2]# However, 4.0.6 compiles fine Configure line (same between the 4.0.6 and the 4.1.2 attempts) is: CFLAGS=-O2 -fomit-frame-pointer -ffast-math -fexpensive-optimizations \ EAPI_MM=../mm-1.1.3 \ ./configure \ --with-apache=../apache_1.3.23 \ --with-gd=../gd-1.8.4/ \ --with-mysql \ --with-gdbm \ --with-mhash \ --with-config-file-path=/etc \ --with-calendar=shared \ --enable-safe-mode \ --enable-magic-quotes \ --enable-trans-sid \ --enable-apc \ --enable-ftp \ --enable-debug=no \ --enable-memory-limit=yes \ --enable-xml \ --enable-track-vars #exit System is Redhat 5.something - patched all to hell Any help/direction appreciated... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help please -- error compiling php 4.1.2 (4.0.6 compiles fine)
I'm trying to deal with the recent security advisory... but I cant get 4.1.2 to compile on my system I'm getting : gcc -I. -I/home/webmaster/new_build/php-4.1.2/ext/standard -I/home/webmaster /new_build/php-4.1.2/main -I/home/webmaster/new_build/ph p-4.1.2 -I/home/webmaster/new_build/apache_1.3.23/src/include -I/home/webmas ter/new_build/apache_1.3.23/src/os/unix -I/home/webmaste r/new_build/php-4.1.2/Zend -I/home/webmaster/new_build/gd-1.8.4 -I/usr/local /include -I/home/webmaster/new_build/php-4.1.2/ext/mysql /libmysql -I/home/webmaster/new_build/php-4.1.2/ext/xml/expat -I/home/webma ster/new_build/php-4.1.2/TSRM -O2 -fomit-frame-pointer - ffast-math -fexpensive-optimizations -c filestat.c touch filestat.lo In file included from /usr/include/sys/statfs.h:26, from filestat.c:49: /usr/include/statfsbuf.h:25: redefinition of `struct statfs' make[3]: *** [filestat.lo] Error 1 make[3]: Leaving directory `/home/webmaster/new_build/php-4.1.2/ext/standard' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/webmaster/new_build/php-4.1.2/ext/standard' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/webmaster/new_build/php-4.1.2/ext' make: *** [all-recursive] Error 1 [root@apollo /home/webmaster/new_build/php-4.1.2]# However, 4.0.6 compiles fine Configure line (same between the 4.0.6 and the 4.1.2 attempts) is: CFLAGS=-O2 -fomit-frame-pointer -ffast-math -fexpensive-optimizations \ EAPI_MM=../mm-1.1.3 \ ./configure \ --with-apache=../apache_1.3.23 \ --with-gd=../gd-1.8.4/ \ --with-mysql \ --with-gdbm \ --with-mhash \ --with-config-file-path=/etc \ --with-calendar=shared \ --enable-safe-mode \ --enable-magic-quotes \ --enable-trans-sid \ --enable-apc \ --enable-ftp \ --enable-debug=no \ --enable-memory-limit=yes \ --enable-xml \ --enable-track-vars #exit System is Redhat 5.something - patched all to hell Any help/direction appreciated... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help please
Im trying to control the way a new window opens when submiting a form. When I do it from a regular button, I use: p align=center a href="#pv" >rollbars=0,width=300,height=340,top=150,left=150');return true and it works, it opens the new window, but Im not transferring any values in here. What I want to do is that when I push the submit button of a form, it opens in the same window size as the prior example. I hope you can assist me. E.
Re: [PHP] Help please
Since you're assuming Javascript anyway, you can use a input type=button instead of input type=submit and use the same javascript code as for the a href, just that you append a document.forms[0].submit(). HTH Bogdan webmaster mbtradingco wrote: I'm trying to contro l the way a new window opens when submiting a form. When I do it fro m a regular button, I use: p align=center a href=#pv onClick=window.open('php/resulta.php','1','sc rollbars=0,width=300,height=340,top=150,left=150');return true and it works, it opens the new window, but I'm not transferring any values in here. What I want to do is that when I push the submit button of a form, it opens in the same window size as the prior example. I hope you can assist me. E.
RE: [PHP] Help please
Thanks I hope you can assist me a little more. I put the text like this: input type=Button value=Enviar style=background-color: #E9B361 onClick=window.open('php/encuesta.php','1','scrollbars=0,width=300,heig ht=340,top=150,left=150',document.forms[0].submit());return true but it opens the new window (like it is supposed but it carries no data), and the main window changes like if no value was added. This is the third consecutive form in the page, and the form header is like this. form method=POST action=php/encuesta.php target=_blank onSubmit=submitonce(this) name=poll where submitonce(this) is a function that disables the button after one submission is made. Help please. Thanks The site is www.papelesdeviaje.com http://www.papelesdeviaje.com/ and is the poll in question. You can access below the enviar, and see what I need the submit button to do. Thanks. -Mensaje original- De: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] Enviado el: Sábado, 16 de Febrero de 2002 20:43 Para: webmaster mbtradingco CC: [EMAIL PROTECTED] Asunto: Re: [PHP] Help please Since you're assuming Javascript anyway, you can use a input type=button instead of input type=submit and use the same javascript code as for the a href, just that you append a document.forms[0].submit(). HTH Bogdan webmaster mbtradingco wrote: Im trying to contro l the way a new window opens when submiting a form. When I do it fro m a regular button, I use: p align=center a href=#pv onClick=window.open('php/resulta.php','1','sc rollbars=0,width=300,height=340,top=150,left=150');return true and it works, it opens the new window, but Im not transferring any values in here. What I want to do is that when I push the submit button of a form, it opens in the same window size as the prior example. I hope you can assist me. E.
RE: [PHP] Help please
Thanks I hope you can assist me a little more. I put the text like this: input type=Button value=Enviar style=background-color: #E9B361 onClick=window.open('php/encuesta.php','1','scrollbars=0,width=300,heig ht=340,top=150,left=150',document.forms[0].submit());return true but it opens the new window (like it is supposed but it carries no data), and the main window changes like if no value was added. This is the third consecutive form in the page, and the form header is like this. form method=POST action=php/encuesta.php target=_blank onSubmit=submitonce(this) name=poll where submitonce(this) is a function that disables the button after one submission is made. Help please. Thanks The site is www.papelesdeviaje.com http://www.papelesdeviaje.com/ and is the poll in question. You can access below the enviar, and see what I need the submit button to do. Thanks. -Mensaje original- De: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] Enviado el: Sábado, 16 de Febrero de 2002 20:43 Para: webmaster mbtradingco CC: [EMAIL PROTECTED] Asunto: Re: [PHP] Help please Since you're assuming Javascript anyway, you can use a input type=button instead of input type=submit and use the same javascript code as for the a href, just that you append a document.forms[0].submit(). HTH Bogdan webmaster mbtradingco wrote: Im trying to contro l the way a new window opens when submiting a form. When I do it fro m a regular button, I use: p align=center a href=#pv onClick=window.open('php/resulta.php','1','sc rollbars=0,width=300,height=340,top=150,left=150');return true and it works, it opens the new window, but Im not transferring any values in here. What I want to do is that when I push the submit button of a form, it opens in the same window size as the prior example. I hope you can assist me. E.
Re: [PHP] Help please
You should make up your mind - do you want to use the form in order to carry the data (use submit()) or do you want to submit the data via URL (GET method - using window.open()). You can't use both! Bogdan webmaster mbtradingco wrote: Thanks... I hope you can assist me a little more. I put the text like this: input type=Button value=Enviar style=background-color: #E9B361 onClick=window.open('php/encuesta.php','1','scrollbars=0,width=300,heig ht=340,top=150,left=150',document.forms[0].submit());return true but it opens the new window (like it is supposed but it carries no data), and the main window changes like if no value was added. This is the third consecutive form in the page, and the form header is like this. form method=POST action=php/encuesta.php target=_blank onSubmit=submitonce(this) name=poll where submitonce(this) is a function that disables the button after one submission is made. Help please. Thanks The site is www.papelesdeviaje.com http://www.papelesdeviaje.com/ and is the poll in question. You can access below the enviar, and see what I need the submit button to do. Thanks. -Mensaje original- De: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] Enviado el: Sábado, 16 de Febrero de 2002 20:43 Para: webmaster mbtradingco CC: [EMAIL PROTECTED] Asunto: Re: [PHP] Help please Since you're assuming Javascript anyway, you can use a input type=button instead of input type=submit and use the same javascript code as for the a href, just that you append a document.forms[0].submit(). HTH Bogdan webmaster mbtradingco wrote: I'm trying to contro l the way a new window opens when submiting a form. When I do it fro m a regular button, I use: p align=center a href=#pv onClick=window.open('php/resulta.php','1','sc rollbars=0,width=300,height=340,top=150,left=150');return true and it works, it opens the new window, but I'm not transferring any values in here. What I want to do is that when I push the submit button of a form, it opens in the same window size as the prior example. I hope you can assist me. E. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Help please
I'm sorry but I cant seem to make it work. The form instruction is now: form method=get onSubmit=submitonce(this) The Button Instruction is now: input type=Button value=Enviar style=background-color: #E9B361 onClick=document.forms[1].submit();window.open('php/encuesta.php','1',' scrollbars=0,width=300,height=340,top=150,left=150');return true Still when the new window opens is stops cause it does not have any values with it. What am I doing wrong here, if I add an action statement in the form, then it opens the php procedure in the same window an works. If I add a _blank target it also works, but the new window never works. Thanks. -Mensaje original- De: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] Enviado el: Sábado, 16 de Febrero de 2002 21:51 Para: webmaster mbtradingco CC: [EMAIL PROTECTED] Asunto: Re: [PHP] Help please You should make up your mind - do you want to use the form in order to carry the data (use submit()) or do you want to submit the data via URL (GET method - using window.open()). You can't use both! Bogdan webmaster mbtradingco wrote: Thanks... I hope you can assist me a little more. I put the text like this: input type=Button value=Enviar style=background-color: #E9B361 onClick=window.open('php/encuesta.php','1','scrollbars=0,width=300,hei g ht=340,top=150,left=150',document.forms[0].submit());return true but it opens the new window (like it is supposed but it carries no data), and the main window changes like if no value was added. This is the third consecutive form in the page, and the form header is like this. form method=POST action=php/encuesta.php target=_blank onSubmit=submitonce(this) name=poll where submitonce(this) is a function that disables the button after one submission is made. Help please. Thanks The site is www.papelesdeviaje.com http://www.papelesdeviaje.com/ and is the poll in question. You can access below the enviar, and see what I need the submit button to do. Thanks. -Mensaje original- De: Bogdan Stancescu [mailto:[EMAIL PROTECTED]] Enviado el: Sábado, 16 de Febrero de 2002 20:43 Para: webmaster mbtradingco CC: [EMAIL PROTECTED] Asunto: Re: [PHP] Help please Since you're assuming Javascript anyway, you can use a input type=button instead of input type=submit and use the same javascript code as for the a href, just that you append a document.forms[0].submit(). HTH Bogdan webmaster mbtradingco wrote: I'm trying to contro l the way a new window opens when submiting a form. When I do it fro m a regular button, I use: p align=center a href=#pv onClick=window.open('php/resulta.php','1','sc rollbars=0,width=300,height=340,top=150,left=150');return true and it works, it opens the new window, but I'm not transferring any values in here. What I want to do is that when I push the submit button of a form, it opens in the same window size as the prior example. I hope you can assist me. E. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help Please
Can anyone help me with this... ? if ($HTTP_POST_VARS[action] == 1) { checklogin($HTTP_POST_VARS[user_name], $HTTP_POST_VARS[password]); exit; } function checklogin($user_name, $password) { login($user_name, $password); if ($sid != -1) { header(Location: http://localhost/infekt/packages/imanager/index2.php?sid=$sid;); } else { header(Location: http://localhost/infekt/packages/imanager/index.php;); } } function login($user_name, $password) { $db = imanager; $SQL = SELECT * FROM users WHERE user_name='.$user_name.' AND password='.$password.'; # $connection = db_connect(); $query = mysql_query('$SQL'); if (mysql_num_rows($query) != 1) { return -1; } $row = mysql_fetch_array($query); $user_id = $row[user_id]; $sid = md5(blah blah.$user_id.$ttime); $remip = getenv (REMOTE_ADDR); $ttime = date(YmdHis); $SQL2 = INSERT INTO session ; $SQL2 = $SQL2 . (user_id, sid, ttime, remip) VALUES ; $SQL2 = $SQL2 . ('$user_id','$sid','$ttime','$remip') ; ### $result2 = mysql_db_query($db,$SQL2,$connection); if (!$result2) { echo(ERROR: . mysql_error() . \n$SQL\n); mysql_close($connection); exit; } ### SetCookie(iManager, $user_id:$sid:$ip, time()+3600); return $sid; } ? It is meant to check a user login from the same page POSTed back to it. Fields being user_name and password. When I try it I get an Error on Line 30: if (mysql_num_rows($query) != 1) Thankyou -- 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 please: exec/pasthru/system/popen problem
i was now trying all the examples from the docs but no success yet can someone please help? i want to convert an image to another format i was fread-ing the one image into $image1 so they are binary in there and i want to pass that to imagemagick's convert, using: convert gif:- jpg:- which reads from stdin and outputs the result to stdout how can i pass the _binary_ $image1 to convert and retreive the $convertedImage reason, i want to insert the image as a blob and i dont want to mess with files thank you -- Wolfram -- 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 PLEASE!! Get query error when inserting into MySql
Hi There, I have a query whenever I try to insert something into a mysql table. This is the code I am using: ? $host1 = gethostbyaddr($REMOTE_ADDR); $date = date(Y-m-d h:i:s); $link = mysql_connect($host, $user, $passwd); mysql_select_db($database, $link); $sql = INSERT INTO vcstats VALUES('', $SCRIPT_NAME, $date, $HTTP_USER_AGENT, $BName, $BVersion, $BPlatform, $REMOTE_ADDR, $host1); $result = mysql_query($sql) or die(query errorBr . mysql_error()); mysql_close(); ? Thanks, Robby - This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ -- 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 PLEASE!! Get query error when inserting into MySql
What if you single quotes like this: '$REMOTE_ADDR' ??? - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, October 27, 2001 3:20 PM Subject: [PHP] HELP PLEASE!! Get query error when inserting into MySql Hi There, I have a query whenever I try to insert something into a mysql table. This is the code I am using: ? $host1 = gethostbyaddr($REMOTE_ADDR); $date = date(Y-m-d h:i:s); $link = mysql_connect($host, $user, $passwd); mysql_select_db($database, $link); $sql = INSERT INTO vcstats VALUES('', $SCRIPT_NAME, $date, $HTTP_USER_AGENT, $BName, $BVersion, $BPlatform, $REMOTE_ADDR, $host1); $result = mysql_query($sql) or die(query errorBr . mysql_error()); mysql_close(); ? Thanks, Robby - This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ -- 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] Help, please!
check: http://www.php.net/manual/en/function.ini-set.php - Original Message - From: Valentin V. Petruchek [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Sent: Thursday, October 18, 2001 4:00 PM Subject: [PHP] Help, please! Hello, Professionals! I've such problem: i need to change parameters from php.ini (such as sendmail_from) during execution script. Is it possible to perform and if is, how can i do it. Thanks Val.zp.ua -- 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] howw do I programm a PREV Next mechanism in PHP? Help Please!!
Steve Werby [EMAIL PROTECTED] wrote in message news:0c3701c14d18$3505c910$6401a8c0@workstation7... [SNIPs] http://www.tysonchandler.com/news_3.html (that's an underscore, not a space). Is it just me or is this site blazingly fast? Are you using some cache-tricks or something? Or du you just have an over-powered under-loaded server? I could use a bit of speed at my own site.. :-) -- Lasse -- 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 please with # sign
I have a text input field in my form. I need the user to be able to enter something like: Hello, I need # help. After which they click on a submit button. The succeeding page then takes this text and tries to display it and tries to store Hello, I need # help in a varchar field in a mysql table column. The mysql database is truncating the # sign and the text succeeding the # sign. Also, absolutly no text is being diplayed on the succeeding web page. I've tried using addslashes() and I was warned against using htmlentities(). Also, I'm not sure if I'm dealing with 2 issues: A mysql issue and a html issue. Or, am I dealing with one issue: A mysql issue or an HTML issue. Thank you, John __ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- 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 Please
Is there an environmental variable like in Active Server Pages ( HTTP_REFERRER ) that tells you the page you just came from. Thanks. __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- 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 Please
yes...do this: print HTTP_REFERER; tyler - Original Message - From: John Holcomb [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 4:17 PM Subject: [PHP] Help Please Is there an environmental variable like in Active Server Pages ( HTTP_REFERRER ) that tells you the page you just came from. Thanks. __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- 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] Help Please
yes there is one $HTTP_REFERER but it isn't supported by all browsers... bye Tim - Tim Taubert | [EMAIL PROTECTED] | http://www.shogunat.com/rg/ - -Original Message- From: John Holcomb [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 03, 2001 11:17 PM To: [EMAIL PROTECTED] Subject: [PHP] Help Please Is there an environmental variable like in Active Server Pages ( HTTP_REFERRER ) that tells you the page you just came from. Thanks. __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- 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] Help Please
Sorryyou'll need a '$' before the HTTP_REFERER part - Original Message - From: Tyler Longren [EMAIL PROTECTED] To: John Holcomb [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 4:23 PM Subject: Re: [PHP] Help Please yes...do this: print HTTP_REFERER; tyler - Original Message - From: John Holcomb [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 4:17 PM Subject: [PHP] Help Please Is there an environmental variable like in Active Server Pages ( HTTP_REFERRER ) that tells you the page you just came from. Thanks. __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- 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] Help Please
on 7/3/01 9:48 AM, Martín Marqués at [EMAIL PROTECTED] wrote: On Mié 04 Jul 2001 00:43, you wrote: Sorryyou'll need a '$' before the HTTP_REFERER part Even better! Execute phpinfo() and see all the http variables available! Or var_dump($GLOBALS); yes, but since you won't be 'referred' from anywhere, you won't see $HTTP_REFERRER :) Saludos... ;-) -- mike cullerton [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] Help Please
on 7/3/01 9:56 AM, Martín Marqués at [EMAIL PROTECTED] wrote: Even better! Execute phpinfo() and see all the http variables available! Or var_dump($GLOBALS); yes, but since you won't be 'referred' from anywhere, you won't see $HTTP_REFERRER :) ouch! You're totally right! :-) P.D.: But the variable will be there, only that it will be empty, right? i don't think so. atleast not in my browser :( Saludos... :-) -- mike cullerton [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] Help please
This code works fine on Win NT/IIS with Netscape but not with IE4 : cookie is not set ? ?php include include.php; if (authUser($username,$userpass)) { // do not work with IIS //$exp = gmdate (M d Y H:i:s, time()-3600); //setcookie(AUTHORIZER,$username.:.md5($username.$userpass),$exp. GMT); $exp = gmdate(M d Y H:i:s, time()+86400). GMT; print script language='javascript'; print var expdate=new Date ();; print expdate.setTime(expdate.getTime()+(24*60*60*1000*31));; print document.cookie='MYCOOKIE='+escape('.$username.:.md5($username.$userpass).') +';expires=expires '+expdate.toGMTString();; print /script; } //not header behind print //header(Location: $HTTP_REFERER); print script language='javascript'; print document.location='$HTTP_REFERER';; print /script; ? $HTTP_COOKIE_VARS['MYCOOKIE'] is always empty in $HTTP_REFERER and this only with IE 4/5 Help !!! -- 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]