[PHP] Not Looping...
I am having problems figuring out how to loop to show more then one record... Any help would be great... All I can get is the first record... Thanks... Code: ?php $db = mysql_connect("localhost", "root", "*"); mysql_select_db("indywebdesign",$db); $invoices_result = mysql_query("select * from invoices WHERE customerid=$id ORDER BY invoiceid DESC"); $invoices = mysql_fetch_array($invoices_result); ? TR TD BGCOLOR="#EAEAEA"FONT FACE="Tahoma" SIZE="2"?php echo $invoices["date"] ?/FONT/TD TD BGCOLOR="#EAEAEA"FONT FACE="Tahoma" SIZE="2"?php echo $invoices["amount"] ?/FONT/TD TD BGCOLOR="#EAEAEA" COLSPAN="2"FONT FACE="Tahoma" SIZE="2"?php echo $invoices["description"] ?/FONT/TD /TR -- 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] Get next record
How can one get the next record to compare two fields... I want to check if the date of the first record matches the date of the next record with the least amount of code... David Smith Indy Web Design http://www.indywebdesign.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] email with multiple records
I wrote a small script like a email list only when I run it with 3 emails. The first record gets his info, 2nd get his plus first, 3rd get his plus 2nd and 1st. Why is it doing this? David Smith Number 3 record gets email with: - Hi [EMAIL PROTECTED], Your email is [EMAIL PROTECTED] Bye, WreckRman2 --- Hi [EMAIL PROTECTED], Your email is [EMAIL PROTECTED] Bye, WreckRman2 Hi [EMAIL PROTECTED], Your email is [EMAIL PROTECTED] Bye, WreckRman2 -- 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] Replace last 4 of 16 with ****
I am building an account manager for my web hosting clients in which they can edit thier information, etc only I do not want to display the entire credit card number on the site. Instead I would like to replace the last 4 numbers with a * if possible. Can anyone assist me with the code to do this. Thanks in advance... David Smith Indy Web Design http://www.indywebdesign.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] Replace last 4 of 16 with ****
Excellent, thank you very much... -Original Message- From: Krznaric Michael [mailto:[EMAIL PROTECTED]] Sent: Friday, March 02, 2001 4:32 PM To: 'WreckRman2'; PHP List Post Subject: RE: [PHP] Replace last 4 of 16 with Hi, O.k. this is of the top of my head, but you should get the point. For more info refer to http://www.php.net/manual/en/function.substr.php . ? $CC_Number=5602232659988123; $rest = substr ($CC_Number, 0, 11).""; print "Your credit card number is $CC_Number"; ? What you're doing is extracting the first 12 number and adding "" to the end of that string. Hope it helps. Mike -----Original Message- From: WreckRman2 [mailto:[EMAIL PROTECTED]] Sent: Friday, March 02, 2001 4:22 PM To: PHP List Post Subject: [PHP] Replace last 4 of 16 with I am building an account manager for my web hosting clients in which they can edit thier information, etc only I do not want to display the entire credit card number on the site. Instead I would like to replace the last 4 numbers with a * if possible. Can anyone assist me with the code to do this. Thanks in advance... David Smith Indy Web Design http://www.indywebdesign.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] SetCookie
How can I set cookies during a login for fields in the a table? Example set cookie for UserID which is a file in the same table. Also how would I retrieve that info? Thanks in advance... David Smith ?php $auth = false; // Assume user is not authenticated if (isset( $PHP_AUTH_USER ) isset($PHP_AUTH_PW)) // Connect to MySQL mysql_connect( 'localhost', 'root', '**' ) or die ( 'Unable to connect to server.' ); // Select database on MySQL server mysql_select_db( 'indywebdesign' ) or die ( 'Unable to select database.' ); // Formulate the query $sql = "SELECT * FROM customers WHERE username = '$PHP_AUTH_USER' AND password = '$PHP_AUTH_PW'"; // Execute the query and put results in $result $result = mysql_query( $sql ) or die ( 'Unable to execute query.' ); // Get number of rows in $result. $num = mysql_numrows( $result ); if ( $num != 0 ) // A matching row was found - the user is authenticated. $auth = true; } } if ( ! $auth ) header( 'WWW-Authenticate: Basic realm="Customer Support"' ); header( 'HTTP/1.0 401 Unauthorized' ); echo 'Authorization Required.'; exit; } else echo '!-- Login Successful --'; } ? David Smith Indy Web Design http://www.indywebdesign.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] 2 questions
I use a RaQ3 and have no problems running PHP and MySQL. I started out using one IP but the biggest problem I found was that in order to view the site or make changes to it, the domain name must resolve to the server before it would work. I decided it would be best for me to assign each site an IP and go with it. I am not sure who you are talking to about a dedicated RaQ but look into http://www.4webspace.com. I have a RaQ3 with 100 gig transfer and 30 IP's for $110 a month. They do have RaQ4's for a little more money. David Smith - Original Message - From: Adrian Teasdale [EMAIL PROTECTED] To: PHP List Post [EMAIL PROTECTED] Sent: Sunday, February 04, 2001 12:47 PM Subject: [PHP] 2 questions Hi I have a couple of questions. One about hosting and the other about IP addresses. The first on the IP's. I have been speaking to a company that I am looking at getting a dedicated server from. They ONLY do one IP address per server and use name-based hosting. I have asked for dedicated IP's, but their answer has been that all hosting companies are going to have to go to name-based hosting now. What is everyone's feeling on this? Years ago, the company I was with used name-based and I remember that the search engines did not like this On to hosting, the above server is a Cobalt Raq 4i. Does anyone else on the list use one of these and what do you think? I want to make sure that it's easy enough to compile latest php and mysql whenever I want to Thanks for any advice Ade -- 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] Cobalt Raq Servers PHP
I currently have a dedicated RaQ3 server which runs PHP great. Before I got the RaQ3 my host provider was using a RaQ4 which also ran great. No problems on my end using the RaQ servers and PHP. David Smith - Original Message - From: Jamie Thompson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 31, 2001 12:13 PM Subject: [PHP] Cobalt Raq Servers PHP Has anyone had any experience using php on a Cobalt Raq4 server? any bugs or weird stuff i should know about? -- There are more than 1,000 chemicals in a cup of coffee. Of these, only 26 have been tested, and half caused cancer in rats. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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] upload_max_filesize
Sure, it is a dedicated RaQ3 server, running Linux/Apache, in which I didn't do the PHP install myself. I believe it not to be a dummy account because it shows: * NOTICE TO ROOT USER: Changes to system files may affect * * your warranty. Please consult your warranty card for details. * * * * http://www.cobaltnet.com at login... Below is my phpinfo script. http://www.indywebdesign.com/phpinfo.php Thanks... - Original Message - From: Jon Haworth [EMAIL PROTECTED] To: 'WreckRman2' [EMAIL PROTECTED] Sent: Thursday, February 01, 2001 11:23 AM Subject: RE: [PHP] upload_max_filesize Where did you put it when you installed PHP? If you didn't install PHP, but you're telnetting into a remote server, are you sure it's not showing you a dummy shell? You may have to ask your hosting company nicely to make the change for you. Can we have some more details of your OS, configuration, and whether you're responsible for the PHP installation? Cheers Jon -Original Message- From: WreckRman2 [mailto:[EMAIL PROTECTED]] Sent: 01 February 2001 16:07 To: [EMAIL PROTECTED] Subject: Re: [PHP] upload_max_filesize Actually it isn't on a windows system. Looking at my phpinfp.php file it shows "Configuration File (php.ini) Path" as /usr/local/lib but I see no file called php.ini in there using ftp or telnet. Any ideas? David - Original Message - From: Jon Haworth [EMAIL PROTECTED] To: 'David Smith' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, February 01, 2001 8:07 AM Subject: RE: [PHP] upload_max_filesize It's usually in your system root, but you could have put it somewhere else when you installed PHP. If you're on Windows it's liable to be in \windows\system, \windows\system32, \winnt\system, or \winnt\system32. Most OSes come with a Find Files command these days (just a thought). Once you have found it, open it in your favourite text editor. Search for "upload_max_filesize" and set it to whatever you like. Save it. Tell your boss you'll have to spend all afternoon fixing this bug, then spend the rest of the day reading Dilbert cartoons. HTH Jon -Original Message- From: David Smith [mailto:[EMAIL PROTECTED]] Sent: 01 February 2001 11:45 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] upload_max_filesize Sorry, that isn't very detailed but I appreciate your help. Where can I find php.ini? - Original Message - From: Jonatan Bagge [EMAIL PROTECTED] To: David Smith [EMAIL PROTECTED] Sent: Thursday, February 01, 2001 6:41 AM Subject: Re: [PHP] upload_max_filesize David Smith wrote: Can anyone explain in detail how I can increase the upload_max_filesize to 5 meg instead of the default 2 meg? Thanks, David php.ini -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] upload_max_filesize
Actually it isn't on a windows system. Looking at my phpinfp.php file it shows "Configuration File (php.ini) Path" as /usr/local/lib but I see no file called php.ini in there using ftp or telnet. Any ideas? David - Original Message - From: Jon Haworth [EMAIL PROTECTED] To: 'David Smith' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, February 01, 2001 8:07 AM Subject: RE: [PHP] upload_max_filesize It's usually in your system root, but you could have put it somewhere else when you installed PHP. If you're on Windows it's liable to be in \windows\system, \windows\system32, \winnt\system, or \winnt\system32. Most OSes come with a Find Files command these days (just a thought). Once you have found it, open it in your favourite text editor. Search for "upload_max_filesize" and set it to whatever you like. Save it. Tell your boss you'll have to spend all afternoon fixing this bug, then spend the rest of the day reading Dilbert cartoons. HTH Jon -Original Message- From: David Smith [mailto:[EMAIL PROTECTED]] Sent: 01 February 2001 11:45 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] upload_max_filesize Sorry, that isn't very detailed but I appreciate your help. Where can I find php.ini? - Original Message - From: Jonatan Bagge [EMAIL PROTECTED] To: David Smith [EMAIL PROTECTED] Sent: Thursday, February 01, 2001 6:41 AM Subject: Re: [PHP] upload_max_filesize David Smith wrote: Can anyone explain in detail how I can increase the upload_max_filesize to 5 meg instead of the default 2 meg? Thanks, David php.ini -- 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] Sending Download Header
When doing this does the $file_name have to be in the current directory or can it be a URL? - Original Message - From: Bojan Gajic [EMAIL PROTECTED] To: Natasha [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Saturday, January 27, 2001 2:13 PM Subject: Re: [PHP] Sending Download Header header("Content-Disposition: attachment; filename=$file_name"); header("Content-Type: application/octet-stream"); file://or any other MIME type echo "Content"; HTH, Bojan Gajic Natasha wrote: Hi, I'm making a small thing, that sends download response to the header, so that I can build a file from some data in the mysql, and send the data. It can be both text and binary data, could some one help out how to go about this ? I know about Content-Disposition, but I don't know to build it. thanks. __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.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]
[PHP] Cookies...
Currently my cookie expires in 1 hour, How can I make it expire in 1 day? setcookie("MemberLogin",$value,time()+3600); /* expire in 1 hour */ setcookie("MemberLogin",$value,time()+3600,"/",".combatfs.com",1); WreckRman2 Combat Flight Center http://www.combatfs.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] Web hosting for PHP/MySQl development
I would be willing to host sites for $10 a month with 100 meg, 25 Email, yourdomain.com, FP2000 if you like, PHP 4.04 with MySQL. Contact me for more information... No sites with extremely large bandwidth requirements please. David Smith -Original Message- From: Boaz Yahav [mailto:[EMAIL PROTECTED]] Sent: Friday, January 19, 2001 4:28 AM To: 'Chris Lott'; PHP General Subject: RE: [PHP] Web hosting for PHP/MySQl development The best around!!! http://www.weberdev.com/phenominet/prices.htm -Original Message- From: Chris Lott [mailto:[EMAIL PROTECTED]] Sent: Friday, January 19, 2001 3:37 AM To: PHP General Subject: [PHP] Web hosting for PHP/MySQl development Any recommendations for a good, savvy host for doing some PHP/MySQL development? Not looking for a free service, obviously, but somebody with: knowledgeable tech support, good mysql/php 4/zend support, decent mail handling, and developers tools like: telnet/ssh, emacs, procmail, crontab access, etc. Where are you php developers doing your hosting? I have been scouring this list archives, but everyone is focussed on free or extremely cheap. I also know about the PHP hosts listing, but the problem with that is you never know if the positive comments are real or not, and only people experienced with a host can tell you if they are any good or not! via private mail is fine, if you want to share that good thing with one person instead of the list... c -- Chris Lott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Array...
How can I do an array like below 100-1? OPTION VALUE=\"100\"/OPTION OPTION VALUE=\"99\"/OPTION OPTION VALUE=\"98\"/OPTION OPTION VALUE=\"97\"/OPTION to OPTION VALUE=\"3\"/OPTION OPTION VALUE=\"2\"/OPTION OPTION VALUE=\"1\"/OPTION WreckRman2 Combat Flight Center http://www.combatfs.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] PHP makes sexy!
On all my domains if an account/email doesn't exist it forwards to my root account. You can still see who it was sent to and everything... Domain Aliasing or somthing... -Original Message- From: Dieter Kneffel [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 11, 2001 11:28 AM To: Michael Kimsal Cc: Bryne Jrg Vidar; php-general Subject: Re: [PHP] PHP makes sexy! Oh, ok - that was a misunderstanding on my side! Of course it all goes to one account. Well, not really but instead of a real account it is piped directly into the script... But the problem still remains: If I am doing it this way, I never get to knoe the real receipient. Is there really no way to get the raw data? Perhaps in a similar manner as it works for UUCP??? Thanks a lot! dk Michael Kimsal schrieb: But you SHOULD know what DOMAIN it's going to - [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] can all go to one account. It's not a case of setting up individual usernames to point to one account - mail for the whole domain could/should be routed to the one account. [EMAIL PROTECTED] would still go to the one account, get processed, etc. If the processing script finds it's an invalid 'address', it can do what it likes. Dieter Kneffel wrote: Bryne Jrg Vidar wrote: If you set it up so that every incoming mail to your domain ends up in one account, ... Well, just this is my problem: I don't have an account for every possible address. I don't know the address yet before it arrives at our server! - dk -- 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] -- dieter kneffel [cto | business development] -- http://wap4.com| tel:+49 9187 905 955 http://mopilot.com | fax:+49 9187 904 124 mail:[EMAIL PROTECTED] | mobile: +49 170 2376 394 Mobile Applications For A Portable Internet. --- This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of WAP4.COM. If you are not the intended recipient then please be advised that you have received this email in error and that any use, dissemination, forwarding, printing or copying of this email is strictly prohibited. If you have received this email in error, please notify WAP4.COM at +49.9187.905.955 or send an email to [EMAIL PROTECTED] Thank You -- 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] How can I get a random number
? srand((double)microtime()*100); $id = rand(1,100); echo ("$id"); ? -Original Message- From: Brandon Orther [mailto:[EMAIL PROTECTED]] Sent: Monday, January 10, 2000 5:14 PM To: PHP User Group Subject: [PHP] How can I get a random number How can I get a random number Thank you, Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.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]