[PHP-DB] PDO setAttribute return value
Is it my imagination, or does setAttribute return FALSE on success and TRUE on failure? I've tested it with getAttribute, and it definitely seems to work the reverse of what the documentation states. I'm using MySQL, and I am setting the error handling. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] PDO Exception Handling Question
I hope by now you figured this out, but you have to use $dbh-setAttribute() to enable exception handling for anything but the initial object creation. Worse yet, as of 2007/04/20 the return values of setAttribute are reversed. It returns TRUE on failure and FALSE on success. Rodney Topor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I did some more checking. If there is an error in the new PDO(...) constructor call, then it does get into the catch block and print an appropriate error message. (Good. Perhaps I was previously mistaken.) But if there is an error in the SELECT query (either syntax error, or reference to missing table), then no exception is raised, and control just continues in the try block with a null result from the query. Is this the intended behaviour? On Sun, 2 Apr 2006, chris smith wrote: On 4/2/06, Rodney Topor [EMAIL PROTECTED] wrote: I've just started using PDO with PHP 5.1 and MySQL 5.0. Everything seems to work fine, except for one issue with the following example from the PHP manual. ?php try { $dbh = new PDO('mysql:host=localhost;dbname=test', $user, $pass); foreach ($dbh-query('SELECT * from FOO') as $row) { print_r($row); } $dbh = null; } catch (PDOException $e) { print Error!: . $e-getMessage() . br/; die(); } ? If an error occurs in creating the new PDO instance, or in issuing the PDO query, then a PDOException should be raised. But nothing is ever printed. I've tried running this script, forcing an exception, both from the command line and from the server. But nothing is ever printed. What do I have to do to see the printed string in the catch-block? Do you mean it doesn't print anything or it doesn't get into the catch block? ie it prints Error!:br/ or it doesn't get into that section at all? -- Postgresql php tutorials http://www.designmagick.com/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Yahoo! Mail and php-db digest mail-out!
Hi, Not PHP or MYSQL related but relates to the use of this DIGEST using Yahoo! Mail (beta). Is there anyone else that uses Yahoo! Mail (beta) and recieves these DIGESTS? I don't mean the single emails you get but the DIGEST. If I go back to the OLD version of the mail and view any DIGEST email from php-db at the start of each email it shows the HEADER of the sender, but using the BETA version of the mail it skips the header, is there a way to produce the headers? It's a bit annoying and harder to manage the DIGEST now. But only seems to be occouring in the beta version. Maybe it will be fixed in the main release, I don't know. Anyone else come accross this? Maybe an easy fix is to change to the manual mails and get off the digest form. Since there is not alot of emails generated through the list this time of the year. J
[PHP-DB] Re: Session Problem
snip Forget to tell you, that if I used http://localhost http://localhost/ , the session running well... But if I change with http://hostname http://hostname/ , the session wasn't running... /snip http://localhost and http://hostname/ are 2 COMPLETELY different things and can reflect NOTHING to do with privlidges. However if localhost works and hostname does not and hostname hits back to your machine than you have a problem more likely with your module. I think 5.2 had the issues with directives handling sessions. Update your PHP now, never use an older version. NEVER! You should never use an older version of anything net related in my opinion. Your crazy if you do, your inline to be attacked if so and your also in line to have problems like this that are generally out dated because the newer release normally fixes common errors. It's like contacting Microsoft for help on Windows 98 now, they won't offer any. Same applies here, update all your modules and the problem will more likely be fixed and people will be even more happier to help you. It's hard to help someone if I have installed a different version than you. But can you do an update? Sessions can be so tricky at times, even if you think you have it all right they seem to always give you grief. Goodluck with it. J
[PHP-DB] part of url link to webform Question.
Hi, Due to the increase in spam I have had to change the way I get people to email me on my business website. So instead of people replying via the reply function in their email client they need to reply using my wesbite each time. But I want to keep track of each email in a similiar way as I do in my email clients. So what I want to do is create a email ID. Than I have a support MYSQL DB and update it there, but when people use my contact form it will have a email ID so I can track it easier and match the ID in the DB to continue the enquiry. So when people get an an email from me they click a link to reply and the ID is inputed in a form field of it's own automatically. What I need to know how to do this, I will add the ID in the email myself but how to do I get the url email ID part to be automatically put into the form? So the email reply link would look something like this: http://www.getpaid2reademails.com/pages/contact.php?emailID:EMAIL_ID_CODE_GOES_HERE Than on the contact form I would add a new form input with emailID What I need to know is how do I get the emailID from the url to be inputted in the emailID in the webform? Using PHP and mySQL for this! Thanks for your time. Jerry Send instant messages to your online friends http://au.messenger.yahoo.com
[PHP-DB] re: small question php/postgreSQL (basic question, not small)
Date: Tue, 7 Nov 2006 10:38:18 +0100 (CET)From: Desmond Coughlan [EMAIL PROTECTED]To: php php-db@lists.php.netSubject: small question php/postgreSQL Hi, I've been trying to get a small DB up and working with PhP. It's a library, and so far, I can't get past the stage of displaying a page. I try the 'hello world' example, and it displays. I then populate a DB and can access it via psql .. cdi= SELECT * FROM stock ; -[ RECORD 1 ]-+--- stock_ids | 1 isbn_no | 10101010 code_livre| 23455 titre | toto goes to Hollywood editeur | editions toto collection| collection toto auteur_nom| smith auteur_prenom | john matiere | ang media_type| li -[ RECORD 2 ]-+--- stock_ids | 2 isbn_no | 10536278 code_livre| 24874 titre | toto comes back from Hollywood editeur | editions baba collection| collection toto auteur_nom| martin auteur_prenom | peter matiere | fre media_type| dvd OK, I then write the following script ?php pg_connect (dbname=cdi user=cdi password=toto) or die (Couldn't Connect: .pg _last_error()); $query=SELECT * FROM stock; $query=pg_query($query); // start the output while($row=pg_fetch_array($query,NULL,PGSQL_ASSOC)) { echo Title: .$row['isbn_no'].br /; echo blah .$row['code_livre'].br /; } ? (sorry not to put that in italics or whatever...) ... and put it in the document root of my webserver, under php_experimental. I get a blank page. The apache weblogs look like ... 192.168.0.254 - - [07/Nov/2006:10:37:30 +0100] GET /php_experimental/base.php HTTP/1.1 200 - - Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) There's something obvious that I'm missing. Any ideas ..? Thanks. D. -- re: ?php pg_connect (dbname=cdi user=cdi password=toto) or die (Couldn't Connect: .pg _last_error()); $query=SELECT * FROM stock; $query=pg_query($query); // start the output while($row=pg_fetch_array($query,NULL,PGSQL_ASSOC)) { echo Title: .$row['isbn_no'].br /; echo blah .$row['code_livre'].br /; } ? Simple, isbn_no and code_livre need to be defined in your code. Otherwise PHP don't know what your looking for. There is PLENTY of docs online to show you how to display items in a DB. Hello World is basic, too basic to use as an example and is a poor one to use. If your nerw you have to go a bit more into it than Hello World code. (which in my opinion gets you know-where) been there done that. Google how to display items in a DB in PHP and shoot you get some handy things. I just feel this question is not required here when google has all the answers like this. Jerry
Re: [PHP-DB] RE : RE: [PHP-DB] re: small question php/postgreSQL (basic question, not small)
phpinfo can be a little bit of info that may have a module missing. But I doubt that is the issue here, but you never know. Why don't be just change your query completely like you would in SQL if you were searching direct for certain fields? Because if these 2 fields are the only fields you will EVER need in this page why be too technical. However if your thinking of adding the other fields than this is trhe way to go. I have probably missed something along the traps. But I am happy to try and demonstrate another way you could do it. Are you on your own server or sub-leased or something? Jerry - Original Message From: Bastien Koert [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; php-db@lists.php.net Sent: Wednesday, 8 November, 2006 2:45:49 AM Subject: RE: [PHP-DB] RE : RE: [PHP-DB] re: small question php/postgreSQL (basic question, not small) is your server set to work with php files? Bastien From: Desmond Coughlan [EMAIL PROTECTED] To: Bastien Koert [EMAIL PROTECTED], [EMAIL PROTECTED], php-db@lists.php.net Subject: [PHP-DB] RE : RE: [PHP-DB] re: small question php/postgreSQL (basic question, not small) Date: Tue, 7 Nov 2006 16:38:24 +0100 (CET) X-No-Archive: true That doesn't work, either. Still the blank page. Hmm ... the file is in the right place../usr/local/www/data ... 'cos all of the other files (*.html one an d all) are served from there, and they're available to the outside world. D. Bastien Koert [EMAIL PROTECTED] a écrit : The code does need to know what the fields are...I think a more likely issue is the query for some reason, also change the $query to result in the query statement try $result=pg_query($query) or die(pg_error()); //to see if there are any errors with the query while($row=pg_fetch_array($result,NULL,PGSQL_ASSOC)) { echo Title: .$row['isbn_no']. ; echo blah .$row['code_livre']. ; }else{ echo No rows found; } bastien From: JeRRy To: php-db@lists.php.net Subject: [PHP-DB] re: small question php/postgreSQL (basic question, not small) Date: Tue, 7 Nov 2006 23:18:58 +1100 (EST) Date: Tue, 7 Nov 2006 10:38:18 +0100 (CET) From: Desmond Coughlan To: php Subject: small question php/postgreSQL Hi, I've been trying to get a small DB up and working with PhP. It's a library, and so far, I can't get past the stage of displaying a page. I try the 'hello world' example, and it displays. I then populate a DB and can access it via psql .. cdi= SELECT * FROM stock ; -[ RECORD 1 ]-+--- stock_ids | 1 isbn_no | 10101010 code_livre | 23455 titre | toto goes to Hollywood editeur | editions toto collection | collection toto auteur_nom | smith auteur_prenom | john matiere | ang media_type | li -[ RECORD 2 ]-+--- stock_ids | 2 isbn_no | 10536278 code_livre | 24874 titre | toto comes back from Hollywood editeur | editions baba collection | collection toto auteur_nom | martin auteur_prenom | peter matiere | fre media_type | dvd OK, I then write the following script pg_connect (dbname=cdi user=cdi password=toto) or die (Couldn't Connect: .pg _last_error()); $query=SELECT * FROM stock; $query=pg_query($query); // start the output while($row=pg_fetch_array($query,NULL,PGSQL_ASSOC)) { echo Title: .$row['isbn_no']. ; echo blah .$row['code_livre']. ; } ? (sorry not to put that in italics or whatever...) ... and put it in the document root of my webserver, under php_experimental. I get a blank page. The apache weblogs look like ... 192.168.0.254 - - [07/Nov/2006:10:37:30 +0100] GET /php_experimental/base.php HTTP/1.1 200 - - Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) There's something obvious that I'm missing. Any ideas ..? Thanks. D. -- re: pg_connect (dbname=cdi user=cdi password=toto) or die (Couldn't Connect: .pg _last_error()); $query=SELECT * FROM stock; $query=pg_query($query); // start the output while($row=pg_fetch_array($query,NULL,PGSQL_ASSOC)) { echo Title: .$row['isbn_no']. ; echo blah .$row['code_livre']. ; } ? Simple, isbn_no and code_livre need to be defined in your code. Otherwise PHP don't know what your looking for. There is PLENTY of docs online to show you how to display items in a DB. Hello World is basic, too basic to use as an example and is a poor one to use. If your nerw you have to go a bit more into it than Hello World code. (which in my opinion gets you know-where) been there done that. Google how to display items in a DB in PHP and shoot you get some handy things. I just feel this question is not required here when google has all the answers like this. Jerry _ Ready for the world's first international mobile film festival celebrating the creative potential of today's youth? Check out Mobile Jam Fest for your a chance to WIN
[PHP-DB] Re: RE : RE: [PHP-DB] re: small question php/postgreSQL (basic question, not small)
Test: - create a new account user - go into the www directive - create a index file - do phpinfo() - try and connect to a msql server, no query needed just a connection - under that delibrately try and enter a mysq server but use a wrong pass, make sure you error report it with some message on screen. if it connects and one fails your connections are fine. However make sure you CLOSE each connection seperatley. What appears to be happening in your code it it's not going near the mysql server, it's skipping it. Which means the die error will not appear if it skips it. Ensure php is enabled and mysql is booted etc. Also don't try and connect localhost to it, use the outside world. (a browser - www.whatever.com or IP-ADDRESS) J - Original Message From: Desmond Coughlan [EMAIL PROTECTED] To: Bastien Koert [EMAIL PROTECTED]; [EMAIL PROTECTED]; php-db@lists.php.net Sent: Wednesday, 8 November, 2006 2:38:24 AM Subject: RE : RE: [PHP-DB] re: small question php/postgreSQL (basic question, not small) X-No-Archive: true That doesn't work, either. Still the blank page. Hmm ... the file is in the right place../usr/local/www/data ... 'cos all of the other files (*.html one an d all) are served from there, and they're available to the outside world. D. Bastien Koert [EMAIL PROTECTED] a écrit : The code does need to know what the fields are...I think a more likely issue is the query for some reason, also change the $query to result in the query statement try $result=pg_query($query) or die(pg_error()); //to see if there are any errors with the query while($row=pg_fetch_array($result,NULL,PGSQL_ASSOC)) { echo Title: .$row['isbn_no']. ; echo blah .$row['code_livre']. ; }else{ echo No rows found; } bastien From: JeRRy To: php-db@lists.php.net Subject: [PHP-DB] re: small question php/postgreSQL (basic question, not small) Date: Tue, 7 Nov 2006 23:18:58 +1100 (EST) Date: Tue, 7 Nov 2006 10:38:18 +0100 (CET) From: Desmond Coughlan To: php Subject: small question php/postgreSQL Hi, I've been trying to get a small DB up and working with PhP. It's a library, and so far, I can't get past the stage of displaying a page. I try the 'hello world' example, and it displays. I then populate a DB and can access it via psql .. cdi= SELECT * FROM stock ; -[ RECORD 1 ]-+--- stock_ids | 1 isbn_no | 10101010 code_livre | 23455 titre | toto goes to Hollywood editeur | editions toto collection | collection toto auteur_nom | smith auteur_prenom | john matiere | ang media_type | li -[ RECORD 2 ]-+--- stock_ids | 2 isbn_no | 10536278 code_livre | 24874 titre | toto comes back from Hollywood editeur | editions baba collection | collection toto auteur_nom | martin auteur_prenom | peter matiere | fre media_type | dvd OK, I then write the following script pg_connect (dbname=cdi user=cdi password=toto) or die (Couldn't Connect: .pg _last_error()); $query=SELECT * FROM stock; $query=pg_query($query); // start the output while($row=pg_fetch_array($query,NULL,PGSQL_ASSOC)) { echo Title: .$row['isbn_no']. ; echo blah .$row['code_livre']. ; } ? (sorry not to put that in italics or whatever...) ... and put it in the document root of my webserver, under php_experimental. I get a blank page. The apache weblogs look like ... 192.168.0.254 - - [07/Nov/2006:10:37:30 +0100] GET /php_experimental/base.php HTTP/1.1 200 - - Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) There's something obvious that I'm missing. Any ideas ..? Thanks. D. -- re: pg_connect (dbname=cdi user=cdi password=toto) or die (Couldn't Connect: .pg _last_error()); $query=SELECT * FROM stock; $query=pg_query($query); // start the output while($row=pg_fetch_array($query,NULL,PGSQL_ASSOC)) { echo Title: .$row['isbn_no']. ; echo blah .$row['code_livre']. ; } ? Simple, isbn_no and code_livre need to be defined in your code. Otherwise PHP don't know what your looking for. There is PLENTY of docs online to show you how to display items in a DB. Hello World is basic, too basic to use as an example and is a poor one to use. If your nerw you have to go a bit more into it than Hello World code. (which in my opinion gets you know-where) been there done that. Google how to display items in a DB in PHP and shoot you get some handy things. I just feel this question is not required here when google has all the answers like this. Jerry _ Ready for the world's first international mobile film festival celebrating the creative potential of today's youth? Check out Mobile Jam Fest for your a chance to WIN $10,000! www.mobilejamfest.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des
Re: [PHP-DB] Re: RE : RE: [PHP-DB] re: small question php/postgreSQL (basic question, not small)
True, sorry! (missed that, haha wake up!) - Original Message From: Chris [EMAIL PROTECTED] To: JeRRy [EMAIL PROTECTED] Cc: php-db@lists.php.net Sent: Wednesday, 8 November, 2006 3:14:01 PM Subject: Re: [PHP-DB] Re: RE : RE: [PHP-DB] re: small question php/postgreSQL (basic question, not small) JeRRy wrote: Test: - create a new account user - go into the www directive - create a index file - do phpinfo() - try and connect to a msql server, no query needed just a connection - under that delibrately try and enter a mysq server but use a wrong pass, make sure you error report it with some message on screen. if it connects and one fails your connections are fine. However make sure you CLOSE each connection seperatley. What appears to be happening in your code it it's not going near the mysql server, it's skipping it. Which means the die error will not appear if it skips it. Ensure php is enabled and mysql is booted etc. Also don't try and connect localhost to it, use the outside world. (a browser - www.whatever.com or IP-ADDRESS) Err - the OP is having an issue with postgresql, not mysql. The subject even mentions this.. -- Postgresql php tutorials http://www.designmagick.com/
[PHP-DB] Re: Rss Standard text to RSS format!
Hi, In reponse to the person that recently posted for conversion try these links: (Sorry the proper subject was lost while doing this) http://www.barelyfitz.com/projects/jssyndicate/ http://www.google.com.au/search?hl=enq=convert+standard+data+to+RFC822+with+phpbtnG=Searchmeta= I am sure that will help you, a good tip is to google it and read up. Also never www.goggle.com it .. EVER! It's not on! J
Re: [PHP-DB] Warning, Subscribers please read!
Hi, Not sure but if it does it's not working lately. Probably gone on a vacation. J Dwayne Hottinger [EMAIL PROTECTED] wrote: Doesnt the list run a spam filter ie spamassassin or bogofilter via procmail? - Original Message - From: JeRRy To: Sent: Thursday, May 11, 2006 6:22 AM Subject: [PHP-DB] Warning, Subscribers please read! Hi Subscribers, This message is not for PHP/MySql help in anyway but is posted due to the high level of spam on this lately and some new people to the internet may not be aware of the possible risks people can get into if they follow any of the spam emails on here. If the topic is not related to a list but was sent via the list do not respond to it, either in-directly via this list or the list your on or direct to the reply-to email. But if your the curious person and want to visit a website listed please do not just simply click the link that is displayed in the email. Copy/Paste it into your web browser and surf it. NEVER click a website link directly from a email, even if you trust the sender, it's so easy to send fake emails that may appear to be from REAL PEOPLE but their not! Get into the habbit of copy/pasting it. It's a good habbit. Never send money to people you DON'T KNOW! Never trust an email from someone that you don't know asking to send and or deposit money into a bank account or paypal account. Normally it's a scam and the money is just going to the scammer. PayPal emails, please update your account info etc. Never trust emails with an paypal address. Never click it, copy/paste it or simply visit http://www.paypal.com/ and login to your account, if their is a problem with it they will list it as you login. The spam recently on here is really stupid, if the admin of this list is about why not think about changing the permissions of list signups to need to be approved by admin before actually being subscribed instead of them only having to verify by a web address in an email. Would slow the spam down heaps, has elsewhere and would be worth considering. Anyways be careful people, most of you would be aware of the issues surrounding spam but this posting was to make sure that everyone is aware of it happening. Of course this email would not cover the whole info but is a starting point for you. Take care all and be careful. Jerry
[PHP-DB] Re: Example of mail()
Hi, Why not use cookies to check if the user has pressed F5 or refreshed the page? There is a number of ways to do this, all should work effectively depending on your how many people hit the page etc. a) Store the message in a cookie, and run PHP code to check before executing the mail() function. If the message matches after a refresh than don't execute the mail() function. You could display the message again in the box or setup a error reporting message saying you cannot refresh the page or send the same message twice. b) Everytime the page is loaded (whatever.php) from a weblink or something have a hidden field like id=rand() ... Use a random generator to randomly uissue lets say a 12 char legnth. So if the user refreshes the hidden field would be the same hence no mail() execution. However if the page is loaded from a weblink the php issues a new code. c) I did have a c.. but forgot. Look up the following on google checksum or chksum Anyways. There is more ways but it's time for me to hit the sack(). :P J
Re: [PHP-DB] grabbing data and auto email set users
Okay here is the full code. Now I got this code off a friend! In this first section to display the data that is grabbed from the db. ?php $db = mysql_connect(localhost, user, pass); mysql_select_db(db_select,$db); $result = mysql_query(SELECT `nickname` FROM tipping WHERE 1 ORDER BY `score` DESC LIMIT 0, 30,$db); while ($myrow = mysql_fetch_row($result)) { printf( brinput type=text name=username[$a] value=%s br, $myrow[0]); } ? input type=submit value=submit /form /p It displays the data fine. Please note in the above there is more code and I doubt the issue is in there as the data fetching shows fine, I believe the error lies somewhere below. Than the form submit is pushed to another page with this code: --- ? include('../conf.inc.php'); if ($REQUEST_METHOD == POST) { $usr = user; $pwd = pass; $db = db_select; $host = localhost; $cid = mysql_connect($host,$usr,$pwd); mysql_select_db($db); // NOTE that form fields automatically become variables $query = insert into round3 SET username='$username[$a]'; mysql_query($query); echo( ); } else {echo(Ooops, something bad happened! Please try again shortly.);} ? a href=admin.phpBACK/a --- But when I check the db only ONE entry is added and it's blank. But on the the page that displays the data shows 12 records. So it's not updating for some reason? Any help? J
Re: [PHP-DB] grabbing data and auto email set users
Hi, Okay I played with the code a bit and ended up with this, it does NOT produce errors but it's not doing anything. Connects to the db but does not do the mail out. Maybe I missed something said before, but here you go, the link below with the code. (it's probably basic) http://pastebin.com/650846 J Chris [EMAIL PROTECTED] wrote: JeRRy wrote: Hi, Okay I must be missing something here. I changed it to mysql_query and no errors produce however no emails are sent either. After cross-checking back and fourth with my db the entries are correct. A connection is made and establlished. maybe I need to place some eror recording to see where it's failing. I can't seem to get it to work, changed a heap of code but nothing budges. I can send the code I have and table structure if you want. Post it on http://www.pastebin.com and send us the url. -- Postgresql php tutorials http://www.designmagick.com/
Re: [PHP-DB] grabbing data and auto email set users
Okay, but still not working... is NULL the same as ' '? Or does NULL have to be the inserted value in the db? J Chris [EMAIL PROTECTED] wrote: JeRRy wrote: Hi, Okay I played with the code a bit and ended up with this, it does NOT produce errors but it's not doing anything. Connects to the db but does not do the mail out. Maybe I missed something said before, but here you go, the link below with the code. (it's probably basic) Actually try this one: http://pastebin.com/650871 You had an extra loop just for 'tippings' but never used it anywhere. -- Postgresql php tutorials http://www.designmagick.com/
Re: [PHP-DB] grabbing data and auto email set users
Hi, Ahh okay I thought NULL was blank. Okay I understand, therefore, hehe, I fixed it. snip $query = select username from round3 where misc=''; fixed it, the email got sent. Had to change a few strings also to match my database which I was not aware of. Forgot it actually. Now the only thing I need to know is how do I change the sender email is, currently it sets to the server default username. (e.g. [EMAIL PROTECTED]) Is there a way to change that and the subject. Thanks for your time. I have learned a little bit off this also. So thankyou. J Chris [EMAIL PROTECTED] wrote: JeRRy wrote: Okay, but still not working... is NULL the same as ' '? Or does NULL have to be the inserted value in the db? Null means unknown - so completely different to ' ' or ''. How was your table created? What do you get if you run that query through phpmyadmin: select username from round3 where misc=NULL; ? -- Postgresql php tutorials http://www.designmagick.com/
Re: [PHP-DB] grabbing data and auto email set users
Okay I have the emails to work now, thanks so much Chris. But now I have encountered another problem, I hope you don't mind helping, I am obviously missing again something basic. Basic than before. I have this code: $result = mysql_query(SELECT `nickname` FROM tipping WHERE 1 ORDER BY `score` DESC LIMIT 0, 30,$db); while ($myrow = mysql_fetch_row($result)) { printf( brinput type=text name=username[$a] value=%s br, $myrow[0]); } ? which displays all the users names. than I want to push it to another page that tells the db to update, one username per record. Code below: $query = insert into round3 SET username='$username[$a]'; mysql_query($query); echo( ); } else {echo(Ooops, something bad happened! Please try again shortly.);} ? a href=admin.phpBACK/a input type=submit value=submit /form /p But when I check the db this is what I get. A new record created but username is blank. So it's creating a new record but leaving it blank, why? Now at times the record will insert more than one record, so I need it able to update more than one record at a time. Any help? J Chris [EMAIL PROTECTED] wrote: JeRRy wrote: Hi, Ahh okay I thought NULL was blank. Okay I understand, therefore, hehe, I fixed it. $query = select username from round3 where misc=''; fixed it, the email got sent. Had to change a few strings also to match my database which I was not aware of. Forgot it actually. Now the only thing I need to know is how do I change the sender email is, currently it sets to the server default username. (e.g. [EMAIL PROTECTED] ) Is there a way to change that and the subject. You set the subject: mail($to, $subject, $message, $headers); You can set the From in the headers: $headers = From: your_email_address\n; $headers .= Reply-To: your_email_address\n; See http://www.php.net/mail for more info. -- Postgresql php tutorials http://www.designmagick.com/
[PHP-DB] grabbing data and auto email set users
Hi, No code here unless required. I run this tipping site. All user details are in a table called tipping which stores their id, username, password, email address, score and others. Than I have tables round 1 through to round 22. (all seperate tables) This is where users tip to. I have a tipping deadline, however I run this from a javascript countdown code and not connected in any way to the db. (maybe I should for what I need) in each round i have id, username, game1 through to game 8, score (for that round only) and a column called Misc. Misc is where I know if the user has tipped or not, on default it's NULL, if they tip it's y. I want to run a PHP script generally 24 hours before the end of the round closing that sends an email ONLY to users that have NOT tipped to date on script running. The email will have details that they have not tipped and a web-url. Now I am not sure how to do this. As mentioned below the email address for users are in a different table. Should I put the email value in the rounds table also? How would I go about getting a script to do this? I know I could send a cronjob to execute it on a set say. And I could change this if the time needs changing in cronjobs. Just need help on the script. So I need the script to read the desired round and look for the username and misc. If misc y than ignore it and the username. If NULL than grab the username and match it with the email address in the other table. Or I could add the email value in that table if it makes it easier that way. Preffered email format is Plain-text. But any code that supports HTML is fine too. As long as it recognises what's HTML and what's not. (example if i press the ENTER key it must recognise this as a enter and not a space.) Could anyone please help me here? Thanks for your time. J
Re: [PHP-DB] grabbing data and auto email set users
Hi, I used the following but got this error: Fatal error: Call to undefined function: db_fetch() in /home/tassie/public_html/tipping/admin/check.php on line 7 Any help please? J $query = select * from users; $result = mysql_query($query); while($row = db_fetch($result)) { $query_two = select 1 from round_table where userid= . $row['userid']; $result_two = db_query($query_two); $has_tipped = db_fetch($result_two); // if has_tipped is empty, there have been no tips placed by this user. if (empty($has_tipped)) { mail($row['email'], 'you need to tip'... } } done! -- Postgresql php tutorials http://www.designmagick.com/
Re: [PHP-DB] grabbing data and auto email set users
Hi, Okay I must be missing something here. I changed it to mysql_query and no errors produce however no emails are sent either. After cross-checking back and fourth with my db the entries are correct. A connection is made and establlished. maybe I need to place some eror recording to see where it's failing. I can't seem to get it to work, changed a heap of code but nothing budges. I can send the code I have and table structure if you want. J Chris [EMAIL PROTECTED] wrote: JeRRy wrote: Hi, I used the following but got this error: *Fatal error*: Call to undefined function: db_fetch() in */home/tassie/public_html/tipping/admin/check.php* on line *7* As I said: db_query will depend on your database (ie mysql_query or pg_query or other ...). so replace it with mysql_query. -- Postgresql php tutorials http://www.designmagick.com/
Re: [PHP-DB] Messenger Question!
Thanks for your response :) Chris [EMAIL PROTECTED] wrote: JeRRy wrote: Not exactly a DB question but the storing will be done in a DB and using PHP. Anyways with the growing demand of IM's I want to add to my site easy access for people contact me. I could add my Yahoo! username for Yahoo! Messenger and MSN Messenger email address but I want to make it easier for people to add me, most people won't bother doing it the long way. So want I want to do is store my id's to a DB than run a query to fetch the id required than output a hyperlink to the user to add me. When they click the hyperlink it will automatically detect if they have got that Messenger system on their system and if logged in I will be added to the list. If not logged in or have the Messenger than it will display a error. Is there a way to DETECT if they have Yahoo! or MSN Messengter installed? You could through activex or possibly a java applet, but not with php or javascript. -- Postgresql php tutorials http://www.designmagick.com/
[PHP-DB] Messenger Question!
Not exactly a DB question but the storing will be done in a DB and using PHP. Anyways with the growing demand of IM's I want to add to my site easy access for people contact me. I could add my Yahoo! username for Yahoo! Messenger and MSN Messenger email address but I want to make it easier for people to add me, most people won't bother doing it the long way. So want I want to do is store my id's to a DB than run a query to fetch the id required than output a hyperlink to the user to add me. When they click the hyperlink it will automatically detect if they have got that Messenger system on their system and if logged in I will be added to the list. If not logged in or have the Messenger than it will display a error. Is there a way to DETECT if they have Yahoo! or MSN Messengter installed? Also I know the hyperlink code to add users from a url for Yahoo! Messenger but does anyone know it or some code for MSN Messenger? Thanks for your time. J
Re: [PHP-DB] if() and else() help needed
Well the way I have it over 2 PHP calls works, as 'nickname' is a UNIQUE key entry in the db. So multiple entries are not an issue. So if it can't insert, as it will try and fail it will update. But if the insert works I am guessing it's going to do an update straight after it for the same result, So it double entries I persume. But what worry would this be? None I am guessing, it's just doing a double entry as long as the data is not lost. And only occours on entering tips for the first time. J Chris [EMAIL PROTECTED] wrote: JeRRy wrote: Hi, Yes the user is logged in. The system knows who is tipping by their nickname and unique id system. So if I put the update query in the else statement would this be the easy fix? Don't know - I was offering a suggestion only. Without the full code we can't really help much (I doubt anyone will want the full code to help you clean it up, sorry). -- Postgresql php tutorials http://www.designmagick.com/
[PHP-DB] if() and else() help needed
Hi, I'll admit it, this is damned messy. But I want to learn from the list in how to sort it out. Than for future refrence I will know... Now I am running 2 different queries/statements here completely seperate. I have made the nickname field in the database UNIQUE. So than when I have this sort of query setup no matter what their will only be one nickname entry for that user. So when people update their profile a new nickname is not inserted but it is updated. But I want it all in one PHP call. How do I do this? Here is the code: ? if ($REQUEST_METHOD == POST) { $usr = . $mysql_user . ; $pwd = . $mysql_password . ; $db = . $mysql_database . ; $host = . $mysql_hostname . ; $cid = mysql_connect($host,$usr,$pwd); mysql_select_db($db); // NOTE that form fields automatically become variables $sql = update round . $round_number . SET game1='$game1',game2='$game2',game3='$game3',game4='$game4',game5='$game5',game6='$game6',game7='$game7',game8='$game8',misc='y' WHERE username='$username'; mysql_query($sql); echo(Your tips have been savedbrbr$game1br$game2br$game3br$game4br$game5br$game6br$game7br$game8br.); } else {echo(Ooops, something bad happened! Please try again shortly.);} ? ? if ($REQUEST_METHOD == POST) { $usr = . $mysql_user . ; $pwd = . $mysql_password . ; $db = . $mysql_database . ; $host = . $mysql_hostname . ; $cid = mysql_connect($host,$usr,$pwd); mysql_select_db($db); // NOTE that form fields automatically become variables $sql = insert into round . $round_number . SET game1='$game1',game2='$game2',game3='$game3',game4='$game4',game5='$game5',game6='$game6',game7='$game7',game8='$game8',misc='y',username='$username'; mysql_query($sql); echo( ); } else {echo(Ooops, something bad happened! Please try again shortly.);} ? As you can see 2 PHP calls. What I want is to have it all in one PHP call. On the update one I deleted the echo statement text. I want the insert one to have the text that appears and the update text output to say your tips have been updated... Of course if the DB is down or something output an error to try again like already in the else() statements. The help would be great. Thanks! J
Re: [PHP-DB] if() and else() help needed
Hi, Yes the user is logged in. The system knows who is tipping by their nickname and unique id system. So if I put the update query in the else statement would this be the easy fix? I use something like a field called tipped in the table, so if they have tipped it goes to y and if never tipped it's blank. I think it should show that in the query. Cant remember, I did the scripts 2 or 3 years ago. Just want to tidy it up. J Chris [EMAIL PROTECTED] wrote: JeRRy wrote: Hi, I'll admit it, this is damned messy. But I want to learn from the list in how to sort it out. Than for future refrence I will know... Now I am running 2 different queries/statements here completely seperate. I have made the nickname field in the database UNIQUE. So than when I have this sort of query setup no matter what their will only be one nickname entry for that user. So when people update their profile a new nickname is not inserted but it is updated. But I want it all in one PHP call. How do I do this? How are you differentiating between the statements? eg they are logged in, or you check with a database query or ? You could do something like this: // check for $_GET['tipid'] - if it's there, we're updating our tips. // if it's not, then we're adding new tips. if (isset($_GET['tipid'])) { $query = UPDATE .. $success_message = Your tips have been updated; } else { $query = INSERT INTO . $success_message = Your tips have been saved; } $result = mysql_query($query); if ($result) { echo $success_message; } else { echo Problem!! ; } -- Postgresql php tutorials http://www.designmagick.com/
[PHP-DB] Proper procedure to close mysql queries!
Hi, Just need some mailing list input here, what is the proper way to close a mysql query using PHP. - What is the proper way to close a php query to mysql if one query is in the file? - What is the proper way to close a php query to mysql if 2 or more queries is in the file and where do you close it off? So if I use ? code here ? or ?php code here ? is that a safe way to do it and does this close the mysql session off or does it timeout after a set period of time? Or is a better way mysql_close()? Or do both work the same? Thanks! J
Re: [PHP-DB] Proper procedure to close mysql queries!
Hi Chris, Thanks for that, always wondered. So what does just using '?' do than? Must close eventually but I am guessing by using that as a close the connection times out after a set period of time and the 'pid' is killed, correct? J ---chris said--- mysql_close closes a database connection. What do you mean by a php query to mysql ? If you want to free memory from a mysql query result, mysql_free_result does that. -- Postgresql php tutorials http://www.designmagick.com/
Re: [PHP-DB] Plain-text or HTML?
I have created several successful HTML and text based emails.. Its a secret called multipart MIME.The essence of email really. Just as an attachment is embedded into the same file as the images, html part and textual part. All you have to do is using 2 seperate boundaries, write out a textual [no HTML formatting, etc, use correct newlines etc] version out and then using same content write it into a HTML template version that can include formatting etc..Ensure all images used are also encoded and added as multipart MIME segments.All this can be generally easily done via some email clients themselves. For example Microsoft's Outlook Express does multipart HTML/Text emails.If you just go and create a new email in Outlook and type out your content in HTML format [ensure you've selected Format-Rich Text HTML]Then save it and grab the message source, you will clearly see the boundaries it has defined for the alternative MIME part [the text/html] and the text/plain part. Simply reformat the text/plain part a bit if you want. Voila.. in most cases thats ready to rumble .. use it as an example of how to work it into your own email generation functions in php. Works a charm for me ;-) Good luck, let me know how you go! --- Hi, Thanks for that, now I understand how it works. Seen the code, now I will play with it a bit. Did a few tests and found on some cases the following: 1- Yahoo! Mail is tricky to have HTML emails for, some emails, unless carefully designed, come out dodgy in formation when you view the email in Yahoo! Mail Web Format. 2- Hotmail seems to like HTML and has a better understanding of how to manage the emails in their Mail Live! Program 3- Outlook loves HTML and uses it cutely 4- Another web based email at www.tasmail.com formats funny and opens the html email in an attachment, does not always display good. 5- www.rock.com webmail dislikes HTML even though they claim HTML emails are supported. So the end result is some like some don't, some like to a degree and some don't. There does not seem to be a good solution even with formatting in HTML format. I'm just wondering how companies like Yahoo! and Hotmail send theirs out, tried viewing their source but sometimes their tricky. And being an owner of the servers they have more power over how emails are sent and displayed. Sure they have a source email but they can shade out reply, add more code somewhere hidden etc away from the source area. But their emails seem to come out fine, even when you redirect the emails to a email that does not like HTML a real lot they seem to display as they should. I know of a few programs on the net for plain-text to html emails, but the free ones are not a good solution, not sure of the paid ones. J
[PHP-DB] Cut down threads please!
Hi, This is a Discussion Board, previous threads/posts are logged, recorded, saved to the WWW. I see no point to continue threads over and over and over again. Why not cut the threads down to a few lines that are important to the reply your making? If people need to know more about it there is a free website they can visit and look at it. It's quite annoying to follow a thread and find each time the thread is continued over and over in 5 lots of emails from the same person. Makes going through the list alot slower. I am not going to mention the one recently but most would be aware, the thread was continued, and still is, over about 10 replies, in all none has been removed from any reply. We're talking about 300 lines.. That's just stupid, CUT THEM DOWN PLEASE! Save everyone the hassle, I know of a few others a bit concerned on this also. Just thought I'd express my opinions. There is enough SPAM on the web already without things being repeated over and over again, yes maybe I am here but I am making a valid point. With that said, let's continue. No corrospondence entered into. J
RE: [PHP-DB] Passwords
snip Sure, mysql.com and seasrch for crypt. Not sure why this is asked on a PHP list since it has nothing to do with PHP. b) every language has a crypt functionThen I guess it's okay to have crypt questions/answers on every language list. /snip quote Then I guess it's okay to have crypt questions/answers on every language list. /quote Only if your crypt question relates to this board, PHP and DB. So no not any crypt question can be answered here. And being a smart ass won't buy you any favours either, or respect or anything. J
[PHP-DB] Plain-text or HTML?
Hello all, People on this list, is your email client plain-text or HTML supported? I think most email clients come with HTML support, but over the time I have done HTML emails they flop out and not display correctly. Is there a reason for this? Is there a way to send out HTML emails from a PHP script to email clients that will display correctly? Problem I tend to have is at times I write the HTML, test it on a webpage. Send it to my email clients shows well but on others like Yahoo! etc it shows crap. Than at times Yahoo! shows fine and other clients crap! Is there tag/codes needed to sort it out? Or is it just a tricky thing? Yahoo!, Hotmail is HTML based WWW clients so I guess you need to get your tables spot on that matches theirs to align correctly? Just need input on this! Thanks! J
[PHP-DB] Plain-text or HTML?
Hello all, People on this list, is your email client plain-text or HTML supported? I think most email clients come with HTML support, but over the time I have done HTML emails they flop out and not display correctly. Is there a reason for this? Is there a way to send out HTML emails from a PHP script to email clients that will display correctly? Problem I tend to have is at times I write the HTML, test it on a webpage. Send it to my email clients shows well but on others like Yahoo! etc it shows crap. Than at times Yahoo! shows fine and other clients crap! Is there tag/codes needed to sort it out? Or is it just a tricky thing? Yahoo!, Hotmail is HTML based WWW clients so I guess you need to get your tables spot on that matches theirs to align correctly? Just need input on this! Thanks! J
[PHP-DB] RE: Adding time in php
Hi, All you need to do is run a query to your db to get the times. than use something like this: ?php // Multiplying with varaibles $factorA = .01; $factorB = number_format(system_value('usercount'), 0); $product = $factorA * $factorB + .25; echo $product; ? What this one does is count a total number of user on the website, than use factorA and multiplies that with factorB + a certain value. But this won't bring it in-line to what you want, but you could run some code to work it out. (just divide by .60?) J Hi AllI have two tables with columns of times that it took to perform tasks eg: 8:406:508:30 10:55 - 34:55 total time taken to complete the tasks in hours and minutesI am able to add the times with sql however I need to add the totals to cone up with a grand total and because of the makeup of the tables I cant use sql. I am there for going to have to use php code and this is where the problem comes in because in sql there is SEC_TO_TIME and TIME_TO_SEC functions that allow easy addition of the times but I cant find an equivalent in php. Does any one know of a way that I can add to times together in php.
[PHP-DB] re: slow page loading
snip from ping times: (localhost while ssh'd into the server and ping localhost) 64 bytes from localhost (127.0.0.1): icmp_seq=0 ttl=64 time=0.030 ms 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.024 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.023 ms 64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.022 ms 64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.023 ms/snip Looks normal! snip (arping from my internal network to the server in the DMZ by IP address) Unicast reply from 10.XX.XX.XX [00:0A:F4:F9:C3:00] 8.874ms Unicast reply from 10.XX.XX.XX [00:0A:F4:F9:C3:00] 1.134ms Unicast reply from 10.XX.XX.XX [00:0A:F4:F9:C3:00] 1.135ms Unicast reply from 10.XX.XX.XX [00:0A:F4:F9:C3:00] 1.131ms Unicast reply from 10.XX.XX.XX [00:0A:F4:F9:C3:00] 1.022ms Unicast reply from 10.XX.XX.XX [00:0A:F4:F9:C3:00] 1.057ms Unicast reply from 10.XX.XX.XX [00:0A:F4:F9:C3:00] 1.133ms Unicast reply from 10.XX.XX.XX [00:0A:F4:F9:C3:00] 1.142ms /snip hmmm... Interesting results! snip (arping from my internal network to the server in the DMZ by name) Unicast reply from 10.XX.XX.XX [00:0A:F4:F9:C3:00] 1.404ms Unicast reply from 10.XX.XX.XX [00:0A:F4:F9:C3:00] 1.141ms Unicast reply from 10.XX.XX.XX [00:0A:F4:F9:C3:00] 1.155ms Unicast reply from 10.XX.XX.XX [00:0A:F4:F9:C3:00] 1.137ms Unicast reply from 10.XX.XX.XX [00:0A:F4:F9:C3:00] 1.150ms Unicast reply from 10.XX.XX.XX [00:0A:F4:F9:C3:00] 1.139ms Unicast reply from 10.XX.XX.XX [00:0A:F4:F9:C3:00] 1.137ms Unicast reply from 10.XX.XX.XX [00:0A:F4:F9:C3:00] 1.147ms /snip Considerbly slow. snop (ping from outside network on windows pc in cli) Reply from 65.5.48.10: bytes=32 time=14ms TTL=62 Reply from 65.5.48.10: bytes=32 time=9ms TTL=62 Reply from 65.5.48.10: bytes=32 time=11ms TTL=62 Reply from 65.5.48.10: bytes=32 time=7ms TTL=62 /snip Okay, just FYI I pinged this IP, I got INSTANT responses. I'll try again, And again had no problems. Are you have any problems loading other pages fast on WINDOWS? The domain is www.fpunet.com - the httpd.conf file lists the index.php as the first index type and also it is defined that way in the virtual server portion of the config. I have the phpinfo page set as the default index right now. I noticed that Virtual Directory Support is disabled. Could this be the source of my problem? Doug I loaded your domain and got a instant reply and loaded the website promply. Some people fall in the trap and think if hhtpd.conf is right than nothing to worry about. Which is WRONG! httpd.conf is not the ONLY file loaded within a server load. I can go in and hack the hell out of it, and override the index.php config in another file! .htaccess was not made for a waste of space. Create a .htaccess file, if not already done, point the server to read *.php, *.phps, *.cgi etc... But that is not your issue. I think your issue lies with your ISP to be honest. Loading times vary, why not grab your IP and go to a website that checks how many hops before it hits your website, try a few websites. There is many downloads available on this. Did you know one hop down could cause slow loading times or even a page not loading at all? Again ISP issue. Jerry
[PHP-DB] re: (lost subject line)
Hi, Do this... 1) ping your local server. (paste us the results) 2) ping your IP address FOR THE SERVER (paste us the results) 3) If your server has a domain attached also ping this (paste us the results) Pointless? No... If you ping your local server with the localhost ip or command everything should return virtually instantley. If not, hello? Your more likely got a HARDWARE issue. But if it's returned instantley we can just about rule out a hardware problem. But could be a settings issue. Ping your IP address, not localhost. Now if this is slow your net connection maybe to blame, even your web host maybe denying you full access and halting loadings times. What is your net up/down speeds? ping the domain, make sure the domain is reading to the server promply. Using a browser is not always a good area to test loading time. As depending on other programs etc it could vary quite hugly. Ping over 50 times than average the amounts out. Some will be instant and some may take 3 seconds, average them out though to get a better idea of time frame. Now as for PHP versus HTML, HTML will generally load faster than any PHP code but there should be only a small amount of time difference between the two, depending on code legnth and what actions are to be made. I suggest you completely delete your PHP code, ..start again. Something basic like .. ? php // the all famous php start code echo HellobrWelcome to www.domain.com; ? Or something to that degree. Not thinking atm. Or whip this in, for some infomration detail... ? php phpinfo(); ? Feel free to post your temp. ip address or domain here or to me and I will be happy to test for you. There is codes you can have that you put in some PHP and it details the time the page took to load. You may need to include some variable handles in .htaccess also. Because on a default installation I think the default FIRST look file is .htm file rather than .php file. So maybe it's looping to find it? Damn it could be a million things, the more detail you list the better. I suggest you run phpinfo() and show us the details that is outputted or create a page and give us a url. :) We can always test speed and get back to you. It might NOT be anything to worry about, it might sort itself out. :) If your using the server for other things at the same time this may slow down things too. J Micah Stevens wrote:Not enough information there to make any sort of diagnosis, but here are some things to try to narrow down the problem: 1) ssh into the server, and run 'top' to watch the process list. Then while watching that, hit reload in the browser to see if the HTTP process pegs out while you're waiting for the page. If it does, for some reason apache/php is struggling. Otherwise it's likely something else. 2) run 'ngrep' on port 80 of the incoming network interface (eth0, or whatever it's hooked to), and reload the page again. Are you immediatly seeing the request come though or does it take a while? This type of thing could be caused not by the webserver, but instead by a badly configured router, or something in the network. If it takes a while to come through, you need to look at your network configuration. 3) Is this a DNS issue? If you're accessing via a domain name, and not a direct IP type URL, a shoddy DNS connection could make things really take a long time. 3a) If so, is hostname lookup turned on for apache logging? This may result in yet another query to the DNS. I'm not sure however whether that lookup might delay delivery of the document, or whether the document is served independently og logging actions; I would guess the latter. Cheers -- David RobleyI'm never anywhere on time, Tom related.
[PHP-DB] Re: slow loading page
Hi, Do this... 1) ping your local server. (paste us the results) 2) ping your IP address FOR THE SERVER (paste us the results) 3) If your server has a domain attached also ping this (paste us the results) Pointless? No... If you ping your local server with the localhost ip or command everything should return virtually instantley. If not, hello? Your more likely got a HARDWARE issue. But if it's returned instantley we can just about rule out a hardware problem. But could be a settings issue. Ping your IP address, not localhost. Now if this is slow your net connection maybe to blame, even your web host maybe denying you full access and halting loadings times. What is your net up/down speeds? ping the domain, make sure the domain is reading to the server promply. Using a browser is not always a good area to test loading time. As depending on other programs etc it could vary quite hugly. Ping over 50 times than average the amounts out. Some will be instant and some may take 3 seconds, average them out though to get a better idea of time frame. Now as for PHP versus HTML, HTML will generally load faster than any PHP code but there should be only a small amount of time difference between the two, depending on code legnth and what actions are to be made. I suggest you completely delete your PHP code, ..start again. Something basic like .. ? php // the all famous php start code echo HellobrWelcome to www.domain.com; ? Or something to that degree. Not thinking atm. Or whip this in, for some infomration detail... ? php phpinfo(); ? Feel free to post your temp. ip address or domain here or to me and I will be happy to test for you. There is codes you can have that you put in some PHP and it details the time the page took to load. You may need to include some variable handles in .htaccess also. Because on a default installation I think the default FIRST look file is .htm file rather than .php file. So maybe it's looping to find it? Damn it could be a million things, the more detail you list the better. I suggest you run phpinfo() and show us the details that is outputted or create a page and give us a url. :) We can always test speed and get back to you. It might NOT be anything to worry about, it might sort itself out. :) If your using the server for other things at the same time this may slow down things too. J Micah Stevens wrote:Not enough information there to make any sort of diagnosis, but here are some things to try to narrow down the problem: 1) ssh into the server, and run 'top' to watch the process list. Then while watching that, hit reload in the browser to see if the HTTP process pegs out while you're waiting for the page. If it does, for some reason apache/php is struggling. Otherwise it's likely something else. 2) run 'ngrep' on port 80 of the incoming network interface (eth0, or whatever it's hooked to), and reload the page again. Are you immediatly seeing the request come though or does it take a while? This type of thing could be caused not by the webserver, but instead by a badly configured router, or something in the network. If it takes a while to come through, you need to look at your network configuration. 3) Is this a DNS issue? If you're accessing via a domain name, and not a direct IP type URL, a shoddy DNS connection could make things really take a long time. 3a) If so, is hostname lookup turned on for apache logging? This may result in yet another query to the DNS. I'm not sure however whether that lookup might delay delivery of the document, or whether the document is served independently og logging actions; I would guess the latter. Cheers -- David RobleyI'm never anywhere on time, Tom related.
[PHP-DB] RE: data picker
Use getElementById using javascript. From: r0md0n1 [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] data picker Date: Mon, 13 Feb 2006 17:00:11 +0700 hi all I'm trying to create a smalll application to pick data from pop-up window into a form (like when inserting email address @ yahoo-mail or date-picker :) here's some ilustration : when i click a hyperlink then comes pop-up window to browse data's, after found desired data i want to pick the data-id into the form (textbox, etc..)... anyone give me a clue pls.. rgds, d3n. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] php/sendmail help!
Thanks but I recieved this exact email the other day also. Maybe servers playing up ;) J [EMAIL PROTECTED] wrote: You are in serious need of some regex here...google email regex and you will have enough results to get you what you want. Postal Code (assume 2 letters 4 dgits in that order if (ereg(^[A-Z]{2}{0-9]{4}$,$_POST['postal'])){ ... As for pasting it back to the form, I would suggest you have the form as a function and the processing code as a function, then you can pass the post arrays back and forth and pass the error handling along with it Bastien From: JeRRy To: php-db@lists.php.net Subject: [PHP-DB] php/sendmail help! Date: Tue, 7 Feb 2006 13:22:53 +1100 (EST) Hi, I have a form, form results are PUSHED to another page and processed. Files below. (in plain-tet) Now this is what I want to do: 1) Make all fields required input, but if easy to configure I want to have rules for each textarea. For instance an email address must contain a '@' symbol. Must be at leat 5 character longs and must be in a form of an email address. So if I type [EMAIL PROTECTED] it would produce an error, highlighting the error area or display a message at the top of the page. Postcode should contain 4 numbers and numbers only, etc. The only field that can be left blank will be the message area. How do I achieve this? (message regarding this below) 2) I want to add to the form a UNIQUE ID generater. I will add a new hidden form field for this. I need a script called by PHP to generate it. Would include both letters and numbers and be atleast 8 CHARS long. As for 1) I have tried some javascript but it failed, since I PUSH all field responses to another page. When i add it the submit button fails and does not push the results through. But it produces the error fine, but form is not PUSHED on. So it seems it's lost because of the javascript. So i took it out completely. I think there is a way in PHP to call errors for forms? But anways, here are the files below. Please help, I am on a tight schedule here if anyone can assist me. file one looks like this: (form.php) Pre Order Form! BORDER=0 First Name: [input] MAXLENGTH=20 Last Name: [input] MAXLENGTH=25 Company: [input] MAXLENGTH=25 Unit/House #: [input] MAXLENGTH=6 Street Name: [input] MAXLENGTH=25 Suburb/Town: [input] MAXLENGTH=25 Post Code/Zip: [input] MAXLENGTH=25 Phone #: [input] MAXLENGTH=25 Email Address: [input] MAXLENGTH=25 Country: SIZE=1AUSTRALIANEW ZEALANDFIJIUNITED KINGDOMGERMANYSWEDENCANADA-AFGHANISTANALBANIAALGERIAAMERICAN SAMOAANDORRAANGOLAANGUILLAANTARCTICAANTIGUA AND BARBUDAARGENTINAARMENIAARUBAAUSTRIAAZERBAIJANBAHAMASBAHRAINBANGLADESHBARBADOSBELARUSBELGIUMBELIZEBENINBERMUDABHUTANBOLIVIABOSNIA AND HERZEGOWINABOTSWANABOUVET ISLANDBRAZILBRITISH INDIAN OCEAN TERRITORYBRUNEI DARUSSALAMBULGARIABURKINA FASOBURUNDICAMBODIACAMEROONCANADACAPE VERDECAYMAN ISLANDSCENTRAL AFRICAN REPUBLICCHADCHILECHINACHRISTMAS ISLANDCOCOS (KEELING) ISLANDSCOLOMBIACOMOROSCONGOCOOK ISLANDSCOSTA RICACOTE D'IVOIRECROATIA (local name: Hrvatska)CUBACYPRUSCZECH REPUBLICDENMARKDJIBOUTIDOMINICADOMINICAN REPUBLICEAST TIMORECUADOREGYPTEL SALVADOREQUATORIAL GUINEAERITREAESTONIAETHIOPIAFALKLAND ISLANDS (MALVINAS)FAROE ISLANDSFIJIFINLANDFRANCEFRANCE, METROPOLITANFRENCH GUIANAFRENCH POLYNESIAFRENCH OTHERGABONGAMBIAGEORGIAGERMANYGHANAGIBRALTARGREECEGREENLANDGRENADAGUADELOUPEGUAMGUATEMALAGUINEAGUINEA-BISSAUGUYANAHAITIHEARD AND MC DONALD ISLANDSHONDURASHONG KONGHUNGARYICELANDINDIAINDONESIAIRAN (ISLAMIC REPUBLIC OF)IRAQIRELANDISRAELITALYJAMAICAJAPANJORDANKAZAKHSTANKENYAKIRIBATIKOREAKUWAITKYRGYZSTANLATVIALEBANONLESOTHOLIBERIALIBYAN ARAB JAMAHIRIYALIECHTENSTEINLITHUANIALOCATION NOT REPORTEDLUXEMBOURGMACAUMACEDONIAMADAGASCARMALAWIMALAYSIAMALDIVESMALIMALTAMARSHALL ISLANDSMARTINIQUEMAURITANIAMAURITIUSMAYOTTEMEXICOMICRONESIAMOLDOVA, REPUBLIC OFMONACOMONGOLIAMONTSERRATMOROCCOMOZAMBIQUEMYANMARNAMIBIANAURUNEPALNETHERLANDSNETHERLANDS ANTILLESNEW CALEDONIANEW ZEALANDNICARAGUANIGERNIGERIANIUENORFOLK ISLANDNORTHERN MARIANA ISLANDSNORWAYNot AvailableOMANPAKISTANPALAUPANAMAPAPUA NEW GUINEAPARAGUAYPERUPHILIPPINESPITCAIRNPOLANDPORTUGALPUERTO RICOQATARREUNIONROMANIARUSSIAN FEDERATIONRWANDASAINT KITTS AND NEVISSAINT LUCIASAINT VINCENTSAMOASAN MARINOSAO TOME AND PRINCIPESAUDI ARABIASENEGALSEYCHELLESSIERRA LEONESINGAPORESLOVAKIA (Slovak Republic)SLOVENIASOLOMON ISLANDSSOMALIASOUTH AFRICASOUTH GEORGIA SPAINSRI LANKAST. HELENAST. PIERRE AND MIQUELONSUDANSURINAMESWAZILANDSWEDENSWITZERLANDSYRIAN ARAB REPUBLICTAIWAN, PROVINCE OF CHINATAJIKISTANTANZANIA, UNITED REPUBLIC OFTHAILANDTOGOTOKELAUTONGATRINIDAD AND TOBAGOTUNISIATURKEYTURKMENISTANTURKS AND CAICOS ISLANDSTUVALUUGANDAUKRAINEUNITED ARAB EMIRATESUNITED KINGDOMUNITED STATESUNITED STATES MINORUNKNOWN LOCATIONURUGUAYUZBEKISTANVANUATUVATICAN
[PHP-DB] css
Hi everyone, I have created this website in PHP and mySQL at http://www.bps-testntag.com/ but have come accross an error I was not aware of before. Now I am using stylesheets and I have been surfing the net for about 90 minutes and yet to find a solution, so thought I'd post here, could be basic but i can't find it online anywhere. Get alot of forum refrences but no solution. Here is the code below before I continue: style type=text/css html { background : url(images/background3.jpg); } body { margin : 0; padding : 0 1px; border : 0; height : 100px; background : url(images/background3.jpg); } body { font-family : arial, serif; font-size : 16px; } #page { margin : 310px 0 50px 250px; display : block; width : 500px; border : 1 solid #000; background : url(images/background3.jpg); padding : 10px; } #page .right { font-size : 30px; float : right; } #menu { display : block; top : 110px; left : 20px; width : 130px; position : fixed; border : 0; padding : 10px; text-align : center; font-weight : bold; color : #fff; } * html #menu { position : absolute; } #menu a:visited, #menu a { display : block; width : 120px; height : 20px; margin : 0 auto; border-top : 0 solid #fff; border-bottom : 0 solid #000; text-align : center; text-decoration : none; line-height : 20px; color : #000; } #menu a:hover { background : #aaa; color : #fff; } .clear { clear : both; } p:first-letter { font-size : 25px; color : #cc; } #fixpic { display : block; width : 108px; height : 145px; position : fixed; bottom : 0; left : 0; } * html #fixpic { position : absolute; } #adsie { position : absolute; top : 10px; right : 30px; } /style Now I have been told NOT to use px but use % for meassurements because this is relient on resolution/screen_size. HOWEVER what does 1px equal in %? Some have said 30px equals 3% and some say 30px equals 30%. 30px and 30% don't seem right, I changed my CSS for this and it pushes everything only slightly to the RIGHT. But removes the menu altogether. Can anyone offer some help here? Also if a table is made like this: table width=300 height=400 Is that default % or px or what? What is the best method to use that will work in people using screens of 600* and 1024* and both be able to view the site cleanly and easily? I will continue to surf. J
[PHP-DB] css #2
Okay I did some more surfing, on a VERY popular website used by neally a million users. I checked their CSS and they use px and pt meassurements. So maybe that is not my issue than. Maybe I don't have an issue to worry about? What are people's thoughts on this, all the input the better here as I am creating a website that will be viewed by alot of people so want it readable by the majority. I know screen res of 600* is very old and few would use it, the site appears pretty big with it but things appears just about where it should. However when you try and view the copyright notice it cuts the last line out, what causes this? Would It be useful to add to breaks at the end? J Hi everyone, I have created this website in PHP and mySQL at http://www.bps-testntag.com/ but have come accross an error I was not aware of before. Now I am using stylesheets and I have been surfing the net for about 90 minutes and yet to find a solution, so thought I'd post here, could be basic but i can't find it online anywhere. Get alot of forum refrences but no solution. Here is the code below before I continue: style type=text/css html { background : url(images/background3.jpg); } body { margin : 0; padding : 0 1px; border : 0; height : 100px; background : url(images/background3.jpg); } body { font-family : arial, serif; font-size : 16px; } #page { margin : 310px 0 50px 250px; display : block; width : 500px; border : 1 solid #000; background : url(images/background3.jpg); padding : 10px; } #page .right { font-size : 30px; float : right; } #menu { display : block; top : 110px; left : 20px; width : 130px; position : fixed; border : 0; padding : 10px; text-align : center; font-weight : bold; color : #fff; } * html #menu { position : absolute; } #menu a:visited, #menu a { display : block; width : 120px; height : 20px; margin : 0 auto; border-top : 0 solid #fff; border-bottom : 0 solid #000; text-align : center; text-decoration : none; line-height : 20px; color : #000; } #menu a:hover { background : #aaa; color : #fff; } .clear { clear : both; } p:first-letter { font-size : 25px; color : #cc; } #fixpic { display : block; width : 108px; height : 145px; position : fixed; bottom : 0; left : 0; } * html #fixpic { position : absolute; } #adsie { position : absolute; top : 10px; right : 30px; } /style Now I have been told NOT to use px but use % for meassurements because this is relient on resolution/screen_size. HOWEVER what does 1px equal in %? Some have said 30px equals 3% and some say 30px equals 30%. 30px and 30% don't seem right, I changed my CSS for this and it pushes everything only slightly to the RIGHT. But removes the menu altogether. Can anyone offer some help here? Also if a table is made like this: table width=300 height=400 Is that default % or px or what? What is the best method to use that will work in people using screens of 600* and 1024* and both be able to view the site cleanly and easily? I will continue to surf. J
Re: [PHP-DB] css #2
Hi, Honesty, no I have not ever heard of floats ... Well I have as in horse-floats but not for web-pages, I will search it up very soon. Thanks! Jerry Adrian Bruce [EMAIL PROTECTED] wrote: Jerry Not a php related question at all for starters but anywayi think you need to read up on CSS layout's if the site is properly structure using CSS then you will not have much to worry about regarding different resolutions. Ever heard of floats? google will show you the light! Ade JeRRy wrote: Okay I did some more surfing, on a VERY popular website used by neally a million users. I checked their CSS and they use px and pt meassurements. So maybe that is not my issue than. Maybe I don't have an issue to worry about? What are people's thoughts on this, all the input the better here as I am creating a website that will be viewed by alot of people so want it readable by the majority. I know screen res of 600* is very old and few would use it, the site appears pretty big with it but things appears just about where it should. However when you try and view the copyright notice it cuts the last line out, what causes this? Would It be useful to add to breaks at the end? J Hi everyone, I have created this website in PHP and mySQL at http://www.bps-testntag.com/ but have come accross an error I was not aware of before. Now I am using stylesheets and I have been surfing the net for about 90 minutes and yet to find a solution, so thought I'd post here, could be basic but i can't find it online anywhere. Get alot of forum refrences but no solution. Here is the code below before I continue: html { background : url(images/background3.jpg); } body { margin : 0; padding : 0 1px; border : 0; height : 100px; background : url(images/background3.jpg); } body { font-family : arial, serif; font-size : 16px; } #page { margin : 310px 0 50px 250px; display : block; width : 500px; border : 1 solid #000; background : url(images/background3.jpg); padding : 10px; } #page .right { font-size : 30px; float : right; } #menu { display : block; top : 110px; left : 20px; width : 130px; position : fixed; border : 0; padding : 10px; text-align : center; font-weight : bold; color : #fff; } * html #menu { position : absolute; } #menu a:visited, #menu a { display : block; width : 120px; height : 20px; margin : 0 auto; border-top : 0 solid #fff; border-bottom : 0 solid #000; text-align : center; text-decoration : none; line-height : 20px; color : #000; } #menu a:hover { background : #aaa; color : #fff; } .clear { clear : both; } p:first-letter { font-size : 25px; color : #cc; } #fixpic { display : block; width : 108px; height : 145px; position : fixed; bottom : 0; left : 0; } * html #fixpic { position : absolute; } #adsie { position : absolute; top : 10px; right : 30px; } Now I have been told NOT to use px but use % for meassurements because this is relient on resolution/screen_size. HOWEVER what does 1px equal in %? Some have said 30px equals 3% and some say 30px equals 30%. 30px and 30% don't seem right, I changed my CSS for this and it pushes everything only slightly to the RIGHT. But removes the menu altogether. Can anyone offer some help here? Also if a table is made like this: Is that default % or px or what? What is the best method to use that will work in people using screens of 600* and 1024* and both be able to view the site cleanly and easily? I will continue to surf. J
[PHP-DB] generating random id's
Just to let you all know I used PHP's unique ID generator to generate a unique id for tracking purposes. I than md5 it hide the format a bit, would this be enough? Or can be easily worked out also? Need it pretty tight and keeping the likelyhood down of having multiple listings of id's. It's using 32 chars. Jerry
RE: [PHP-DB] php/sendmail help!
Thanks for your help Bastien. I have it all working now, no problems. I also have generated a Unique ID for the form also. Jerry Bastien Koert [EMAIL PROTECTED] wrote: You are in serious need of some regex here...google email regex and you will have enough results to get you what you want. Postal Code (assume 2 letters 4 dgits in that order if (ereg(^[A-Z]{2}{0-9]{4}$,$_POST['postal'])){ ... As for pasting it back to the form, I would suggest you have the form as a function and the processing code as a function, then you can pass the post arrays back and forth and pass the error handling along with it Bastien From: JeRRy To: php-db@lists.php.net Subject: [PHP-DB] php/sendmail help! Date: Tue, 7 Feb 2006 13:22:53 +1100 (EST) Hi, I have a form, form results are PUSHED to another page and processed. Files below. (in plain-tet) Now this is what I want to do: 1) Make all fields required input, but if easy to configure I want to have rules for each textarea. For instance an email address must contain a '@' symbol. Must be at leat 5 character longs and must be in a form of an email address. So if I type [EMAIL PROTECTED] it would produce an error, highlighting the error area or display a message at the top of the page. Postcode should contain 4 numbers and numbers only, etc. The only field that can be left blank will be the message area. How do I achieve this? (message regarding this below) 2) I want to add to the form a UNIQUE ID generater. I will add a new hidden form field for this. I need a script called by PHP to generate it. Would include both letters and numbers and be atleast 8 CHARS long. As for 1) I have tried some javascript but it failed, since I PUSH all field responses to another page. When i add it the submit button fails and does not push the results through. But it produces the error fine, but form is not PUSHED on. So it seems it's lost because of the javascript. So i took it out completely. I think there is a way in PHP to call errors for forms? But anways, here are the files below. Please help, I am on a tight schedule here if anyone can assist me. file one looks like this: (form.php) Pre Order Form! BORDER=0 First Name: [input] MAXLENGTH=20 Last Name: [input] MAXLENGTH=25 Company: [input] MAXLENGTH=25 Unit/House #: [input] MAXLENGTH=6 Street Name: [input] MAXLENGTH=25 Suburb/Town: [input] MAXLENGTH=25 Post Code/Zip: [input] MAXLENGTH=25 Phone #: [input] MAXLENGTH=25 Email Address: [input] MAXLENGTH=25 Country: SIZE=1AUSTRALIANEW ZEALANDFIJIUNITED KINGDOMGERMANYSWEDENCANADA-AFGHANISTANALBANIAALGERIAAMERICAN SAMOAANDORRAANGOLAANGUILLAANTARCTICAANTIGUA AND BARBUDAARGENTINAARMENIAARUBAAUSTRIAAZERBAIJANBAHAMASBAHRAINBANGLADESHBARBADOSBELARUSBELGIUMBELIZEBENINBERMUDABHUTANBOLIVIABOSNIA AND HERZEGOWINABOTSWANABOUVET ISLANDBRAZILBRITISH INDIAN OCEAN TERRITORYBRUNEI DARUSSALAMBULGARIABURKINA FASOBURUNDICAMBODIACAMEROONCANADACAPE VERDECAYMAN ISLANDSCENTRAL AFRICAN REPUBLICCHADCHILECHINACHRISTMAS ISLANDCOCOS (KEELING) ISLANDSCOLOMBIACOMOROSCONGOCOOK ISLANDSCOSTA RICACOTE D'IVOIRECROATIA (local name: Hrvatska)CUBACYPRUSCZECH REPUBLICDENMARKDJIBOUTIDOMINICADOMINICAN REPUBLICEAST TIMORECUADOREGYPTEL SALVADOREQUATORIAL GUINEAERITREAESTONIAETHIOPIAFALKLAND ISLANDS (MALVINAS)FAROE ISLANDSFIJIFINLANDFRANCEFRANCE, METROPOLITANFRENCH GUIANAFRENCH POLYNESIAFRENCH OTHERGABONGAMBIAGEORGIAGERMANYGHANAGIBRALTARGREECEGREENLANDGRENADAGUADELOUPEGUAMGUATEMALAGUINEAGUINEA-BISSAUGUYANAHAITIHEARD AND MC DONALD ISLANDSHONDURASHONG KONGHUNGARYICELANDINDIAINDONESIAIRAN (ISLAMIC REPUBLIC OF)IRAQIRELANDISRAELITALYJAMAICAJAPANJORDANKAZAKHSTANKENYAKIRIBATIKOREAKUWAITKYRGYZSTANLATVIALEBANONLESOTHOLIBERIALIBYAN ARAB JAMAHIRIYALIECHTENSTEINLITHUANIALOCATION NOT REPORTEDLUXEMBOURGMACAUMACEDONIAMADAGASCARMALAWIMALAYSIAMALDIVESMALIMALTAMARSHALL ISLANDSMARTINIQUEMAURITANIAMAURITIUSMAYOTTEMEXICOMICRONESIAMOLDOVA, REPUBLIC OFMONACOMONGOLIAMONTSERRATMOROCCOMOZAMBIQUEMYANMARNAMIBIANAURUNEPALNETHERLANDSNETHERLANDS ANTILLESNEW CALEDONIANEW ZEALANDNICARAGUANIGERNIGERIANIUENORFOLK ISLANDNORTHERN MARIANA ISLANDSNORWAYNot AvailableOMANPAKISTANPALAUPANAMAPAPUA NEW GUINEAPARAGUAYPERUPHILIPPINESPITCAIRNPOLANDPORTUGALPUERTO RICOQATARREUNIONROMANIARUSSIAN FEDERATIONRWANDASAINT KITTS AND NEVISSAINT LUCIASAINT VINCENTSAMOASAN MARINOSAO TOME AND PRINCIPESAUDI ARABIASENEGALSEYCHELLESSIERRA LEONESINGAPORESLOVAKIA (Slovak Republic)SLOVENIASOLOMON ISLANDSSOMALIASOUTH AFRICASOUTH GEORGIA SPAINSRI LANKAST. HELENAST. PIERRE AND MIQUELONSUDANSURINAMESWAZILANDSWEDENSWITZERLANDSYRIAN ARAB REPUBLICTAIWAN, PROVINCE OF CHINATAJIKISTANTANZANIA, UNITED REPUBLIC OFTHAILANDTOGOTOKELAUTONGATRINIDAD AND TOBAGOTUNISIATURKEYTURKMENISTANTURKS AND CAICOS ISLANDSTUVALUUGANDAUKRAINEUNITED ARAB EMIRATESUNITED KINGDOMUNITED STATESUNITED STATES
Re: [PHP-DB] screen resolution!
Yes I know this but there is no script that can re-write webpages on the fly for certain resolutions? Instead of re-doing each page for each res.? With the technology these days I thought someone would of created something like this, so you create a website than you put it through a program that re-does the HTML for the resolutions you set and bingo the results are spat out and you add it to the site and use a little script to redirect depending on their set resolution. Jerry PHP Superman [EMAIL PROTECTED] wrote: Or you can have a page which detects resolution by javascript and redirects to another PHP page with the resolution data On 2/4/06, Bastien Koert [EMAIL PROTECTED] wrote: As the other poster mentioned you need JS to detect the screen widththe usual approach is to use js to detect the screen res and the include the appropriate CSS file to match the screen res. Bastien From: JeRRy [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] screen resolution! Date: Sun, 5 Feb 2006 02:44:19 +1100 (EST) Hi, I have written a website in PHP using MYSQL. But I have come accross an un-common problem. Normally when I create a website it's done on a desktop PC. But this time for the first time I did it on laptop meaning the screen resolution is different. Is there any sort of script/code I can use to create another section of my site in a desired screen resolution without me having to do it all manually? I know of many scripts online that I can DETERMINE visitors screen resolutions and recommend the correct one but don't know one that will adjust the website to suit that visitors screen resolution. Am aware of scripts that redirect to another web page but that requires you to write the website again to cater for that. Is there a quicker way/solution? Thanks! J -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Hi Everyone, I am running PHP 5 on Windosws XP SP2 with MySQL5, Bye Now!
[PHP-DB] php/sendmail help!
Hi, I have a form, form results are PUSHED to another page and processed. Files below. (in plain-tet) Now this is what I want to do: 1) Make all fields required input, but if easy to configure I want to have rules for each textarea. For instance an email address must contain a '@' symbol. Must be at leat 5 character longs and must be in a form of an email address. So if I type [EMAIL PROTECTED] it would produce an error, highlighting the error area or display a message at the top of the page. Postcode should contain 4 numbers and numbers only, etc. The only field that can be left blank will be the message area. How do I achieve this? (message regarding this below) 2) I want to add to the form a UNIQUE ID generater. I will add a new hidden form field for this. I need a script called by PHP to generate it. Would include both letters and numbers and be atleast 8 CHARS long. As for 1) I have tried some javascript but it failed, since I PUSH all field responses to another page. When i add it the submit button fails and does not push the results through. But it produces the error fine, but form is not PUSHED on. So it seems it's lost because of the javascript. So i took it out completely. I think there is a way in PHP to call errors for forms? But anways, here are the files below. Please help, I am on a tight schedule here if anyone can assist me. file one looks like this: (form.php) ? include(header.php);? table width=800 border=0 tr td width=270 valign=top? include(menu.php);?/td td width=500 valign=center DIV ALIGN=JUSTIFY ? include(ads.php);? h1bPre Order Form!/h1/b TABLE WIDTH=90% ALIGN=left CELLSPACING=1 CELLPADDING=4 BORDER=0 FORM ACTION=contact1.php METHOD=POST font face=arial trtdFirst Name:/td tdINPUT TYPE=text NAME=firstname SIZE=25 MAXLENGTH=20/td/trBRBtrtd Last Name:/td/BtdINPUT TYPE=text NAME=lastname SIZE=25 MAXLENGTH=25/td/trBtrtd BtrtdCompany:/td/BtdINPUT TYPE=text NAME=company SIZE=25 MAXLENGTH=25/td/trBRBtrtd Unit/House #:/td/BtdINPUT TYPE=text NAME=address1 SIZE=25 MAXLENGTH=6/td/trBRBtrtd Street Name:/td/BtdINPUT TYPE=text NAME=address2 SIZE=25 MAXLENGTH=25/td/trBRBtrtd Suburb/Town:/td/BtdINPUT TYPE=text NAME=suburb SIZE=25 MAXLENGTH=25/td/trBRBtrtd Post Code/Zip:/td/BtdINPUT TYPE=text NAME=postcode SIZE=25 MAXLENGTH=25/td/trBRBtrtd Phone #:/td/BtdINPUT TYPE=text NAME=phone SIZE=25 MAXLENGTH=25/td/trBRBtrtd Email Address:/td/BtdINPUT TYPE=text NAME=emailaddress SIZE=25 MAXLENGTH=25/td/trBRBtrtd/td/Btd /td/trBRBtrtdCountry:/td/BtdSELECT NAME=country SIZE=1OPTION SELECTEDAUSTRALIAOPTIONNEW ZEALANDOPTIONFIJIOPTIONUNITED KINGDOMOPTIONGERMANYOPTIONSWEDENOPTIONCANADAOPTION-OPTIONAFGHANISTANOPTIONALBANIAOPTIONALGERIAOPTIONAMERICAN SAMOAOPTIONANDORRAOPTIONANGOLAOPTIONANGUILLAOPTIONANTARCTICAOPTIONANTIGUA AND BARBUDAOPTIONARGENTINAOPTIONARMENIAOPTIONARUBAOPTIONAUSTRIAOPTIONAZERBAIJANOPTIONBAHAMASOPTIONBAHRAINOPTIONBANGLADESHOPTIONBARBADOSOPTIONBELARUSOPTIONBELGIUMOPTIONBELIZEOPTIONBENINOPTIONBERMUDAOPTIONBHUTANOPTIONBOLIVIAOPTIONBOSNIA AND HERZEGOWINAOPTIONBOTSWANAOPTIONBOUVET ISLANDOPTIONBRAZILOPTIONBRITISH INDIAN OCEAN TERRITORYOPTIONBRUNEI DARUSSALAMOPTIONBULGARIAOPTIONBURKINA FASOOPTIONBURUNDIOPTIONCAMBODIAOPTIONCAMEROONOPTIONCANADAOPTIONCAPE VERDEOPTIONCAYMAN ISLANDSOPTIONCENTRAL AFRICAN REPUBLICOPTIONCHADOPTIONCHILEOPTIONCHINAOPTIONCHRISTMAS ISLANDOPTIONCOCOS (KEELING) ISLANDSOPTIONCOLOMBIAOPTIONCOMOROSOPTIONCONGOOPTIONCOOK ISLANDSOPTIONCOSTA RICAOPTIONCOTE D'IVOIREOPTIONCROATIA (local name: Hrvatska)OPTIONCUBAOPTIONCYPRUSOPTIONCZECH REPUBLICOPTIONDENMARKOPTIONDJIBOUTIOPTIONDOMINICAOPTIONDOMINICAN REPUBLICOPTIONEAST TIMOROPTIONECUADOROPTIONEGYPTOPTIONEL SALVADOROPTIONEQUATORIAL GUINEAOPTIONERITREAOPTIONESTONIAOPTIONETHIOPIAOPTIONFALKLAND ISLANDS (MALVINAS)OPTIONFAROE ISLANDSOPTIONFIJIOPTIONFINLANDOPTIONFRANCEOPTIONFRANCE, METROPOLITANOPTIONFRENCH GUIANAOPTIONFRENCH POLYNESIAOPTIONFRENCH OTHEROPTIONGABONOPTIONGAMBIAOPTIONGEORGIAOPTIONGERMANYOPTIONGHANAOPTIONGIBRALTAROPTIONGREECEOPTIONGREENLANDOPTIONGRENADAOPTIONGUADELOUPEOPTIONGUAMOPTIONGUATEMALAOPTIONGUINEAOPTIONGUINEA-BISSAUOPTIONGUYANAOPTIONHAITIOPTIONHEARD AND MC DONALD ISLANDSOPTIONHONDURASOPTIONHONG KONGOPTIONHUNGARYOPTIONICELANDOPTIONINDIAOPTIONINDONESIAOPTIONIRAN (ISLAMIC REPUBLIC OF)OPTIONIRAQOPTIONIRELANDOPTIONISRAELOPTIONITALYOPTIONJAMAICAOPTIONJAPANOPTIONJORDANOPTIONKAZAKHSTANOPTIONKENYAOPTIONKIRIBATIOPTIONKOREAOPTIONKUWAITOPTIONKYRGYZSTANOPTIONLATVIAOPTIONLEBANONOPTIONLESOTHOOPTIONLIBERIAOPTIONLIBYAN ARAB JAMAHIRIYAOPTIONLIECHTENSTEINOPTIONLITHUANIAOPTIONLOCATION NOT REPORTEDOPTIONLUXEMBOURGOPTIONMACAUOPTIONMACEDONIAOPTIONMADAGASCAROPTIONMALAWIOPTIONMALAYSIAOPTIONMALDIVESOPTIONMALIOPTIONMALTAOPTIONMARSHALL ISLANDSOPTIONMARTINIQUEOPTIONMAURITANIAOPTIONMAURITIUSOPTIONMAYOTTEOPTIONMEXICOOPTIONMICRONESIAOPTIONMOLDOVA, REPUBLIC
[PHP-DB] screen resolution!
Hi, I have written a website in PHP using MYSQL. But I have come accross an un-common problem. Normally when I create a website it's done on a desktop PC. But this time for the first time I did it on laptop meaning the screen resolution is different. Is there any sort of script/code I can use to create another section of my site in a desired screen resolution without me having to do it all manually? I know of many scripts online that I can DETERMINE visitors screen resolutions and recommend the correct one but don't know one that will adjust the website to suit that visitors screen resolution. Am aware of scripts that redirect to another web page but that requires you to write the website again to cater for that. Is there a quicker way/solution? Thanks! J
Re: [PHP-DB] Help need please?
Hi, Thanks for this, got a few reposnses regarding this. This seems a more professional approach, I will try this and let you know about it when I do it. Thanks for your time. Jerry Ross Honniball [EMAIL PROTECTED] wrote: Get rid of both your onload= statements and replace with... window.onload=doboth Then include the function below... function doboth() { changetext(); changead(); } Not sure what you were getting at regarding the thing, but I think the browser must just over-ride the previous onload statement when more than one is provided. I'm guessing the thing you were talking about accidently commented one out and activated the other. Hope this helps. Ross JeRRy wrote: Hi, I know this is not PHP/MySQl related but every other board I have posted on I have not got a response, so I'll try here also. I'm missing something basic, surely here so that is another reason I am posting here.. Here goes... I have two lots of code here, one is for a refreshing text code in Javascript and another is a banner refreshing ad system. Using similiar technequies. But I can only get the refreshing text to appear but can't get the ads to work on the one page. :( But if I add a in any text area of the text refreshing than the ads system works but the text refreshing don't. But if I remove the from any text area the text refreshing works but the ads don't. I can't seem to find the problem. Here is the code(s) ads code hexinput=255 // Initial color value. var inc=-1 //increment variable function fadingad(){ if(hexinput0) { hexinput-=11; // increase color value document.getElementById(fader1).style.color=rgb(+hexinput+,+hexinput+,+hexinput+); // Set color value. setTimeout(fadingad(),20); } else hexinput=255 //reset hex value } function changead(){ if (!document.getElementById) return inc++ if (inc==0) document.getElementById(fader1).innerHTML= else if (inc==1) document.getElementById(fader1).innerHTML= else if (inc==2) document.getElementById(fader1).innerHTML= else if (inc==3) document.getElementById(fader1).innerHTML= else if (inc==4) document.getElementById(fader1).innerHTML= else if (inc==5) document.getElementById(fader1).innerHTML= else if (inc==6) document.getElementById(fader1).innerHTML= else{ document.getElementById(fader1).innerHTML= inc=-1 } fadingad() setTimeout(changead(),4000) } window.onload=changead end ads code text refreshing hexinput=255 // Initial color value. var inc=-1 //increment variable function fadingtext(){ if(hexinput0) { hexinput-=11; // increase color value document.getElementById(fader).style.color=rgb(+hexinput+,+hexinput+,+hexinput+); // Set color value. setTimeout(fadingtext(),20); } else hexinput=255 //reset hex value } function changetext(){ if (!document.getElementById) return inc++ if (inc==0) document.getElementById(fader).innerHTML=Soon to be Released else if (inc==1) document.getElementById(fader).innerHTML=What you really need to know about Testing and Tagging else if (inc==2) document.getElementById(fader).innerHTML=250 Pages of jam-packed reality testing regimes that will maintain a safer working environment for all else if (inc==3) document.getElementById(fader).innerHTML=Learn what's it all about before they come and do it for you - A must read for all Clients, Employers, Electricians and Competent Persons else if (inc==4) document.getElementById(fader).innerHTML=Just when you thought you knew what testing and tagging was all about - along comes a book! else if (inc==5) document.getElementById(fader).innerHTML=Memberships available else if (inc==6) document.getElementById(fader).innerHTML=Are you really doing it right? else{ document.getElementById(fader).innerHTML=Pre-order and Save inc=-1 } fadingtext() setTimeout(changetext(),8000) } window.onload=changetext end of text refreshing Any help would be awsome, or solutions? Jerry - Do you Yahoo!? Messenger 7.0: Free worldwide PC to PC calls - Do you Yahoo!? Yahoo! News: Get the latest news via video today!
[PHP-DB] jscript question?
Hi, I know this is not PHP/MySQl related but every other board I have posted on I have not got a response, so I'll try here also. I'm missing something basic, surely here so that is another reason I am posting here.. Here goes... I have two lots of code here, one is for a refreshing text code in Javascript and another is a banner refreshing ad system. Using similiar technequies. But I can only get the refreshing text to appear but can't get the ads to work on the one page. :( But if I add a in any text area of the text refreshing than the ads system works but the text refreshing don't. But if I remove the from any text area the text refreshing works but the ads don't. I can't seem to find the problem. Here is the code(s) ads code center script language=JavaScript1.2 hexinput=255 // Initial color value. var inc=-1 //increment variable function fadingad(){ if(hexinput0) { hexinput-=11; // increase color value document.getElementById(fader1).style.color=rgb(+hexinput+,+hexinput+,+hexinput+); // Set color value. setTimeout(fadingad(),20); } else hexinput=255 //reset hex value } function changead(){ if (!document.getElementById) return inc++ if (inc==0) document.getElementById(fader1).innerHTML=img src=adtest/b1.jpg else if (inc==1) document.getElementById(fader1).innerHTML=img src=adtest/b2.jpg else if (inc==2) document.getElementById(fader1).innerHTML=img src=adtest/b3.jpg else if (inc==3) document.getElementById(fader1).innerHTML=img src=adtest/b4.jpg else if (inc==4) document.getElementById(fader1).innerHTML=img src=adtest/b5.jpg else if (inc==5) document.getElementById(fader1).innerHTML=img src=adtest/b6.jpg else if (inc==6) document.getElementById(fader1).innerHTML=img src=adtest/b1.jpg else{ document.getElementById(fader1).innerHTML=img src=adtest/b2.jpg inc=-1 } fadingad() setTimeout(changead(),4000) } window.onload=changead /script div id=fader1 style=font:18px Arial bold;width:100%;color:rgb(255,255,255)/div /center end ads code text refreshing script language=JavaScript1.2 hexinput=255 // Initial color value. var inc=-1 //increment variable function fadingtext(){ if(hexinput0) { hexinput-=11; // increase color value document.getElementById(fader).style.color=rgb(+hexinput+,+hexinput+,+hexinput+); // Set color value. setTimeout(fadingtext(),20); } else hexinput=255 //reset hex value } function changetext(){ if (!document.getElementById) return inc++ if (inc==0) document.getElementById(fader).innerHTML=Soon to be Released else if (inc==1) document.getElementById(fader).innerHTML=What you really need to know about Testing and Tagging else if (inc==2) document.getElementById(fader).innerHTML=250 Pages of jam-packed reality testing regimes that will maintain a safer working environment for all else if (inc==3) document.getElementById(fader).innerHTML=Learn what's it all about before they come and do it for you - A must read for all Clients, Employers, Electricians and Competent Persons else if (inc==4) document.getElementById(fader).innerHTML=Just when you thought you knew what testing and tagging was all about - along comes a book! else if (inc==5) document.getElementById(fader).innerHTML=Memberships available else if (inc==6) document.getElementById(fader).innerHTML=Are you really doing it right? else{ document.getElementById(fader).innerHTML=a href=order.phpPre-order/a and Save inc=-1 } fadingtext() setTimeout(changetext(),8000) } window.onload=changetext /script div id=fader style=font:18px Arial bold;width:100%;color:rgb(255,255,255)/div end of text refreshing Any help would be awsome, or solutions? Jerry - Do you Yahoo!? Yahoo! Music: Check out the gig guide for live music in your area
[PHP-DB] Help need please?
Hi, I know this is not PHP/MySQl related but every other board I have posted on I have not got a response, so I'll try here also. I'm missing something basic, surely here so that is another reason I am posting here.. Here goes... I have two lots of code here, one is for a refreshing text code in Javascript and another is a banner refreshing ad system. Using similiar technequies. But I can only get the refreshing text to appear but can't get the ads to work on the one page. :( But if I add a in any text area of the text refreshing than the ads system works but the text refreshing don't. But if I remove the from any text area the text refreshing works but the ads don't. I can't seem to find the problem. Here is the code(s) ads code center script language=JavaScript1.2 hexinput=255 // Initial color value. var inc=-1 //increment variable function fadingad(){ if(hexinput0) { hexinput-=11; // increase color value document.getElementById(fader1).style.color=rgb(+hexinput+,+hexinput+,+hexinput+); // Set color value. setTimeout(fadingad(),20); } else hexinput=255 //reset hex value } function changead(){ if (!document.getElementById) return inc++ if (inc==0) document.getElementById(fader1).innerHTML=img src=adtest/b1.jpg else if (inc==1) document.getElementById(fader1).innerHTML=img src=adtest/b2.jpg else if (inc==2) document.getElementById(fader1).innerHTML=img src=adtest/b3.jpg else if (inc==3) document.getElementById(fader1).innerHTML=img src=adtest/b4.jpg else if (inc==4) document.getElementById(fader1).innerHTML=img src=adtest/b5.jpg else if (inc==5) document.getElementById(fader1).innerHTML=img src=adtest/b6.jpg else if (inc==6) document.getElementById(fader1).innerHTML=img src=adtest/b1.jpg else{ document.getElementById(fader1).innerHTML=img src=adtest/b2.jpg inc=-1 } fadingad() setTimeout(changead(),4000) } window.onload=changead /script div id=fader1 style=font:18px Arial bold;width:100%;color:rgb(255,255,255)/div /center end ads code text refreshing script language=JavaScript1.2 hexinput=255 // Initial color value. var inc=-1 //increment variable function fadingtext(){ if(hexinput0) { hexinput-=11; // increase color value document.getElementById(fader).style.color=rgb(+hexinput+,+hexinput+,+hexinput+); // Set color value. setTimeout(fadingtext(),20); } else hexinput=255 //reset hex value } function changetext(){ if (!document.getElementById) return inc++ if (inc==0) document.getElementById(fader).innerHTML=Soon to be Released else if (inc==1) document.getElementById(fader).innerHTML=What you really need to know about Testing and Tagging else if (inc==2) document.getElementById(fader).innerHTML=250 Pages of jam-packed reality testing regimes that will maintain a safer working environment for all else if (inc==3) document.getElementById(fader).innerHTML=Learn what's it all about before they come and do it for you - A must read for all Clients, Employers, Electricians and Competent Persons else if (inc==4) document.getElementById(fader).innerHTML=Just when you thought you knew what testing and tagging was all about - along comes a book! else if (inc==5) document.getElementById(fader).innerHTML=Memberships available else if (inc==6) document.getElementById(fader).innerHTML=Are you really doing it right? else{ document.getElementById(fader).innerHTML=a href=order.phpPre-order/a and Save inc=-1 } fadingtext() setTimeout(changetext(),8000) } window.onload=changetext /script div id=fader style=font:18px Arial bold;width:100%;color:rgb(255,255,255)/div end of text refreshing Any help would be awsome, or solutions? Jerry - Do you Yahoo!? Messenger 7.0: Free worldwide PC to PC calls
[PHP-DB] Re: Refreshing text question!
Hi, Thanks for people that have commented and responsed. One stated my question had nothing to do with PHP and MySQL. Hang on to your horses, 90% oif the people that responded responded in an incorrect method I needed. Hence the appologies soon blooded in but thanks for the meta refresh but I know how to do this but thanks again! Now regarding It's not a PHP/MySQL question You too have FAILED to read my question correctly. It's certainly the funny season. I stated in my posting I will throwing the slogans/quotes in a db, fetching them and handling them in a db. Hence it will be as it's on a PHP page as I stated. In the end I did what I did on the first porject I did something like this and actually re-wrote the code. I have it like this: http://www.tassiedemononline.org.au/~bps/ Click through the alert thing, that is for the owners. The site is way early devolopment. But you'll see a manual picture in the main page, under it is the refreshing text I was talking about and wanted. (Hard to explain) I actually enhanced the code a bit so I could change font size of the text, text colour and lots more. My first attempt at it would only output in plain text. What not ideal for this sort of site. Thanks for peoples assistance though, I am not sure what they call this sort of text refreshing. Jerry - Do you Yahoo!? Yahoo! News: Get the latest news via video today!
[PHP-DB] Refreshing text question!
Hi, I did a little bit of script that refreshes a text slogan every 5 or so seconds with a new slogans and wraps to each slogan, I had about 5, and loops over and over again. This was done WITHOUT the need of refreshing the page. I think I used JavaScript but not 100% sure of this. Has anyone seen this before I seen a site use it? I can't recall the site I did it for, I know I have done it before. I need the code again without needing to re-do it all again as it took me a while to configure it last time. The site is written in PHP and uses MySQL. Any help would be mostly appreciated. J - Do you Yahoo!? Messenger 7.0: Free worldwide PC to PC calls
[PHP-DB] [EMAIL PROTECTED]
Warning, this person is acting to own your email account server. He tries to pretend his from Yahoo!, Hotmail or any email account to see if your account is active for spam. I got his REAL email address because he messed up an email and put his real email address. I have confirmed from Hotmail this account is actively used and they are investigating a legal breach he may of done. But be aware if you get such an email, a warning for anyone. Feel free to email this person from a fake email address or a email address you create and see what he excuses are. Some are so lame, The more fake ones you give him the better as his list will be full of rubbish. [EMAIL PROTECTED] Sorry to post here, just a warning, no duplicates. Thanks for your time. Send instant messages to your online friends http://au.messenger.yahoo.com
Re: [PHP-DB] Re: Subject: Scrolling News
snip Now, can you see the causes of these two errors... A runtime error has occurred. Do you wish to Debug, Line: 20 Error: Expected 9 Are you using pine to edit? Or a HTML editior. If HTML or notepad you have the option of turning wordwrap on/off. Use this to find line number. With PHP/Javascript knowledge you should be able to easily identify the problem. I just counted the lines in the email you posted for your code. Incidently you need to know how lines work in PHP in an email form, one line can carry to another line. Generally you look for the ; icon to end code, generally means a new enter but not all the time. But in a query state it does 99% of the time. I'll give you a hint, look at line 20 and think about adding a space or two. And also A runtime error has occurred. Do you wish to Debug, Line: 36 Error: 'scroller1' is undefined. It's undefined, define it, look on a javascript website for this error, explained nicely.Any help on this issue is greatly appriciated. Regards, AlexOn 23/12/05 11:16, Neil Smith [MVP, Digital media] [EMAIL PROTECTED] wrote: At 20:39 22/12/2005, you wrote: Date: Thu, 22 Dec 2005 20:38:58 + From: Alex Major [EMAIL PROTECTED] To: php-db@lists.php.net Message-ID: [EMAIL PROTECTED] Mime-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit Subject: Scrolling News Hi there. I'm trying to make a scrolling news box for my website. Basically I would like this news box to get information from a column in my database called 'news_title' and display it in a scrolling news box. Any suggestions for how to go about doing this? I'm still very new to php. Recommend : OrcaScroller (cross browser) http://www.greywyvern.com/javascript Block scroller and marquee Cheers - Neil Send instant messages to your online friends http://au.messenger.yahoo.com
[PHP-DB] Xmas countdown code help! (includes displaying images)
Hi, I have created a little Christmas countdown on the site using PHP and mySQL. The database controls the images displayed. But to make it simplier as I know the problem does not reflect my db setup or talking to the db I've re-wrote the code into a JavaScript code. So it's easier to read. The problem is the days to Christmas and images displayed display absolutely fine. But when there is 0 days to Christmas the NEW YEAR image does not display. :( But the countdown ones do. Here is the code: *I have commented areas with //* script type=text/javascript !-- function placeimg() { var currentDate = new Date(); // December is month 11 var endDate = new Date(2005, 11, 25, 23, 59, 59); var days = (endDate-currentDate)/1000/60/60/24; var daysRound = Math.floor(days); // Check when to put Sleeps and when to put sleep if (daysRound == 1) { var sleeps = Sleep; } else { var sleeps = Sleeps; } if (daysRound=0) { var alttag = Merry Christmas! document.write(a target=\_top\ href=\/\?PHPSESSID=c8b567b9f7640ce57720265db80b4f16gqkchtfzjqddmqgbzkepmohogd081925img border=\0\ src=\/christmas05/+daysRound+_days.gif\ alt=\+alttag+\ height=\/50\ width=\/125\/a); } else { var alttag = +daysRound+ +sleeps+ until Christmas document.write(a target=\_top\ href=\/\?PHPSESSID=c8b567b9f7640ce57720265db80b4f16gqkchtfzjqddmqgbzkepmohogd081925img border=\0\ src=\/christmas05/+daysRound+_days+.gif\ alt=\+alttag+\ height=\50\ width=\125\/a); } } placeimg(); //-- /script You can see the code working at http://www.getpaid2reademails.com/ Ignore the PHPSESSID. Also it currently only records time left from your personal clock on your PC. How would I go about getting the server time instead? But of course this would not be ideal for everyone in different countries but I wondered an easy way to do it. Thanks for your time. Jerry Send instant messages to your online friends http://au.messenger.yahoo.com
[PHP-DB] Re: SELECT html table
From: Ron Piggott (PHP) [EMAIL PROTECTED]To: PHP DB php-db@lists.php.netDate: Sun, 04 Dec 2005 13:38:58 -0500Subject: SELECT html table I have two questions. I would like to display the contents of my table with the first row being grey in background and the next row being white and the third row being grey, fourth being white, etc. I am not sure how to do this.Secondly I only want the first 20 records to be displayed at a time and then I want to create a NEXT link for the next 20 records (21-40) ... any idea how you would use the SELECT command to do this?Ron [input] [input] [input] [input] [input] [input] [input] [input] Visit http://www.mysql.com/ and read a little bit about LIMIT command. :) Jerry - Do you Yahoo!? Take your Mail with you - get Yahoo! Mail on your mobile - Do you Yahoo!? Never miss an Instant Message - Yahoo! Messenger for SMS
[PHP-DB] Suggestions please!
Hi, Okay I have a dj site, I have alogin script and cookies to handle the login. Next I want to add some permissions for each dj account. Maybe 3 to start with, 3 permissions. A value or y or n will be set in each permission, with n being the default. Now I need to know how to output the permission out with some add php code. So let me explain: Three permissions lets say are perm_1 , perm_2 , and perm_3 If user bob has a y in perm_2 I want to output the perm_2 permission. Which lets say is to delete a dj account. So it needs to output some php code to work with the database. Is IF statements relevent/safe for this or is there a better method? So each user account on default will need to also check the values of the permission. So I need a code that checks for a y value in each permission. If none is found than nothing is displayed or a message saying you have no special permissions currently. But if one or more are met than those permissions are outputed to the relevant permission code. If you need any further information please let me know. All help mostly appreciated in advance. J - Do you Yahoo!? The best of Hasselhoff on the web - Hoffice Attachments
[PHP-DB] PHP login with MYSQL Question?
Hi, Okay I created a user/pass login area. I created the following code. Now I want the secure area to send a cookie to the users PC we can track so I can make multiple pages without the need for the user to login to each page individually. I want to know what is the best method/code to use as a cookie with the following code. Thanks for the help in advance! ? $password=$_POST['pass']; mysql_connect (localhost, db_username, db_password) or die ('My SQL Error: ' . mysql_error()); mysql_select_db (db_dbname); $stuff = mysql_query(SELECT * FROM `users` WHERE userName='.$userName.' AND userPass='.$userPass.') or die(MySQL Login Error: .mysql_error()); if (mysql_num_rows($stuff) 0) { $row=mysql_num_rows($stuff); echo You are logged in to Admin as $userName br smallBeta Version/smallbrbr; } else{ echo (titleIncorrect/titlebody bgcolor='black' text='red' alink='blue' vlink='blue' link='blue' centerbrbrbrIncorrect Password!brbra href='login.php'try again/a/center ); } ? J - - Do you Yahoo!? Never miss an Instant Message - Yahoo! Messenger for SMS
[PHP-DB] HTTP Auth help required, please?
Hi, I am having HUGE problems with the following: HTTP Auth in the latest version of PHP. Usernames are saved to a db but even when you enter a correct combination it fails. So I think it is best to start from scratch and try and get some code from people that are using the latest version of PHP. I am aware that there was huge problems with release 5.0 regarding this issue but when I put the updated code it it still fails. So can someone provide me with the code I need. So i can try and let you know how I go. What I need is: - PHP Code to input into my file.php file. (this code should include an error message if a bad user/pass is entered and a sucessful message, or a redirect url code. User / Password is stored to a db, db_name preferable is users - PHP code should include the connection to the db also, saves me editing it later. I have already setup a database already with the last code I have. So if the query needs editing I can do this. I just need something that works, and basic! I have been trying to get this to work for ages. Please provide two login methods, than I can test both. Maybe it's the method of login that is causing me grief. - HTTP popup box - HTTP web-form I have only tried the popup box method, never been able to get sucessfully logged in. Not tried the web-form method yet. If someone could whiz up some code for me or direct me to a url I can try and post back with the error I am getting. Thanks! Jerry - Do you Yahoo!? Yahoo! Photos: Now with unlimited storage
[PHP-DB] HTTP Auth help required, please?
Hi, I am having HUGE problems with the following: HTTP Auth in the latest version of PHP. Usernames are saved to a db but even when you enter a correct combination it fails. So I think it is best to start from scratch and try and get some code from people that are using the latest version of PHP. I am aware that there was huge problems with release 5.0 regarding this issue but when I put the updated code it it still fails. So can someone provide me with the code I need. So i can try and let you know how I go. What I need is: - PHP Code to input into my file.php file. (this code should include an error message if a bad user/pass is entered and a sucessful message, or a redirect url code. User / Password is stored to a db, db_name preferable is users - PHP code should include the connection to the db also, saves me editing it later. I have already setup a database already with the last code I have. So if the query needs editing I can do this. I just need something that works, and basic! I have been trying to get this to work for ages. Please provide two login methods, than I can test both. Maybe it's the method of login that is causing me grief. - HTTP popup box - HTTP web-form I have only tried the popup box method, never been able to get sucessfully logged in. Not tried the web-form method yet. If someone could whiz up some code for me or direct me to a url I can try and post back with the error I am getting. Thanks! Jerry - Do you Yahoo!? Listen to over 20 online radio stations and watch over 5000 music videos on Yahoo! Music.
[PHP-DB] RE: Mailing List Question: Outlook Express
There doesn't seem to be a way to get a response from the mailing list owner (you just get an automated Hey are you stupid? response), so I'm posting this here. My appologies. Are there any plans to make your digests work with Outlook Express? Yes, I know it's old. Yes, I know it's broken. But the fact is, I (and a whole lot of other people) use it as their primary email client -- and I have yet to find one that works as well on Windows (including Thunderbird). Every other mailing list that I'm on sends the whole digest as one single text message. It's simple and it works in all email clients. Can you at least provide that as an option? I'd love to contribute to the list, but it makes it hard when you have to click each message as an attachment to read them. Jason Jason, I think you find there is, you can have the messages sent as one big digest or individual emails. The option is available at the digests website. Login there and you can change the option. Please note it may take a few hours for the effects to kick in. :) There is also a place where you can view threads of the list online and reply to them. J - - Do you Yahoo!? Never miss an Instant Message - Yahoo! Messenger for SMS
[PHP-DB] Re: Login Auth help?
Hi, Well I tried this code but it fails, if I enter a correct User and Pass set in the db it just prompts for the user/pass again. The error message that should apply if wrong three times appears but the sucessful message I can't get regardless of correct user pass or not, any help please? ?php function displayLogin() { header(WWW-Authenticate: Basic realm=\My Website\); header(HTTP/1.0 401 Unauthorized); echo h2Authentication Failure/h2; echo The username and password provided did not work. Please reload this page and try again.; exit; } $db = mysql_connect('localhost','db_user',db_pass') or die(Couldn't connect to the database.); mysql_select_db('db_name') or die(Couldn't select the database); if (!isset($PHP_AUTH_USER) || !isset($PHP_AUTH_PW)) { // If username or password hasn't been set, display the login request. displayLogin(); } else { // Escape both the password and username string to prevent users from inserting bogus data. $PHP_AUTH_USER = addslashes($PHP_AUTH_USER); $PHP_AUTH_PW = md5($PHP_AUTH_PW); // Check username and password agains the database. $result = mysql_query(SELECT count(id) FROM users WHERE password='$PHP_AUTH_PW' AND username='$PHP_AUTH_USER') or die(Couldn't query the user-database.); $num = mysql_result($result, 0); if (!$num) { // If there were no matching users, show the login displayLogin(); } } // All code/html below will only be displayed to authenticated users. echo Congratulations! You're now authenticated.; ? J - Do you Yahoo!? Yahoo! News: Get the latest news via video today!
[PHP-DB] Login Auth help? | Handling pages help? (2 questions)
Hi, Need some ideas/opinions on a project I have. The project is for a Radio Station (online one) where DJ's can login to the site and do stuff and listeners can listen in live to the live feeds. Now I downloaded a password protected code that uses MySQL to store the info but it fails each time. It wont sucessfully login despite setting the database up correctly etc. So instead of posting the code here I would like to know peoples ideas/links on a method of login. What I'd prefer to set is not a HTML login but more the traditional popup box login. Like used on CPANEL. The username/password (details) will be stored to a database. Any suggestions on fully working code? Also each DJ will have a webpage within a database. So updates to their pages will be made on the database, as I am not really good at writing to a text file from PHP from a webpage. Never learnt it to be honest, what would be easiest/best? Writing to a database or a text file directly? Now if db I need each dj to have their own page like domain.com/djs/DJNAME.ext ... I know there is a way to get the url written into the database and not exactly have the file in the www but reads from the database but I am not sure the PHP/MySQL code to use to handle it. Any help is mostly appreciated? That is it for now, if anyone is interested in the station itself to listen to or see progress please feel free to reply and I'll post the url. Thanks! J - - Do you Yahoo!? Never miss an Instant Message - Yahoo! Messenger for SMS
[PHP-DB] Login Auth help? | Handling pages help? (2 questions)
Hi, Need some ideas/opinions on a project I have. The project is for a Radio Station (online one) where DJ's can login to the site and do stuff and listeners can listen in live to the live feeds. Now I downloaded a password protected code that uses MySQL to store the info but it fails each time. It wont sucessfully login despite setting the database up correctly etc. So instead of posting the code here I would like to know peoples ideas/links on a method of login. What I'd prefer to set is not a HTML login but more the traditional popup box login. Like used on CPANEL. The username/password (details) will be stored to a database. Any suggestions on fully working code? Also each DJ will have a webpage within a database. So updates to their pages will be made on the database, as I am not really good at writing to a text file from PHP from a webpage. Never learnt it to be honest, what would be easiest/best? Writing to a database or a text file directly? Now if db I need each dj to have their own page like domain.com/djs/DJNAME.ext ... I know there is a way to get the url written into the database and not exactly have the file in the www but reads from the database but I am not sure the PHP/MySQL code to use to handle it. Any help is mostly appreciated? That is it for now, if anyone is interested in the station itself to listen to or see progress please feel free to reply and I'll post the url. Thanks! J - Do you Yahoo!? Find a local business fast with Yahoo! Local Search
Re: [PHP-DB] RE: Basic SQLite test failing..
It's not aware of function sqlite_query() So you need to define what it is. There is alot of docs for fixes/workarounds for this online in sqlite docs. Eoin Hennessy [EMAIL PROTECTED] wrote:Ahh, I'm not very familiar with php, should have looked into the effects of the '@' symbol. Once removing the symbols, running via CLI, it fails with; 'Call to undefined function: sqlite_open()' whereas, running via apache, it fails with; 'Call to undefined function: sqlite_query()' I have sqlite and sqlite_php installed and enabled in php.ini (there's an entry under phpinfo()). Any ideas why it may be failing? Thanks again. On 10/30/05, JeRRy wrote: Hi, Errors are more than likely not being produced because of the '@' symbol. Try removing this and see how you go. Also check your code for syntax errors. These will be produced within the errors. J -start of message--- Hello, I have the following very basic sqlite test harness:When running via CLI the script goes into 'sqlite_open', but nevercomes out, i.e. none of the rest of the code is hit. When running viaapache and mod_php, it gets out of 'sqlite_open' with a validconnection but never comes out of the first 'sqlite_query' call.It does this without any errors or warnings. The database file ispresent with correct permissions. I'm running a standard php install.I am using: php 4.4.0 sqlite 3.2.7 sqlite-php 0.0.5Any ideas where things are going wrong? Or perhaps tips on improvingdebug output. Any help would be appreciated,Eoin. end of message--- - Do you Yahoo!? Find a local business fast with Yahoo! Local Search - Do you Yahoo!? Find a local business fast with Yahoo! Local Search
[PHP-DB] RE: Basic SQLite test failing..
Hi, Errors are more than likely not being produced because of the '@' symbol. Try removing this and see how you go. Also check your code for syntax errors. These will be produced within the errors. J -start of message--- Hello, I have the following very basic sqlite test harness:?php $dbconn = @sqlite_open('testdb'); if ($dbconn) {@sqlite_query($dbconn, CREATE TABLE test_table (test_id INT););@sqlite_query($dbconn, INSERT INTO test_table VALUES (100));$result = @sqlite_query($dbconn, SELECT test_id FROM test_table);var_dump(@sqlite_fetch_array($result, SQLITE_ASSOC)); } else {print Connection to database failed!\n; }?When running via CLI the script goes into 'sqlite_open', but nevercomes out, i.e. none of the rest of the code is hit. When running viaapache and mod_php, it gets out of 'sqlite_open' with a validconnection but never comes out of the first 'sqlite_query' call.It does this without any errors or warnings. The database file ispresent with correct permissions. I'm running a standard php install.I am using: php 4.4.0 sqlite 3.2.7 sqlite-php 0.0.5Any ideas where things are going wrong? Or perhaps tips on improvingdebug output. Any help would be appreciated,Eoin. end of message--- - Do you Yahoo!? Find a local business fast with Yahoo! Local Search
Re: [PHP-DB] µç×Ó´«µ¥,×îÁ®¼ ÛµÄÐû´«·½Ê½
Date:Sun, 16 Oct 2005 02:40:44 -0400From:Alain Rivest [EMAIL PROTECTED]To:php-db@lists.php.net php-db@lists.php.netSubject:Re: [PHP-DB] µç×Ó´«µ¥,×îÁ®¼ÛµÄÐû´«·½Ê½ KOKOµç×Ó´«µ¥ a ¨¦crit :¹ýÁËÁ¼¾Ã£¬½û²»×¡´óÉù˵µÀ£º¡°ÉñÏÉæ¢æ¢£¬ÄãÈôÄÜ»î¹ýÀ´¸úÎÒ˵һ¾ä»°£¬ÎÒ±ãΪÄãËÀһǧ±é£¬Ò»Íò±é£¬Ò²ÈçÉíµÇ¼«ÀÖ£¬»¶Ï²ÎÞÏÞ¡£¡±Í»È»Ë«Ï¥¹òµ¹£¬°ÝÁËÏÂÈ¥¡£ Ç𴦻úµÀ£º¡°±±¶·´óÕóÈ«Á¦ÓëÄãÖÜÐý£¬Á½¸öħͷÁì×ÅÒ»Åú¼éÈË£¬³Ë϶¹¥µ½ÖØÑô¹¬Ç°¡£ËûÃÇÒ»ÉÏÀ´¾Í·Å»ðÉÕ¹Û£¬ºÂʦµÜ³öÕóÓëÄÇ»ô¶¼Íõ×Ó¶¯ÊÖ¡£Ò²ÊÇËû¹ýÓÚÇáµÐ£¬¶ø»ô¶¼µÄÎ书ÓÖ±ð¾ßÒ»¸ñ£¬¹ÖÒìÌØÉõ¡£ºÂʦµÜ³öÊÖʱÂÔÏÖ¼±Ô꣬ÐØ¿ÚÖÐÁËËûÒ»ÕÆ¡£ÎÒÃÇæ½áÕóÏ໤¡£Ö»ÊÇÉÙÁ˺ÂʦµÜÒ»ÈË£¬²¹ÉÏÀ´µÄµÜ×Ó¹¦Á¦Ïà²îÌ«Ô¶£¬Õó·¨ÍþÁ¦±ãÊôÓÐÏÞ¡£ÄãÈô²»¼°Ê±¸Ïµ½£¬È«Õæ½Ì½ñÈÕµ±ÕæÊÇÒ»°ÜÍ¿µØÁË¡£ÏÖÏÂÏëÀ´£¬¾ÍËãÊØÔÚɽϵÄÖÚµÜ×Ó²»ÈÏ´íÁ˵ÐÈË£¬ÄÇЩ¶þÁ÷ÑýÈ˹ÌÈ»ÎÞ·¨ÉÏɽ£¬´ï¶û°ÍÓë»ô¶¼¶þÈËÈ´ÖÕ¾¿×èµ²²»×¡¡£´Ë¶þÈËÁªÊÖÓë±±¶·ÕóÏභ£¬ÎÒÃÇÊäÊDz»»áÊäµÄ£¬µ«¾ö²»ÄÜÈçÄãÕâ°ãÓ®µÃǬ¾»Ë¬¿ì¡shy;¡shy;¡±Õý˵µ½ÕâÀºöÌýÎ÷±ßÃùÃùÃùÒ»ÕóÏìÁÁ£¬ÓÐÈË´µ¶¯ºÅ½Ç¡£½ÇÉù²ÔÁ¹¼¤Ô½£¬¹ù¾¸ÌýÔÚ¶úÖУ¬²»ÓɵÃÐÄÂõÒõɽ£¬Éñ³Û´óÄ®£¬ÏëÆðÁËÃɹŻÆɳç硢ƽҰÎ޼ʵķç¹â¡£ Can you repeat the question, please?-- Alain -- http://www.vivahate.org This is a english list. You obviously MUST understand english as you have signed up to the list, which emails an english plain-text email to you to confirm email address. Also to signup you use a web-form which is also in english .. Most messages that are not in english are ignored and will continue to be ignored. More likely this occourence is a load of spam. That makes no sense at all or no meaning. However it could be real, but should be ignored. J - Do you Yahoo!? The New Yahoo! Movies: Check out the Latest Trailers, Premiere Photos and full Actor Database.
Re: [PHP-DB] PHP email client
Brent, Thanks for that I will look into SqirrelMail as that sounds like the one to go for. Thanks for your time also and assisting me. Jerry Brent Baisley [EMAIL PROTECTED] wrote: SqirrelMail is as customizable as you want, it's written in PHP and you get the source code. By default it comes with various preferences a user can change (i.e. color scheme). You can create folders if you setup it up as an IMAP account. The interface certainly isn't as fancy and dynamic as gmail or yahoo, but it's designed to work in just about any browser. You could certainly add some ad display code to the interface, after all it is just a web page. sqirrelmail.org dbmail.org postfix.org sendmail.org mysql.com (everything can't be .org) Price: free On Oct 3, 2005, at 11:41 AM, JeRRy wrote: Thanks Brent, Just for future refrence for this list if i look back on it or for others interest as well do you have direct links to the ones you have listed below? I did a search and got third party addresses that did not seem to direct to the real address. But that might of been the search terms I was using or the real sites were not available at the time I searched. But the links would be handy and any costs assosicated to them. SquirellMail I think I have heard about and is used in most CPANEL's. But how customizable is this? That is the sort of client I would need. I know Horde pretty well, is that customizable. What I wanna do is add ads to all accounts and each time a user sees the ad they get credit, they don't need to click it to earn. Something like that but with more detail. So it needs to be able to add ads and to add PHP code and mysql code to it and be able to get basic info back from the email client to know who is logged in. Jerry Brent Baisley wrote: SquirrelMail is used by a lot people and comes with a lot of systems (i.e. Apple Servers, Linux). It's not tied to any particular email server, it's open source and PHP based, so you can customize it to your needs. The email address has to do with the email server, not the web front end. Postfix is a pretty popular email server that supports many configurations and is a heck of a lot easier to learn and setup than sendmail. dbMail is another interesting one that can use a database (mysql, postgres) as a back, which helps with searching large mail boxes or tying into a whole system. On Oct 3, 2005, at 9:39 AM, JeRRy wrote: Hello, What I am looking for is to offer a website that people can freely signup and use as a real email address. A client where they can send/recieve emails just like Yahoo! Mail and Hotmail etc. Have it web based. But I don't just want any email client, it must be customizable and code added to it. So I am not looking to go to a www site and signup for them to brand it. I want to customize it entiley which does not just include the colours and format I mean customize the code itself and add to it as it won't just be a email site, it will pay you to send emails etc. Free or price is fine. I know of a few BASIC free ones but their very basic. If I can avoid allowing attachments that's fine or a section to allow or disallow ataachments. But when is ay basic their damn basic. I need one that you have settings, folders etc. Any ideas? Or anyone have the time to write such a client for me? I'm not really sure if the client can be or would be PHP based or datbase driven. I'd hope so because I could adapt to it bette r and work on it but if not I am willing to learn the bits. Time frame? Well if someone needs to write it I don't need it anytime soon. I want it to be stable and what not so needs to be fine and operate correctly. But if I can buy or get some code I can edit there will be alot of editing but that would be fine. Any ideas people? email will be in the form of [EMAIL PROTECTED] not like [EMAIL PROTECTED] it's going to have it's own domain. Something like rock.com would be fine. Thanks! Jerry - Do you Yahoo!? Find a local business fast with Yahoo! Local Search -- Brent Baisley Systems Architect Landover Associates, Inc. Search Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 Do you Yahoo!? Messenger 7.0: Free worldwide PC to PC calls -- Brent Baisley Systems Architect Landover Associates, Inc. Search Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - Do you Yahoo!? Find a local business fast with Yahoo! Local Search
RE: [PHP-DB] PHP email client
Hi, Never been to their website, comes in the CPANEL I use. I think that maybe it though, why? Jerry Bastien Koert [EMAIL PROTECTED] wrote: horde? www.horde.org bastien From: JeRRy To: php-db@lists.php.net Subject: [PHP-DB] PHP email client Date: Mon, 3 Oct 2005 23:39:42 +1000 (EST) Hello, What I am looking for is to offer a website that people can freely signup and use as a real email address. A client where they can send/recieve emails just like Yahoo! Mail and Hotmail etc. Have it web based. But I don't just want any email client, it must be customizable and code added to it. So I am not looking to go to a www site and signup for them to brand it. I want to customize it entiley which does not just include the colours and format I mean customize the code itself and add to it as it won't just be a email site, it will pay you to send emails etc. Free or price is fine. I know of a few BASIC free ones but their very basic. If I can avoid allowing attachments that's fine or a section to allow or disallow ataachments. But when is ay basic their damn basic. I need one that you have settings, folders etc. Any ideas? Or anyone have the time to write such a client for me? I'm not really sure if the client can be or would be PHP based or datbase driven. I'd hope so because I could adapt to it better and work on it but if not I am willing to learn the bits. Time frame? Well if someone needs to write it I don't need it anytime soon. I want it to be stable and what not so needs to be fine and operate correctly. But if I can buy or get some code I can edit there will be alot of editing but that would be fine. Any ideas people? email will be in the form of [EMAIL PROTECTED] not like [EMAIL PROTECTED] it's going to have it's own domain. Something like rock.com would be fine. Thanks! Jerry - Do you Yahoo!? Find a local business fast with Yahoo! Local Search - Do you Yahoo!? The New Yahoo! Movies: Check out the Latest Trailers, Premiere Photos and full Actor Database.
Re: [PHP-DB] PHP email client
sqirrelmail.org can't display page You sure that is the url? Brent Baisley [EMAIL PROTECTED] wrote: SqirrelMail is as customizable as you want, it's written in PHP and you get the source code. By default it comes with various preferences a user can change (i.e. color scheme). You can create folders if you setup it up as an IMAP account. The interface certainly isn't as fancy and dynamic as gmail or yahoo, but it's designed to work in just about any browser. You could certainly add some ad display code to the interface, after all it is just a web page. sqirrelmail.org dbmail.org postfix.org sendmail.org mysql.com (everything can't be .org) Price: free On Oct 3, 2005, at 11:41 AM, JeRRy wrote: Thanks Brent, Just for future refrence for this list if i look back on it or for others interest as well do you have direct links to the ones you have listed below? I did a search and got third party addresses that did not seem to direct to the real address. But that might of been the search terms I was using or the real sites were not available at the time I searched. But the links would be handy and any costs assosicated to them. SquirellMail I think I have heard about and is used in most CPANEL's. But how customizable is this? That is the sort of client I would need. I know Horde pretty well, is that customizable. What I wanna do is add ads to all accounts and each time a user sees the ad they get credit, they don't need to click it to earn. Something like that but with more detail. So it needs to be able to add ads and to add PHP code and mysql code to it and be able to get basic info back from the email client to know who is logged in. Jerry Brent Baisley wrote: SquirrelMail is used by a lot people and comes with a lot of systems (i.e. Apple Servers, Linux). It's not tied to any particular email server, it's open source and PHP based, so you can customize it to your needs. The email address has to do with the email server, not the web front end. Postfix is a pretty popular email server that supports many configurations and is a heck of a lot easier to learn and setup than sendmail. dbMail is another interesting one that can use a database (mysql, postgres) as a back, which helps with searching large mail boxes or tying into a whole system. On Oct 3, 2005, at 9:39 AM, JeRRy wrote: Hello, What I am looking for is to offer a website that people can freely signup and use as a real email address. A client where they can send/recieve emails just like Yahoo! Mail and Hotmail etc. Have it web based. But I don't just want any email client, it must be customizable and code added to it. So I am not looking to go to a www site and signup for them to brand it. I want to customize it entiley which does not just include the colours and format I mean customize the code itself and add to it as it won't just be a email site, it will pay you to send emails etc. Free or price is fine. I know of a few BASIC free ones but their very basic. If I can avoid allowing attachments that's fine or a section to allow or disallow ataachments. But when is ay basic their damn basic. I need one that you have settings, folders etc. Any ideas? Or anyone have the time to write such a client for me? I'm not really sure if the client can be or would be PHP based or datbase driven. I'd hope so because I could adapt to it bette r and work on it but if not I am willing to learn the bits. Time frame? Well if someone needs to write it I don't need it anytime soon. I want it to be stable and what not so needs to be fine and operate correctly. But if I can buy or get some code I can edit there will be alot of editing but that would be fine. Any ideas people? email will be in the form of [EMAIL PROTECTED] not like [EMAIL PROTECTED] it's going to have it's own domain. Something like rock.com would be fine. Thanks! Jerry - Do you Yahoo!? Find a local business fast with Yahoo! Local Search -- Brent Baisley Systems Architect Landover Associates, Inc. Search Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 Do you Yahoo!? Messenger 7.0: Free worldwide PC to PC calls -- Brent Baisley Systems Architect Landover Associates, Inc. Search Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - Do you Yahoo!? Try Yahoo! Photomail Beta: Send up to 300 photos in one email!
[PHP-DB] PHP email client
Hello, What I am looking for is to offer a website that people can freely signup and use as a real email address. A client where they can send/recieve emails just like Yahoo! Mail and Hotmail etc. Have it web based. But I don't just want any email client, it must be customizable and code added to it. So I am not looking to go to a www site and signup for them to brand it. I want to customize it entiley which does not just include the colours and format I mean customize the code itself and add to it as it won't just be a email site, it will pay you to send emails etc. Free or price is fine. I know of a few BASIC free ones but their very basic. If I can avoid allowing attachments that's fine or a section to allow or disallow ataachments. But when is ay basic their damn basic. I need one that you have settings, folders etc. Any ideas? Or anyone have the time to write such a client for me? I'm not really sure if the client can be or would be PHP based or datbase driven. I'd hope so because I could adapt to it better and work on it but if not I am willing to learn the bits. Time frame? Well if someone needs to write it I don't need it anytime soon. I want it to be stable and what not so needs to be fine and operate correctly. But if I can buy or get some code I can edit there will be alot of editing but that would be fine. Any ideas people? email will be in the form of [EMAIL PROTECTED] not like [EMAIL PROTECTED] it's going to have it's own domain. Something like rock.com would be fine. Thanks! Jerry - Do you Yahoo!? Find a local business fast with Yahoo! Local Search
Re: [PHP-DB] PHP email client
Thanks Brent, Just for future refrence for this list if i look back on it or for others interest as well do you have direct links to the ones you have listed below? I did a search and got third party addresses that did not seem to direct to the real address. But that might of been the search terms I was using or the real sites were not available at the time I searched. But the links would be handy and any costs assosicated to them. SquirellMail I think I have heard about and is used in most CPANEL's. But how customizable is this? That is the sort of client I would need. I know Horde pretty well, is that customizable. What I wanna do is add ads to all accounts and each time a user sees the ad they get credit, they don't need to click it to earn. Something like that but with more detail. So it needs to be able to add ads and to add PHP code and mysql code to it and be able to get basic info back from the email client to know who is logged in. Jerry Brent Baisley [EMAIL PROTECTED] wrote: SquirrelMail is used by a lot people and comes with a lot of systems (i.e. Apple Servers, Linux). It's not tied to any particular email server, it's open source and PHP based, so you can customize it to your needs. The email address has to do with the email server, not the web front end. Postfix is a pretty popular email server that supports many configurations and is a heck of a lot easier to learn and setup than sendmail. dbMail is another interesting one that can use a database (mysql, postgres) as a back, which helps with searching large mail boxes or tying into a whole system. On Oct 3, 2005, at 9:39 AM, JeRRy wrote: Hello, What I am looking for is to offer a website that people can freely signup and use as a real email address. A client where they can send/recieve emails just like Yahoo! Mail and Hotmail etc. Have it web based. But I don't just want any email client, it must be customizable and code added to it. So I am not looking to go to a www site and signup for them to brand it. I want to customize it entiley which does not just include the colours and format I mean customize the code itself and add to it as it won't just be a email site, it will pay you to send emails etc. Free or price is fine. I know of a few BASIC free ones but their very basic. If I can avoid allowing attachments that's fine or a section to allow or disallow ataachments. But when is ay basic their damn basic. I need one that you have settings, folders etc. Any ideas? Or anyone have the time to write such a client for me? I'm not really sure if the client can be or would be PHP based or datbase driven. I'd hope so because I could adapt to it better and work on it but if not I am willing to learn the bits. Time frame? Well if someone needs to write it I don't need it anytime soon. I want it to be stable and what not so needs to be fine and operate correctly. But if I can buy or get some code I can edit there will be alot of editing but that would be fine. Any ideas people? email will be in the form of [EMAIL PROTECTED] not like [EMAIL PROTECTED] it's going to have it's own domain. Something like rock.com would be fine. Thanks! Jerry - Do you Yahoo!? Find a local business fast with Yahoo! Local Search -- Brent Baisley Systems Architect Landover Associates, Inc. Search Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 - Do you Yahoo!? Messenger 7.0: Free worldwide PC to PC calls
[PHP-DB] RE: HTML Tables in PHP...
Hi, From: Daryl Booth [EMAIL PROTECTED]To:[EMAIL PROTECTED]:Sun, 25 Sep 2005 15:35:40 +0200Subject:HTML Tables in PHP... How can I give a table /table with all of it's parameters in PHP in eachof the cells there is a variable that gives me the data back but I can't getthe table to show as it always gives me either this error Parse error:parse error, unexpected T_LNUMBER, expecting ',' or ';' inC:\FoxServ\www\Dad\proofing\index.php on line 41 or this one when I don'tput in the quotes Parse error: parse error, unexpected '', expecting ','or ';' in C:\FoxServ\www\Dad\proofing\index.php on line 41. Here is the PHP code I'm using: ?php$datei=c:\licence.txt; if(file_exists($datei)){ $nachricht=The licence has been validated thank-you!; $fp = fopen($datei,r); fpassthru($fp); fclose($fp); }else{ $nachricht=The licence doesn't exist please contact us! echo table width=694 height=501 border=0 align=centercellpadding=0 cellspacing=0 trtd height=109 colspan=7img src=images/1.jpg width=857height=109 border=0 usemap=#Map/td /tr trtd width=39 rowspan=2img src=images/lefty.jpg width=39height=394/tdtd width=8 height=369nbsp;/tdtd width=240 class=style5/tdtd width=12 height=369 class=style5nbsp;/tdtd width=407 height=369 class=style5spanclass=style3b$nachricht/b/spanbr/tdtd width=346 rowspan=2img src=images/righty.jpg width=346height=394 border=0 usemap=#Map2/td /tr trtd height=23 colspan=5img src=images/bottom.jpg width=472height=23/td /tr/table;} ? Hi, Damn your code is VERY MESSY. No wonder PHP is confused in how the work is configured. You need to do alot of work. snip echo table width... /snip This is not even proper PHP writting. The server would look at this and say huh? Read this: http://au3.php.net/manual/en/function.echo.php The second line of the demonstration is easy to read and points out an obvious exclusion you don't have in your code. If you can't find this? Than you need to read alot more on PHP/MYSQL because your obviously not up to the standard you need to write PHP on the fly without major help. I suggest you read the online docs. Answers are much easier to find there than waiting a while for a response on here. Also notice in the demonstration at the end of all code lines there is a ;? Where is yours? PHP gets to the end of your code and does not see a ; so can't understand it. If you read the error messages outputed it's pretty self-explaintry to the error. Read it, go to that line and think about the error displayed. Also PHP.net and mysql.net have error codes. So if you get an error and it displays an error code id go to the relevant site and check it up for a more detailed response and fix. Does this assist you? J - Do you Yahoo!? Find a local business fast with Yahoo! Local Search
[PHP-DB] Inputing a value into a image (?)
Hi, When I created a header image I made a mistake when I completed it and did not relise until some time after it. Now what has occoured is I through a value in the image instead of getting it to update from the database each time the page is loaded. What I want to do is rip out the value (it's in red) and replace it with the continueation of the image liner. Than run a query to the database to fetch the real updated value and put it in it, Now I know I can use div to do it but have noticed it's not reliable to place it in the right area with some browsers. Making it messy. Does anyone have any ideas on how to do it that is best with most browser? (the common ones) The links are below so you can see. Now if it's too much hassle I could put the value on another area of the page. But prefer there as that image is on all pages on default. (header.php) Or would I be better to put the image in as a flash and get flash to query the database? Any suggestions/ideas I would appreciate. Okay here is the link: http://getpaid2reademails.com/pages/images/top_pic.gif If that fails please try: http://getpaid2reademails.com/ The area I mean is in red text ... Any questions just simply reply. :) Thanks! J - Do you Yahoo!? Yahoo! Photos: Now with unlimited storage
[PHP-DB] .
Is there a way to spoof away php-db@lists.php.net who continues to send a virus via this mailing list. Why does this address need privlidges to send to the list anyway? The sender is using this to make it look like from the list but we all know it's fake. Well most do, I hope noone got caught out, because who's liable if they do? The list owners? I hope not but it points that way. Or does that email address repressent something else to the list? I have not seen anyone consider pointing this out, or maybe the list admin are not about as often as daily. J - Do you Yahoo!? Try Yahoo! Photomail Beta: Send up to 300 photos in one email!
Re: [PHP-DB] Re: list test subject. .
Just a quick reply. No I am not from NZ if you were asking me, which I don't think you were because my email states I am from Australia. Just thought I'd make that said. Thanks for your informative response. J Date: Sun, 26 Jun 2005 14:05:13 -0500From:Martin Norland [EMAIL PROTECTED]To:[EMAIL PROTECTED]:Re: [PHP-DB] Re: list test subject. . Plain Text Attachment [ Download File | Save to Yahoo! Briefcase ] [[[ O-F-F topic ]]]prefer replies offlist if they have to be done, but I had to clear the waters some on this.that said...JeRRy wrote:[A lot of mostly unintelligible and worthless to quote jumble]delays like this are not frequent, and should not be. delays like such. Most recently IP's were a major issue than they upgraded how they operate to IP(something or rather) ... IP2 or something. Effected Web Hosts. I'm not quite clear exactly what all this was but my web host was down for a considerable time because of it and all my sites effected as people could not connect. Some were upgraded on the fly some sites were down for weeks or more. My web host was down for 11 days.Where do you live ?No. You were handed a pile of lies, it's possible that a major line recently was upgraded or repaired. Are you in New Zealand?http://slashdot.org/article.pl?sid=05/06/24/0249231tid=95tid=133More likely your web host broke something badly and had to rebuild their system(s). IPv6 is the next version of IP, and it's not full replacing IPv4 anytime soon because coordinating the whole mess is cumbersome. It's already in use in plenty of places, and they use it alongside IPv4 just fine. Australia!I know, that the USA are realy underdeveloped (Broadband,...) but broken DNS or such issues?The USA is not really underdeveloped in this area, we are just too widespread to have *really* fast pipes. Broadband has penetrated the US quite fine and it's extremely easy to get fast always on connections Tests were ran with certain domains. Most domains failed in Washington area. But since these tests are not always accurate but I'd guess the problem lays within a hop or something there. But how would I know in Australia? Another is I tried to load http://www.getpaid2reademails.com/ and I can't access it but people elsewhere can. When I ran anonymous browsing it works. (another location)More bizzare!!!Your DNS was broken, you still had a local cache of the sites you frequently visit. Not really. A person in Canada confirmed they were not able to view the above site for the passed 3 days. I can view it now. Another person in Americal could see it before but can't now despite the site being online and the server active. It happens quite often this occourence. This list seems to be working fine now, I just got a swag of emails sworming in all at once. But when I see the date/time emails were sent I see there is quite a delay in some hitting the inboxes.Maybe you should ask your ISP what happen...Again, DNS servers/issues. DNS changes can take a long while to propogate. If your webhost was also your DNS host and their servers went poof, it is possible some people had the lookup cached while some didn't.Email has no particular guaranteed delivery time, and backoff algorithms differ - in addition to mail servers queuing mail up before sending. It happens, mail isn't always as instant as we would like. Why should I? Can't you see I am using Yahoo!? lol ... Nothing wrong with my ISP currently. As they don't feed my emails, they just feed the pages to check them. ;) But it's great to see people interested if the list is still ACTIVE... Rather than forgetting it exists if people don't get emails every so hours. The list has lovers.. :):-)amen. hail to the list. :) I think there has been 2 emails stating is the list active lately. But none have confirmed www problems. Michelle, go back to your little box.Little Box ? That's what they call a linux (of some description) O/S machine, a box. it's just OS - it's an abbreviation, not O/S like O/S 2.cheers,-- - Martin Norland, Sys Admin / Database / Web Developer, International Outreach x3257The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. - Do you Yahoo!? Win a dream trip to Western Australia, courtesy of the NEW My Yahoo!
[PHP-DB] Re: list test subject
Date:Fri, 24 Jun 2005 18:07:26 +0200From:Michelle Konzack [EMAIL PROTECTED]To:[EMAIL PROTECTED]:Re: list test subject Plain Text Attachment [ Download File | Save to Yahoo! Briefcase ] Am 2005-06-25 00:26:13, schrieb JeRRy: Obviously Michelle the instructions provided with the subject Re: list test subject was for Windows users. Not that hard to figure out! But thanks for your smart, i think, response.But if someone like to know, whether a list is aliveor not, he/she schould look into the List-Archive.I get every day 10-20 mails, asking is this list alive.And then I get 20-70 messages each day from people, whichdo not know how to unsubscribe... In that case maybe you should become 'admin' of the list. How to unsubscribe? Every emails I get from here has unsubscription details at the end of each email. ;) Some emails maybe delayed due to DNS issues global. One instance wasBizzar, never have seen this problem... germany, france,espagne, morocco, algeria, turkey, iran or afghanistan. Never? And how long have you used the net for? It happens quite often delays like such. Most recently IP's were a major issue than they upgraded how they operate to IP(something or rather) ... IP2 or something. Effected Web Hosts. I'm not quite clear exactly what all this was but my web host was down for a considerable time because of it and all my sites effected as people could not connect. Some were upgraded on the fly some sites were down for weeks or more. My web host was down for 11 days.Where do you live ? Australia!I know, that the USA are realy underdeveloped (Broadband,...) but broken DNS or such issues? Tests were ran with certain domains. Most domains failed in Washington area. But since these tests are not always accurate but I'd guess the problem lays within a hop or something there. But how would I know in Australia? Another is I tried to load http://www.getpaid2reademails.com/ and I can't access it but people elsewhere can. When I ran anonymous browsing it works. (another location)More bizzare!!! Not really. A person in Canada confirmed they were not able to view the above site for the passed 3 days. I can view it now. Another person in Americal could see it before but can't now despite the site being online and the server active. It happens quite often this occourence. This list seems to be working fine now, I just got a swag of emails sworming in all at once. But when I see the date/time emails were sent I see there is quite a delay in some hitting the inboxes.Maybe you should ask your ISP what happen... Why should I? Can't you see I am using Yahoo!? lol ... Nothing wrong with my ISP currently. As they don't feed my emails, they just feed the pages to check them. ;) But it's great to see people interested if the list is still ACTIVE... Rather than forgetting it exists if people don't get emails every so hours. The list has lovers.. :):-) I think there has been 2 emails stating is the list active lately. But none have confirmed www problems. Michelle, go back to your little box.Little Box ? That's what they call a linux (of some description) O/S machine, a box. JGreetingsMichelle J - Do you Yahoo!? Win a dream trip to Western Australia, courtesy of the NEW My Yahoo!
[PHP-DB] Re: list test subject
Obviously Michelle the instructions provided with the subject Re: list test subject was for Windows users. Not that hard to figure out! But thanks for your smart, i think, response. Some emails maybe delayed due to DNS issues global. One instance was I sent an email this morning to a server on the other side of the world to me. To this point it is not delivered nor have I got a response saying it bounced. I bet it arrives in the morning or sometime in the near future before the 3 days give up period some emails are given. Another is I tried to load http://www.getpaid2reademails.com/ and I can't access it but people elsewhere can. When I ran anonymous browsing it works. (another location) This list seems to be working fine now, I just got a swag of emails sworming in all at once. But when I see the date/time emails were sent I see there is quite a delay in some hitting the inboxes. But it's great to see people interested if the list is still ACTIVE... Rather than forgetting it exists if people don't get emails every so hours. The list has lovers.. :) Michelle, go back to your little box. J - Do you Yahoo!? Win a dream trip to Western Australia, courtesy of the NEW My Yahoo!
[PHP-DB] re: list test subject
Hi, This test is active but there is some global DNS access across the globe effecting alot of websites, emails, ftp, mailing lists, etc, etc. These problems are currently being attended to but no resolution period have been announced. Please be patient. I am sure once things are sorted access will continue as per-normal. ut for now you can try/read these to help at your end: https://www.interstar.com.au/StarNet/access_problems.asp http://www.lib.flinders.edu.au/resources/problemisps.html http://www.lib.flinders.edu.au/resources/accessprob.html Ignore the names on the sites in refrence as the majority ISP's are the same thse days. But you can try what they say. I found this to work: - Clearing my cache/history - Running a spyware program - Running a registry cleanup program - running scandisk - rebooting my pc Seems to fix problems under a temp. basis. If anyone else can bring light on this feel free to do so. Jerry message quota reached, message snipped - Do you Yahoo!? Win a dream trip to Western Australia, courtesy of the NEW My Yahoo!
[PHP-DB] Re: Integrated Authentication on IIS 6.0
Hi,I have an intranet application that I wrote in PHP that has worked greatfor a long time. It uses integrated authentication in IIS. I'm trying tomigrate to IIS 6 and things are mostly working. The problem I have isthat my ODBC_CONNECT calls are not resulting in: Login failed for user'(null)'. Reason: Not associated with a trusted SQL Server connection..What it seems to tell me is it is correctly trying to make an integratedauth connection to the database, but for some reason the current user'scredentials aren't being passed? Does anyone have insight into this?Thanks! Ryan How many times in the pass week has people been told that when they post to this list to post code with their question? Most people will reject to help without code displayed. But this problem could be a code or server error but no-one can pin-point it with 100% confidence without code sniplets or what you did. J - Find local movie times and trailers on Yahoo! Movies.
[PHP-DB] Connection Question!
Hi, Okay lets say I own www.fred.com (which I don't but still) and www.getpaid2reademails.com (so I own two domain, lucky me!) Now I want to connect from getpaid to fred... Okay I have done this and achieved this but is it possible to reject this operation and deny connections outside of localhost? Also if this is possible what IP is checked, the actual servers as localhost or the user (different IP)? I hope you understand what I mean, just wondering on stricter security. J - Find local movie times and trailers on Yahoo! Movies.
[PHP-DB] Re: chat
From:Patrick Dunegan [EMAIL PROTECTED]To:[EMAIL PROTECTED]:Sun, 1 May 2005 08:22:58 -0500Subject:chat Does anyone know where there is a good chat room with PHP developers? -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.11.0 - Release Date: 4/29/2005 There is a quite a few free ones but I don't believe any of the free ones are good, some you can customize and some you can't but customization is also poor. I suggest if you want a good one get someone to create you one, than you get what you want. Otherwise if you don't mind something that is similar to other sites go free and yucky! :P Up to you, if you need further info just shoot me an email directly. J - Find local movie times and trailers on Yahoo! Movies.
[PHP-DB] Why not ?
Why does this NOT work? UPDATE tipping SET score = 3 WHERE round1.game1 = H AND tipping.username = jerry; Please inform? J Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Why not ?
--- Larry E. Ullman [EMAIL PROTECTED] wrote: Why does this NOT work? UPDATE tipping SET score = 3 WHERE round1.game1 = H AND tipping.username = jerry; For starters, you should quote strings in a query. There may also be a problem with the round1 reference. Larry I was getting an error earlier stating round1 does not exist, however it does. round1 table does not exist. So does not say round1.game1 does not exist. But the table name exists. And I use the correct quotations, this does not effect it without it when i use other queries. I will keep trying... If anyone knows, shoot! :) J Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Re: Handling database calculations with a php page
Thankyou :) --- Bastien Koert [EMAIL PROTECTED] wrote: Yes, the 'a' value can also be a table alias name. Bastien From: JeRRy [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Re: Handling database calculations with a php page Date: Mon, 14 Mar 2005 19:46:46 +1100 (EST) Hi, So in other words when we are talking queries anything before a . for SELECT etc means table name and after the . means column name within that table? So... (table_name).(Column_name) ? Is that right? J Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Handling database calculations with a php page
Hi, So in other words when we are talking queries anything before a . for SELECT etc means table name and after the . means column name within that table? So... (table_name).(Column_name) ? Is that right? J Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Handling database calculations with a php page
Hello, 3 tables hold money value but they are inputed into the database without the dollar symbol (without $). So the value could be 3.00 etc... I want to calculate by adding (+) them together. A username is in each table. So only the username matching in each table must calculate. So if in table 1 username Chris has 3.00 and in table 2 Chris has 5.00 we need to add the two together. If you value equals 0 or NULL or blank it should either a) ignore it or b) add it as a zero. What is the best PHP code to use for this inside a PHP code? Thanks! Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re:data grabbing and mathematics!
Okay I have this: snip $sql = UPDATE round . ($round_number -1) . SET score=score+1 WHERE $select='$winner'; /snip Which works as it should. Now after all that is completed how is the best way to retrieve the nickname and the score in that round and update another table? Okay two tables, one is round5 (for instance) and the other is tipping. So round5 table: Nickname: Score: Bob 5 Bill 4 Fred 3 So I want to grab each nicknames score and UPDATE the tipping table. tipping table: Nickname:Score: Bob 24 Bill 31 Fred 30 So we need to add 5 for bob and 4 for bill and 3 for fred on top of their current score. So for instance Bob would go to 29. What is the best way to do this? I need the nicknames round score to update their total score and be reliable to update the right nickname. This would solve a bit of my time mucking around and re-structuring my database until I have more time. :) If you need more information please let me know. Jerry Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] data grabbing and mathematics!
Hi, I have 23 tables, well I have more but these 23 tables are the main agenda regarding this question. In each of the table is a column titled score and a column titled nickname ... These are the two columns we need for this. Now lets throw a few names so you understand my needs. Lets say Bob, Bill and Barry are the nickname's ... Nickname: Score: Bob5 Bill 3 Barry 7 Okay lets say this is in a table titled 1. Now in table titled 2 Bob 3 Bill 4 Barry6 Now I want the scores added up. So using the + not * (times) but just adding. So for Bob is 5 + 3 = 8 and this figure must than be placed in another table with that name. What I want to do is just have one code written up so I don't need to change it. So in other words the code would include all 22 tables and the method to add each other together and update to the actual main scoring table. So the score aRE updated once a week. I don't mind if I need to trigger the update (preffered) from a php page/script. That's not the problem but I want to know what code I would use to grab these details and add them up using all 22 tables in the one script. So each time the script is ran it will re-calculate all tables to make sure they are correct if an update is made to a score. So the script would grab all 22 tables score and nickname and than match the nickname and update their score in the scoring table. What I have is this: My Tables are round 1 through to round22 and the scoring totals go into table called tipping. So round1 through to 22 need to be calculated and keeping the totals for each nickname correct with their totals. Don't want the scores to be jumbled with a different nickname. How would I do this that would be a pretty fast process and reliable? If you need more information please let me know. Each round table will have identical Nicknames in each, none will have more or few, same amount. Keeping in mind each round that has not had a total set is defaulted as nothing in the score field, it's blank. But if it's required to have a value of 0 in there for the calculations to work I can default this in. If anyone can help me here it would be great, I have been stuck on this for a while. There is only going to be like 15 names max in each round to do totals for so it's not a huge database. Thanks for your time. Jerry Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] data grabbing and mathematics!
Hi, I have 23 tables, well I have more but these 23 tables are the main agenda regarding this question. In each of the table is a column titled score and a column titled nickname ... These are the two columns we need for this. Now lets throw a few names so you understand my needs. Lets say Bob, Bill and Barry are the nickname's ... Nickname: Score: Bob5 Bill 3 Barry 7 Okay lets say this is in a table titled 1. Now in table titled 2 Bob 3 Bill 4 Barry6 Now I want the scores added up. So using the + not * (times) but just adding. So for Bob is 5 + 3 = 8 and this figure must than be placed in another table with that name. What I want to do is just have one code written up so I don't need to change it. So in other words the code would include all 22 tables and the method to add each other together and update to the actual main scoring table. So the score aRE updated once a week. I don't mind if I need to trigger the update (preffered) from a php page/script. That's not the problem but I want to know what code I would use to grab these details and add them up using all 22 tables in the one script. So each time the script is ran it will re-calculate all tables to make sure they are correct if an update is made to a score. So the script would grab all 22 tables score and nickname and than match the nickname and update their score in the scoring table. What I have is this: My Tables are round 1 through to round22 and the scoring totals go into table called tipping. So round1 through to 22 need to be calculated and keeping the totals for each nickname correct with their totals. Don't want the scores to be jumbled with a different nickname. How would I do this that would be a pretty fast process and reliable? If you need more information please let me know. Each round table will have identical Nicknames in each, none will have more or few, same amount. Keeping in mind each round that has not had a total set is defaulted as nothing in the score field, it's blank. But if it's required to have a value of 0 in there for the calculations to work I can default this in. If anyone can help me here it would be great, I have been stuck on this for a while. There is only going to be like 15 names max in each round to do totals for so it's not a huge database. Thanks for your time. Jerry Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: 'Page can not be displayed' when hitting the back button
Hi, Here you go, more info on your posting: session_cache_limiter (PHP 4 = 4.0.3, PHP 5) session_cache_limiter -- Get and/or set the current cache limiter Description string session_cache_limiter ( [string cache_limiter] ) session_cache_limiter() returns the name of the current cache limiter. If cache_limiter is specified, the name of the current cache limiter is changed to the new value. The cache limiter defines which cache control HTTP headers are sent to the client. These headers determine the rules by which the page content may be cached by the client and intermediate proxies. Setting the cache limiter to nocache disallows any client/proxy caching. A value of public permits caching by proxies and the client, whereas private disallows caching by proxies and permits the client to cache the contents. In private mode, the Expire header sent to the client may cause confusion for some browsers, including Mozilla. You can avoid this problem by using private_no_expire mode. The expire header is never sent to the client in this mode. Note: private_no_expire was added in PHP 4.2.0. The cache limiter is reset to the default value stored in session.cache_limiter at request startup time. Thus, you need to call session_cache_limiter() for every request (and before session_start() is called). Example 1. session_cache_limiter() example ?php /* set the cache limiter to 'private' */ session_cache_limiter('private'); $cache_limiter = session_cache_limiter(); echo The cache limiter is now set to $cache_limiterbr /; ? Also see the session.cache_limiter configuration directive. Take a look at these links: http://au2.php.net/manual/en/ref.session.php#ini.session.cache-limiter http://au2.php.net/manual/en/function.session-start.php http://au2.php.net/manual/en/function.session-cache-limiter.php Jerry From: Jason Walker [EMAIL PROTECTED] To: php-db@lists.php.net Date: Sun, 13 Feb 2005 19:17:15 -0700 Subject: 'Page can not be displayed' when hitting the back button I have a shopping cart that is working completely fine in Firefox. In I.E., I can not get the page to display when hitting the back button. This may not necessarily be a PHP problem, but since moving to PHP session variables and not cookies, this error has popped up. In Firefox, I get the POST DATA message stating that post data has already been sent, blah blah blah. In IE, I get the Page Can Not Be Display. I am just curious if anyone else has come across this and if they found a solution/cause. Thanks. Jason Walker Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Newbie Setup Trouble
To: php-db@lists.php.net From: Mike Rondeau [EMAIL PROTECTED] Date: Sun, 6 Feb 2005 17:57:17 -0800 Subject: Newbie Setup Trouble Hello, Hi :) I have just begun study of using PHP, MySQL and Apache server. Right now I'm following a book, PHP and MySQL For Dummies and am having trouble already. I must be a REAL dummy! That is where your wrong in my opinion, only dummies would understand that book, smart people would NOT understand it. So your the smart one. :) I have installed all 3 programs but something is not right somewhere. Your not a dummy if you know there is something wrong, somewhere. ;) (seriously) Being so new to this I am having a real time trying to figure out which program is messed up. We all learn and start somewhere. ;) Certain things work, but others don't. Reminds me of Windows! ;) For instance, my book told me how to make a phpinfo.php page, which works fine. Your phpinfo() is working. YAY! But it also tells me to create some other pages to test if PHP and MySQL are working or not. I followed the scripts provided exactly but keep getting syntax errors, even though the script is just what the authors wrote. Yes depends on PHP version, mysql version to start with, some are different and also can depend on linux type/version if things work or not exactly as they are written. For instance, it said to make a page and call it mysql_up.php. Here's the script for it: Lets see! html headtitleTest MySQL/title/head body !-- mysql_up.php -- ?php $host=localhost; $user=blablablabla; $password=blablabla; mysql_connect($host,$user,$password); $sql=show status; $result = mysql_query($sql); if ($result == 0) { echo bError . mysql_errno() . : . mysql_error() . /b; } else { ? !-- Table that displays the results -- table border=1 trtdbVariable_name/b/tdtdbValue/b /td/tr ?php for ($i = 0; $i mysql_num_rows($result); $i++) { echo TR; $row_array = mysql_fetch_row($result); for ($j = 0; $j mysql_num_fields($result); $j++) { echo TD . $row_array[$j] . /td; } echo /tr; } ? /table ?php } ? /body/html But when I open it in my browser I get this error: Fatal error: Call to undefined function mysql_connect() in C:\Program Files\Apache Group\Apache2\htdocs\mysql_up.php on line 10 Could anyone of you smart people point me in the right direction? I'd be pulling my hair out if I had any left :) First off is the database name and password created as the code says? You need to create the connection to the database as a username before php can use it. I can't make any progress with this study until I know my 3 programs are talking to eachother properly, but my book gives no info on this error. Thanks a millionfold for any advice, and I appologise for the length of this post. Sincerely, Mike Rondeau That's a starting point.. http://mysql.net Search : Creating a User Account ...Reveals how to... Than Search : Connection String or Creating a Connection String ...Reveals how to... Experiment with the site and or http://mysql.com and http://php.net with the search terms above. If it relates to database be on mysql site and if it relates to using php to use mysql look on php site. Learn to use the site with the search, instead of us posting URL's here for you as shortcuts and you not learning how to use the site I suggest you try the site and if problems occour mail us. :) I hope this helps somewhat and points you into the right direction. J Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Warning: ocilogon(): _oci_open_server: â in d:\program files\apachegroup\apache\htdocs\codebase\oci8test2.php on line 3
snip I am getting the error below while trying to execute the code below: Warning: ocilogon(): _oci_open_server: â in d:\program files\apache group\apache\htdocs\codebase\oci8test2.php on line 3 /snip Aha line 3. Open oci8test2.php in notepad or something and browse to line three. Hit your down arrow twice. ;) snip ?php $c=OCILogon(scott,tiger); /* if ($c=OCILogon(scott, tiger, orcl)) { echo Successfully connected to Oracle.\n; OCILogoff($c); } else { $err = OCIError(); echo Oracle Connect Error . $err[text]; } */ ? /snip Okay lets read the error: Warning: ocilogon(): _oci_open_server: â in d:\program files\apache group\apache\htdocs\codebase\oci8test2.php on line 3 so ocilogon is producing some sort of error, it kindly gives us the line number to make it easier to find. :) Sometimes helpful but not always if you have alot of includes in it. ;) So I'd say it's this part the error is: if ($c=OCILogon(scott, tiger, orcl)) { First off have you created a dataabse called Orcl with username scott and password tiger? I doubt this is your problem though. I see an error though in your code. But let me continue... snip I followed the note below to set it up. http://www.oracle.com/technology/tech/opensource/php/apache/inst_php_apache_windows.html Any help on this will be greatly appreciated. /snip How have you followed it exactly? You have changed refrences in it, why? Are you using another thing inline with this? If your learining you should copy the instructions as they are until you know what your doing, obvious your knowledge is lacking and you require more learning time. I suggest you not fiddle to much with the code(s) until you get a good foot holding understanding. I suggest you start over. Copy the instructions as they say and I am sure you will get the thing to work, than start playing and asking questions. But instead of pointing out the obvious here and you not totally understanding start from scratch and i am sure you will understand what is goin on when you make the changes and the error reproduces. That's my suggestion! Jerry php-db@lists.php.net Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Auto Responses?
I do support you too, Jerry. People should either somehow exclude 'php-db'/other mailing lists to be auto-replied to or they must keep off their auto-replies with themselves. Yes most mail systems allows you to exclude certain domains from getting a auto response. Or if they own their own server they can do the same. Imagine half the mailing list people setting a auto reply, our mailboxes would be out of control. If one does it and gets away with it more will follow. I classify ANY auto response that has no realy meaning, eg out of office is SPAM! Different if your signing up for a subscription a auto message sends password and all that is a different story. But for this mailing list setting a auto response for the domains lists.php.net should not be allowed. Its quite stupid recieving emails saying I am out of office when we are waiting for more urgent things. Correct, my dog barking in the back yard is more urgent than that sort of message. Hence I don't have a dog, I don't think! Regards, Samar M. J Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Is this possible?
Let me explain this a bit better, or try to. ;) Let's say I have some code on MY SERVER. I will call it MYSERVER and an outside server outside my local area OUTSIDESERVER. Now I have PHP on MYSERVER to connect to a database on an OUTSIDESERVER and once establish do a few updates/deletes etc. Now the database names, passwords etc will be stored on MYSERVER which uses input themself to save. Now is this method security safe and possible or are most servers setup to a DB connection can only be made by localhost? J Date: Sun, 23 Jan 2005 15:51:02 +1100 (EST) From: JeRRy [EMAIL PROTECTED] To: php-db@lists.php.net Subject: Is this possible? Hi, Is it security safe and possible to use my server to query another server, outside the local zone, and make updates to another server using a PHP page from my server? I'm just wondering. So in other words I'd have a DB setup to hold users domains, db names, db usernames, db passwords etc on mine and run PHP code query their own on their server. I wanna do this to run a program I am working on and wanna keep the code on my server rather than handing it out to people to freely use. Again the question is, is it security safe and possible. :) J Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Is this possible?
Hi, Is it security safe and possible to use my server to query another server, outside the local zone, and make updates to another server using a PHP page from my server? I'm just wondering. So in other words I'd have a DB setup to hold users domains, db names, db usernames, db passwords etc on mine and run PHP code query their own on their server. I wanna do this to run a program I am working on and wanna keep the code on my server rather than handing it out to people to freely use. Again the question is, is it security safe and possible. :) J Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Is this possible?
Hi, Is it security safe and possible to use my server to query another server, outside the local zone, and make updates to another server using a PHP page from my server? I'm just wondering. So in other words I'd have a DB setup to hold users domains, db names, db usernames, db passwords etc on mine and run PHP code query their own on their server. I wanna do this to run a program I am working on and wanna keep the code on my server rather than handing it out to people to freely use. Again the question is, is it security safe and possible. :) J Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Auto Responses?
Why do people set auto responses on a mailing list like this? It's crazy, imagine all the auto replies this list would generate. As if I care if a user is not able to reply because they have gone on holidays or something. If they don't reply obviously they are not around or can't answer or don't want to. That's fine, but I don't care if your away but I do care a stupid auto response is setup. It's worse than general spam!!! J Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Using a PHP script/query in flash (?)
Hi, Is it possible to use a PHP script/query in flash? Just wondering... I have setup some flash on my site. Wanted to know if I can throw in some PHP in the flash and if so is it easy ? What I want to add in the flash is some stats dragged off a mysql database to appear inside the flash to spice it up a bit. :) Thanks for your time. If you have time to demonstrate something that would be good too coz I have made flash but have no idea on this topic. Jerry Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Adding Up MySQL Results
snip I run this mysql query: select sum(quantity)*price,price from sale where dvd_id=1 group by price; I get this result: sum(quantity)*price price 450.00 15.00 29.99 29.99 I want to display the sum of the values in the first column (450.00+29.99), but I cannot figure out how to do this! Can someone clue me in? /snip ?php // Multiplying with varaibles $factorA = number_format(system_value('sum'); $factorB = number_format(system_value('price'), 0); $product = $factorA + $factorB; echo $product; ? Something like that? You'll have to obviously play with this to make it work for you. But calculations work like your Windows Calculator number keypad. + = plus - = minus * = multiply etc... Look at these: http://au.php.net/manual/en/function.number-format.php http://au.php.net/round J Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] php latest release!
With PHP latest release from http://php.net/ do we require to update Zend Optimizer? People are claiming some scripts previously that worked in a previous version of PHP works and not with the new version. Why is it required to update Zend? J Find local movie times and trailers on Yahoo! Movies. http://au.movies.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php