[PHP] no php archives?
I can't get to the php archives... every time i try a search of the mailing list, I get nothing... :-( -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] php4apache.dll please !!!!
hi guys , could you tell me please , Where I can find the php4apache.dll ? Thanks , Ricardo
[PHP] php in free()
I'm running a script that times out durring a certian action. Fatal error: Maximum execution time of 30 seconds exceeded in /usr/local/web/htdocs/mail/functions.php on line 1200 The error logs say: php in free(): warning: recursive call. The offending lines of code, and here's what really gets me, is a simple while(): while(!feof($socket)){ $data .= fgets($socket, 1024); } Which is just reading data from an SMTP socket. I haven't been able to find any information about this php in free() error. Any ideas? Thanks! dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] WebServer
Dear Members , Does anybody of you have a webserver at home using ADSL or other connections ? If any , could you tell me What would be the acceptable Hardware to run 5 or more sites at home with an 256 k ADSL ? (Memory , proccesor , etc etc ) Do I have to have Two Servers ? (The WebServer ) and the Intranet Server to access through my computer ? Would you help me please in a near future with a few questions about how to set up and so on .??? Thanks guys in advance Ricardo
[PHP] Control Panel , Webmin or similar Written in PHP
Hi guys , I was Wondering if it would be possible to write a proyect like Control Panel or WebMin (both are in Perl ) using PHP instead or PERL ? Would it be possible ? PHP has the power and flexibility like Perl to write TRUE Systems programs that could be able to manage all the aspects related to System Administration ?? If there any proyect I would like to hear about it and join it . Thanks , I would like your opinion about this topic . Ger Karcher
[PHP] Control Panel , Webmin or similar Written in PHP
Hi guys , I was Wondering if it would be possible to write a proyect like Control Panel , WebMin (both are in Perl ) using PHP instead of PERL ? Would it be possible ? PHP has the power and flexibility like Perl to write TRUE Systems programs that could be able to manage all the aspects related to System Administration ?? If there any proyect I would like to hear about it and join it . Thanks , I would like your opinion about this topic . Ger Karcher
[PHP] Apache and PHP under win98 help !
hi guys , I have a problem with my Apache and PHP configuration under win 98 . I can't make it works.. This is my httpd lines pointing to php : LoadModule php4_module c:\php\dlls\php4apache.dll AddType application/x-httpd-php .php4 ScriptAlias /php4/ C:/php/ Action application/x-httpd-php4 /php/php.exe AddType application/x-httpd-php4 .php I had this configuration before and all works fine , but now When I try to run Apache for the first time , Its tell me that he can't find the php4apache.dll library . but the library is there.??!!! , next I change the path to point to sapi directory where the library also exists , but I get the same error .. The most amazing part is that when I browse the directory I can't see the file ! but when I try to copy the file inside the directory its tells me that the file already exists ! so , What's happend ? Somebody could help me ?? thanks in advance , guys Ricardo Karcher
[PHP] Package Ready to Install !!!
Hi guys , I would like to know if there any package ready to install with Apache , Mysql and PHP4 under Windows ??? I time ago I think , I saw such a package but I don't remenber the address or the link to the web site . If any of you know something I'll be looking forward to hear from you guys . Thanks in Advance , Ricardo Karcher
[PHP] ImageMagick and Convert In Php
Hello All, Ok , I am about to loose my mind... this list is my last option i think :) this is what i have tried : system(convert -pen black -draw 'text 120,60 YourText Here' imageA.jpg imageB.jpg); The above does not work , the most i can get it imageA.jpg Becomes imageB.jpg but the text does not get drawn I striped the slashes, this does not work either, i su - to what my webserver runs on to see if i can run the system command via console, it works just fine , so i tried : $a = escapeshellcmd('-pen black -draw'); $b = escapeshellarg('text 120,20 YourTextHere); $c = escapeshellcmd(test.jpg doggy.jpg); system(convert $a $b $c); Same as the above, imageA becomes imageB and thats it. Permissions for testing are -rwxrwxrwx a basic test with system(convert -scale 500x600 imageA.jpg imageB.jpg); = Works Perfect I am sorry for coming to the list for help , but i am at a final loss, i have also tried shell_exec and exec to clear anything up. I have hit the imagemagick mail list and i got Php Might have some issues so if anyone can lend a hand to get that system command to work , i would be most appreciative. Best Wishes Rick Wilson
[PHP] Uploading files with HTTP-Upload
We have an application that used PHP's FTP function to upload files. Now it worked until we upgraded to 4.1.2. We have now downgraded back to 4.1.1 but still no luck, it won't work. We have set upload_max_filesize and post_max_size as well, and that doesn't seem to help. Here is the following code. It has not changed since it went live: srand((double)microtime()*100); //Create random timestamp for the file temp file $randval = rand(); //Creates a temp file that the file gets put in, we then read that file $tmpfile = /tmp/ . $file_name . $randval; copy($file,$tmpfile);//line 272 ftp_put($this-connection,$file_name,$tmpfile,FTP_BINARY); //line 273 unlink($tmpfile); return true; This is inside a function, and $file is the handle for the uploaded file and $file_name is the name of the uploaded file. The weird thing is that this will work for small files ( 1MB). Anything bigger, it gives us the following errors: Warning: Unable to open 'none' for reading: No such file or directory in /Ftp.inc on line 272 Warning: error opening /tmp/IP4_0EngALLMsi.exe1419195771 in /Ftp.inc on line 273 Any ideas? It seems as if the big files are not getting passed in? Thanks, /rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HTTP_Upload with PHP
We have an application that used PHP's FTP function to upload files. Now it worked until we upgraded to 4.1.2. We have now downgraded back to 4.1.1 but still no luck, it won't work. We have set upload_max_filesize and post_max_size as well, and that doesn't seem to help. Here is the following code. It has not changed since it went live: srand((double)microtime()*100); //Create random timestamp for the file temp file $randval = rand(); //Creates a temp file that the file gets put in, we then read that file $tmpfile = /tmp/ . $file_name . $randval; copy($file,$tmpfile);//line 272 ftp_put($this-connection,$file_name,$tmpfile,FTP_BINARY); //line 273 unlink($tmpfile); return true; This is inside a function, and $file is the handle for the uploaded file and $file_name is the name of the uploaded file. The weird thing is that this will work for small files ( 1MB). Anything bigger, it gives us the following errors: Warning: Unable to open 'none' for reading: No such file or directory in /Ftp.inc on line 272 Warning: error opening /tmp/IP4_0EngALLMsi.exe1419195771 in /Ftp.inc on line 273 Any ideas? It seems as if the big files are not getting passed in? Thanks, /rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] new lines in text fields
Have you tried putting the newline character (\n) into your html? That works great for me. My only problem is that the output from an XSL transformation has all the line breaks stripped out... - Original Message - From: Mat Marlow [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 06, 2001 8:06 AM Subject: [PHP] new lines in text fields Hi all, I am in desperate need for a solution to HTML text fields not storing new lines. I'm storing news articles in a database but all the text just ends up in a big block because it ignores line breaks. Is thre a way around this without having to upload text files? Thanks, Mat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] functions?
instead of returning that line, put it into some variable... like: while ($row = mysql_fetch_row ($result)) { $map_list .= a href='viewonly.php3?mapid=$row[1]'$row[0]/abr; } } return $map_list; - Original Message - From: [EMAIL PROTECTED] To: 'Php-General (E-Mail) [EMAIL PROTECTED] Sent: Friday, July 06, 1979 8:27 AM Subject: [PHP] functions? Okay there is a file called global.inc ?php // display a list from the DB function list_of_maps () { db_connect (); $sql = SELECT mapname,rowid FROM maps; $result = mysql_query($sql); while ($row = mysql_fetch_row ($result)) { return a href='viewonly.php3?mapid=$row[1]'$row[0]/abr; } } ? But when I call it like this: ?php include('global.inc'); echo list_of_maps (); ? It only shows the first result from the db... How do I get it to list them all? Susan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Next Book
I started off with a Core PHP4 book and quickly outgrew it. I find that most of the books don't get much past the basics either, so I find myself sticking to www.php.net and it's wonderful searchable documentation. I have read Web Application Development with PHP4.0 (http://www.phpwizard.net), which I enjoyed. While it does go into some more advanced PHP syntax, it mostly discusses application development concepts -- stuff that would be boring for any experienced programmer of other languages. I think it's geared at the people who picked PHP up as their first language (me included). I'd be interested in some good PHP books as well, I feel like I'm in a rut. At first, PHP was all new, and I was learning s much... but now if I think up a task I can visualize how to do it in PHP pretty easily. I know I have a LOT to learn, but I think my problem is I don't know proper programming techniques... Has anyone tried to expand into other languages? I like perl due to its heavy similarity to PHP, but I like to focus on web stuff. rick - Original Message - From: Chris Lott [EMAIL PROTECTED] To: Php-General (E-mail) [EMAIL PROTECTED] Sent: Saturday, July 07, 2001 11:23 PM Subject: [PHP] Next Book Finished with Beginning PHP from Wrox. Am eyeing Advanced PHP from Wrox. Other good books I should think about? Recommendations? Reviews? I know the PHP FAQ has pointers to books, but I am looking for recommendations on what I SHOULD get as I transition from a Cold Fusion person to a PHP devotee :) Also looking for a good book on MySQL. The MySQL/MSQL book from O'Reilly is pretty dated. c -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP analytics
Hello I am new to php and I would like some guidance from those who have a bit more expereince with PHP I will be attempting to do a bit of tracking and web analytics. Basically, the user will login and from there everything that he clicked will be recorded in a database and analyzed i.e user behaviour, patterns with different user groups. Is this possible with php and it is a major undertaking ? just trying not to get ahead of myself here.. are there any tutorials or scripts or books that you know of ? Thanks Regards Rick
[PHP] str_replace
How could this be written better? Is there a way to do it all in 1 line? $file = str_replace( , , $file); $file = str_replace(', , $file); $file = str_replace(\\, , $file); $file = str_replace(/, , $file); $file = str_replace(:, , $file); $file = str_replace(+, , $file); $file = str_replace(, , $file); $file = str_replace(=, , $file); $file = str_replace(, , $file); $file = str_replace(%, , $file); $file = str_replace(^, , $file); $file = str_replace(*, , $file); $file = str_replace(~, , $file); $file = str_replace(`, , $file); $file = str_replace(;, , $file); $file = str_replace(|, , $file); $file = str_replace({, , $file); $file = str_replace(}, , $file); $file = str_replace([, , $file); $file = str_replace(], , $file); $file = str_replace(%, , $file); $file = str_replace(?, , $file); $file = str_replace((, , $file); $file = str_replace(), , $file); $file = str_replace(#, , $file); Thanks! :) ..rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() problem
Hi All, Does anyone know a good format for sending email using the mail() function that doesnt get stopped by antispam software? I need to send and email from my sever when a new member creates an account, this ive done but my email gets binned straight away? must be the headers? Regards Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] logging page views, which method is better????
And the answer about merging logs for webalizer is: Is there a way to create a combined report showing hits to a number of separate servers all handling the same web sites. I am guessing all you have to do is feed it each of the log files in turn, and make sure you don't duplicate them. I think it requires not using incremental mode, but I hope you know for sure. I am in the process of recommending it on the php-general mailing list. Q: I have multiple load-balanced servers (or I'm using DNS round-robin to accoplish the same thing) and I want to generate one webalizer report for the whole farm, but each server generates its own log file. When I run webalizer on each of the logfiles in turn, it ignores a lot of the records because it thinks they're out of order! A: You need to merge all of the logfiles together so that webalizer sees the records in chronological order. One good way to do that on the fly is with mergelog (http://mergelog.sourceforge.net/), a quick common logfile sorter. An example: mergelog server1.log server2.log server3.log | webalizer -- Bradford L. Barrett [EMAIL PROTECTED] A free electron in a sea of neutrons DoD#1750 KD4NAW The only thing Micro$oft has done for society, is make people believe that computers are inherently unreliable. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Running a php script at a giveb time
Shimon Dekel [EMAIL PROTECTED] wrote in message 2B851D414E69D411923000D0B789259A0697@EXCHANGE">news:2B851D414E69D411923000D0B789259A0697@EXCHANGE... Jeremy Brant wrote: In case you didn't know, you can run PHP scripts without a web server. Thanks but... Can you do this on NT (Sorry) as well? I am using NT with MySQL in the CGI configuration. Shimon The pre-compiled binaries package of PHP for Windows includes the stand-alone CGI program, php.exe. You just need to find use the WindowsNT scheduling system and tell it to either run php.exe directly, or make up batch files to do the job. -- Rick Hodger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] WML/WAP and PHP
Here's a fun little thing I discovered, possibly a bug in PHP itself? To output a WAP page you must output a content-type header else the phone's browser won't recognise the page. Dead simple. Use: header("Content-type: text/vnd.wap.wml"); And all is well and good as long as you use echo/printf etc to output your page. The second you deviate out of PHP and back to HTML the content-type gets overwritten with a text/html, and so the page doesn't work. ASP used to be able to cope with this, is it a bug or something I'm doing wrong? -- Rick Hodger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] WML/WAP and PHP
"Pavel Kalian" [EMAIL PROTECTED] wrote in message 028e01c07fc1$dffdecf0$8361d4c2@pavelk">news:028e01c07fc1$dffdecf0$8361d4c2@pavelk... Hi Rick, you are not doing anything wrong. You just have to send the proper content-type depending on what you're outputing. For example if you want to produce a gif image you have to use header("Content-type: image/gif"); There's nothing wrong with it as PHP can't predict what you want to do. text/html is set as default simply because it's the type most users in most cases need. Yes, I know that. But what I'm saying is that eg. ?php header("Content-type: text/vnd.wap.wml"); ? wml card pHello world!/p /card /wml ...gets put out with a text/html content type as opposed to the specified text/vnd.wap.wml. Having said that, I just tried it on the linux machine and it worked fine. A Windows thing? -- Rick Hodger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: [phplib] problems ie suggestions
I found the following problems or suggestions with phplib version 7.2c This will get rid of errors un text which has no javascript associated with it diff /usr/rickster/stuff/phplib-7.2c/php/of_text.inc /home/httpd/html/php/of_text.inc 66c66,67 --- if (!isset($ndx_array)) // added by me get rid of warning messages return; // get out if no javascript? Suggestions: in auth I added a check to make sure the ip address of the person coming in is the same ip he logged on with. Not a 100% but is another check. 156a181 $this-auth["ip"]=$REMOTE_ADDR; 161a187 $this-auth["ip"]=$REMOTE_ADDR; 170a197 $this-auth["ip"]=$REMOTE_ADDR; 176a204 $this-auth["ip"]=$REMOTE_ADDR; 214c242 --- $this-auth["ip"]=0; 234c262,266 0; 234c262,266 global $REMOTE_ADDR; if ( $REMOTE_ADDR==$this-auth["ip"] In Page I added a line to make sure netscape or windoze ddoesn't cache diff /usr/rickster/stuff/phplib-7.2c/php/page.inc /home/httpd/html/php/page.inc 14c14 --- 15a16,18 #printf("sess is %sbr",$feature["sess"]); header("Pragma: no-cache"); header("Cache-Control: no-cache, must-revalidate"); This one line took me soo many hours troubleshooting . Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] best user authentication method?
Miles Thompson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... IIS I'm not familiar with, and Apache has a native scheme involving .htaccess. If you want a portable authentication method, I'd recommend authenticating against a list of users/passwords contained in a database. Using MySQL, PostgreSQL or Interbase would keep your database platform neutral, and low cost. Here's code picked up from a Rasmus Lerdorf article which authenticates against a MySQL database, there are variations on this everywhere. I put this in a file called auth.inc, and then the top of every page which requires authentication simply includes "auth.inc". cut ? require( "dbname.inc" ); [SNIP] Better yet, as this *is* supposed to be secure, call your files .php as opposed to .inc. I have seen this far too many times to count now, and it's a massive developer induced security hole. If you name your files .inc, 99% of webservers, if asked for a .inc file will pass it straight through as plain textthus exposing usernames, passwords, possible bugs in your code and god knows what else. If you name it .php, it gets parsed as a PHP script, and so no output. -- Rick Hodger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Downloads, headers and binary data
"Juan Germano" [EMAIL PROTECTED] wrote in message 004b01c081f3$46be8160$ddf90dd1@juangerm">news:004b01c081f3$46be8160$ddf90dd1@juangerm... Hi. I'm trying to write a script to download a mp3 file. I did this: $filesize=filesize($filename); header("Content-disposition: attachment;filename=".basename($filename)); header("Content-type: application/octetstream"); header("Content-Transfer-Encoding: binary"); header("Pragma: no-cache"); header("Expires: 0"); header("Content-Length: $filesize"); readfile($filename,$filesize); I began with the first two headers but the problem is that the script works fine with text files but I get shorter files than the originals with mp3s, so I added the rest trying to solve the problem. So I tryied $fp=fopen($filename,"r"); fread($fp,filesize($filename)); fclose($fp); Try this, only change your fread line like so: echo fread($fp,filesize($filename)); I have to do this to put out an image with a image/vnd.wap.wbmp header, and it works for me. -- Rick Hodger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] charactor problem
im trying to build an array from an entry in a file and im having some trouble with it. in a file i have a line similar to: 1234 hello 123456 12345678 I grab this line and try to make it an array like this: $var1 = trim($thelinefromfile); $var2 = split(" ", $thelinefromfile); $count = count($var2); $count comes out to equal 1 so, it doesnt actually see each space as the seperator therefore it sees it as one field.. Ive also tried split("\ ", $thelinefromfile); but, that doesnt work either... ive tried ereg_replace($space, $commathenspace, $thelinefromfile); that also does not seem to work Please help... Thanks in advance Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Sybase
Can someone give me an example of a simple sybase query page? here is what i have: ? $server = "someserver"; $user = "sybuser"; $pass = "sybpass"; $query = "select * from SomeSillyTable where ThatSillyGuy='me'"; sybase_connect ($server, $user, $pass); sybase_query ($query); sybase_close (); ? Here is what I get: Warning: -1 is not a Sybase link index in /www/smurfy/include/clumpysql.php on line 7 Warning: -1 is not a Sybase link index in /www/smurfy/include/clumpysql.php on line 8 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] files with html extension
Hi, Is is possible to use the php script tags in files with an html extension? I'm running 4.0.4pl1 and apache 1.3.12 on OpenBSD 2.8. Thanks, Rick VanNorman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] files with html extension
On 3/20/2001 at 12:29 PM Jack Dempsey wrote: You can tell apache to have the php interpreter parse files with an html extension, thereby letting you use the tags in html files...whether this is a good solution or not is another question.that would mean that each file would get parsedwhy are you trying to do this? To be able to include php code in otherwise full html files; most especially to allow me to do it without having to change the name of every file and fix every href in the entire site. So, exactly how do I tell apache to do this? Thanks, Rick 1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] files with html extension
This is the best idea I've heard/read yet. Thanks Jeff! Rick VanNorman *** REPLY SEPARATOR *** On 3/20/2001 at 6:49 PM Jeff Armstrong wrote: This is exactly why http://www.w3.org recommend that you DONT SPECIFY A FILE TYPE TYPE in your HREFs. Cool URIs Dont change - http://www.w3.org/Provider/Style/URI Good!! A HREF=/somepage Some Page!/A NOT good! A HREF=/somepage.html Some Page!/A ^ Let the server decide which page to dish. Then it's easy peasy to replace xxx.html with xxx.php or even xxx.my_new_language_of_the_moment. }; e -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] RE: [PHP-DB] php+mysql simple query help me pls! ty.
Test the mysql_query() return value: $result = mysql_query(SELECT * FROM members) or die(Error:.mysql_error()); there may be an error in your query. -Original Message- From: louie miranda [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 03, 2002 1:59 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: [PHP-DB] php+mysql simple query help me pls! ty. Hi, can someone help me here! :( I can't query the data on my sql from php. db is fine, i couldnt see the prob in php! pls help, ty. # MSQL ### mysql desc members; +--+-+--+-+-++ | Field| Type| Null | Key | Default | Extra | +--+-+--+-+-++ | id | tinyint(5) | | PRI | NULL| auto_increment | | ircname | varchar(30) | YES | | NULL|| | email| varchar(30) | YES | | NULL|| | realname | varchar(40) | YES | | NULL|| | asl | varchar(30) | YES | | NULL|| | info | varchar(70) | YES | | NULL|| +--+-+--+-+-++ # PHP html body ?php $db = mysql_connect(my_db_host, my_db_user, my_db_pass) or die(Could not connect); mysql_select_db(mydb,$db); $result = mysql_query(SELECT * FROM members,$db); printf(ircname: %sbrn, mysql_result($result,0,ircname)); printf(email: %sbrn, mysql_result($result,0,email)); printf(realname: %sbrn, mysql_result($result,0,realname)); printf(asl: %sbrn, mysql_result($result,0,asl)); printf(info: %sbrn, mysql_result($result,0,info)); ? /body /html # ERROR Warning: Supplied argument is not a valid MySQL result resource in /mnt/host-users/cavite/irc/members/t2.php on line 13 ircname: n Warning: Supplied argument is not a valid MySQL result resource in /mnt/host-users/cavite/irc/members/t2.php on line 14 email: n Warning: Supplied argument is not a valid MySQL result resource in /mnt/host-users/cavite/irc/members/t2.php on line 15 realname: n Warning: Supplied argument is not a valid MySQL result resource in /mnt/host-users/cavite/irc/members/t2.php on line 16 asl: n Warning: Supplied argument is not a valid MySQL result resource in /mnt/host-users/cavite/irc/members/t2.php on line 17 info: n -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] can u find error in php file?
Given the simplicity of the mail() function, why go to all this trouble? I must be missing something here. Does your PHP host lack SMTP, so you must use another server's SMTP? -Original Message- From: Balaji Ankem [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 08, 2002 3:25 AM To: [EMAIL PROTECTED] Subject: [PHP] can u find error in php file? ?php include_once('Mail/smtp.php'); include_once('Net/SMTP.php'); # Replace 127.0.0.1 with another SMTP host if needed $smtp_session = new Mail_smtp(array('10.145.0.18', 25, TRUE, '', '')); $headers['Subject'] = 'Sample subject'; $headers['Reply-To'] = '[EMAIL PROTECTED]' mailto:'[EMAIL PROTECTED]' ; $headers['From'] = '[EMAIL PROTECTED]' mailto:'[EMAIL PROTECTED]' ; $headers['User']='bankem'; $headers['Password']='narayana'; $recipients = array( '[EMAIL PROTECTED]' mailto:'[EMAIL PROTECTED]' ); $body = EOF This is a sample body. EOF; $return = $smtp_session-send($recipients, $headers, $body); if ($return) echo Mail was successfully sent to [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ; else echo FAIL; ? for above program I am getting Mail was successfully sent to [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] . But actually no mail was received by me. -Balaji
RE: [PHP] Getting data from DB
Dani, you need to aska a specific question for us to help you. -Original Message- From: Dani [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 10, 2002 10:01 AM To: PHP LIST Subject: [PHP] Getting data from DB Hi! I'm trying to make a webpage which can be edited online. My problem is the text that I need to be edited will contain of title and sub title (here is an example of the layout) Room for Rent (picture of the room) bala bala . . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] headers showing up in browser
what does your code look like? -Original Message- From: Mark [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 10, 2002 1:17 PM To: PHP Subject: [PHP] headers showing up in browser I've got this problem that won't go away. The headers are showing up at the top of the page when I run php in cgi mode. any ideas? thanks, - Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] does this work?
Show all your code. Did you open a connection to the MYSQL server? If so, show the code. -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 10, 2002 3:29 PM To: PHP Subject: [PHP] does this work? It seems that I have a parse error somewhere in the following code (since that's the only code in my script, it's a test script): // arraytest.php $tempsql = SELECT COUNT(*) AS count FROM divisions; $tempresult = mysql_query($tempsql, $db); $temprow = mysql_fetch_array($tempresult); echo $temprow[count]; Yet, it works fine in the mysql client. Thus, I am led to believe that PHP is not capable of constructing the same kinds of SQL statements that can be constructed in the mysql client. Is this the case? Erik PS: what I am -really- trying to do is dynamically fill in a select listbox with options that correspond to all of the records in a given table. Like so: form select ?php foreach ($record_id_and_record_name_pair_pulled_from_mysql_query) { print(option value=\${record_id}\${record_name}/option); } ? /select /form but I am unsure of how to grab multiple values from the mysql_query() and load them into an array. Has anyone done this before? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] does this work?
Show all your code. Did you open a connection to the MYSQL server? If so, show the code. What is the exact error that you get? -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 10, 2002 3:29 PM To: PHP Subject: [PHP] does this work? It seems that I have a parse error somewhere in the following code (since that's the only code in my script, it's a test script): // arraytest.php $tempsql = SELECT COUNT(*) AS count FROM divisions; $tempresult = mysql_query($tempsql, $db); $temprow = mysql_fetch_array($tempresult); echo $temprow[count]; Yet, it works fine in the mysql client. Thus, I am led to believe that PHP is not capable of constructing the same kinds of SQL statements that can be constructed in the mysql client. Is this the case? Erik PS: what I am -really- trying to do is dynamically fill in a select listbox with options that correspond to all of the records in a given table. Like so: form select ?php foreach ($record_id_and_record_name_pair_pulled_from_mysql_query) { print(option value=\${record_id}\${record_name}/option); } ? /select /form but I am unsure of how to grab multiple values from the mysql_query() and load them into an array. Has anyone done this before? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] does this work?
quotes are not needed -Original Message- From: Kevin Stone [mailto:[EMAIL PROTECTED]] Sent: Friday, January 11, 2002 3:26 AM To: Erik Price; PHP (E-mail) Subject: Re: [PHP] does this work? Hmm I believe that the mysql_query() function requires quotes around the query statement even it it is being passed as a variable.. mysql_query($tempsql, $db); -Kevin It seems that I have a parse error somewhere in the following code (since that's the only code in my script, it's a test script): // arraytest.php $tempsql = SELECT COUNT(*) AS count FROM divisions; $tempresult = mysql_query($tempsql, $db); $temprow = mysql_fetch_array($tempresult); echo $temprow[count]; Yet, it works fine in the mysql client. Thus, I am led to believe that PHP is not capable of constructing the same kinds of SQL statements that can be constructed in the mysql client. Is this the case? Erik PS: what I am -really- trying to do is dynamically fill in a select listbox with options that correspond to all of the records in a given table. Like so: form select ?php foreach ($record_id_and_record_name_pair_pulled_from_mysql_query) { print(option value=\${record_id}\${record_name}/option); } ? /select /form but I am unsure of how to grab multiple values from the mysql_query() and load them into an array. Has anyone done this before? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Passing variables with include()
Does http://www.someremote.server/calculate_drivers.php; contain a function? If so, you may have to declare $serie_id as global within it. -Original Message- From: Imar de Vries [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 5:53 AM To: [EMAIL PROTECTED] Subject: [PHP] Passing variables with include() Hi all, at this moment I am working on a script that calculates standings of our online racing competition. In order to do that, I have to connect to a database on a remote server. I have read in the php manual that [quote] When a file is include()ed, the code it contains inherits the variable scope of the line on which the include() occurs. Any variables available at that line in the calling file will be available within the called file. If the include() occurs inside a function within the calling file, then all of the code contained in the called file will behave as though it had been defined inside that function. [/quote] But for some reason, i simply do not get the script to work. I use a form in the local script to determine which standings are to be shown, and the value is stored in $serie_id. This is done in the main scope (no function used). $serie_id can be 2, 3 or 4. Then I make an include call to the remote script: include(http://www.someremote.server/calculate_drivers.php;); In that remote script I use $serie_id to make a database query. But so far, the query fails because $serie_id is not known. Are there any known exceptions (f.i. specific server settings) that might explain why the variable is not known on the remote server? Thanks in advance! -- Imar de Vries - [EMAIL PROTECTED] - ICQ 6972439 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Change column in mysgl
ALTER TABLE mytable CHANGE COLUMN adress VARCHAR(40); -Original Message- From: Jan Grafström [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 15, 2002 5:11 AM To: [EMAIL PROTECTED] Subject: [PHP] Change column in mysgl Hi! Can I change this column adress VARCHAR(25) to adress VARCHAR(40) afterwards. I use mysql. Thanks for any help Regards, Jan -- Jan Grafström Lillemans Hus AB Bredsäter 2091 87010 Älandsbro 0611-60920 070-6409073 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Change column in mysgl
ALTER TABLE mytable CHANGE COLUMN adress VARCHAR(40); -Original Message- From: Jan Grafström [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 15, 2002 5:11 AM To: [EMAIL PROTECTED] Subject: [PHP] Change column in mysgl Hi! Can I change this column adress adress VARCHAR(25) to adress VARCHAR(40) afterwards. I use mysql. Thanks for any help Regards, Jan -- Jan Grafström Lillemans Hus AB Bredsäter 2091 87010 Älandsbro 0611-60920 070-6409073 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Beginner: Open URL
In your original post (see below), you stated that that you wanted A tag functinality, which would involve the user clicking. In your last post, you state that you do not want the user to click; which is it to be? Now, your question is really about re-direction based upon a condition, whereby the user does not clisk a link, then the answer is: ? if(this happens) { header(Location:somepage.php); } else header(location:anotherpage.php); ? However, this snip must be executed before anything else is sent. It WILL NOT be displayed. Rather, the user will automatically be delivered to the referenced page. -Original Message- From: Tommi Trinkaus [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 3:44 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Beginner: Open URL Hi Nick I'm not sure what you mean can you be a little more detailed? I can tell however that PHP is *not* a substitute for HTML. If you want something like the a tag then *use* the a tag. in fact i want something like the a tag, but the new url should be opened within a php if-statement, not by user-clicking. Is that more detailed for you? thanks, tommi -Original Message- From: Tommi Trinkaus [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 2:04 AM To: [EMAIL PROTECTED] Subject: [PHP] Beginner: Open URL Hi over there, i'm just beginning with php and i wonder if it is possible to show another url in the current window like the a Tag in HTML. Thanks for any answer... tommi -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] variable problem - help!
$row[coloumname_${v$ariable}] -Original Message- From: Dani [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 8:36 AM To: [EMAIL PROTECTED] Subject: [PHP] variable problem - help! Importance: High Hi! I 'm trying not to hard code my php coding and I'm trying to pass a variable name into the $row[coloumname_$variable]; I get an error message for this code. I'm just wondering if I could do this trick using other ways of writing it. Thanks for reviewing! regards, Dani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Help !! Mail Function Problem (Newbie)
Put quotes around the TO address: mail([EMAIL PROTECTED], Subject, Line 1\nLine 2\nLine 3); -Original Message- From: Simos Varelakis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 12:07 PM To: [EMAIL PROTECTED] Subject: [PHP] Help !! Mail Function Problem (Newbie) Hello to everyone My problem is that Mail function sends no e-mail the code is mail([EMAIL PROTECTED], Subject, Line 1\nLine 2\nLine 3); this is my /var/spool/mail/info log file thewall sendmail[4513]: g0H10I604513: from=apache, size=0, class=0, nrcpts=0, relay=apache@localhost this is the /etc/php.ini file [mail function] ;SMTP = localhost ;for win32 only ;sendmail_from = root@localhost ;for win32 only sendmail_path =/usr/sbin/sendmail -t Any Ideas ?? Thanks in advance Simos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] find and replace help.. VERY important
If you're on a unix/linux system, you can use an AWK script -Original Message- From: Peter Sienkiewicz [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 2:32 PM To: [EMAIL PROTECTED] Subject: [PHP] find and replace help.. VERY important Hello ladies and gentlemen, I need a function that opens up an HTML file and looks for position:absolute;top:1038px;left:104px then changes the left: value to be 100 less then it currently is so it should then look like position:absolute;top:1038px;left:4px The problem is that the left: value changes from line to line This is a very important script, and I need it to search and replace thru 400 files. If anyone has an tips, please help. Thank You for your time. Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] encrypting passwords, how to decrypt?
Did you try print $query to ensure it contained what you expected? -Original Message- From: Hawk [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 17, 2002 2:54 PM To: [EMAIL PROTECTED] Subject: [PHP] encrypting passwords, how to decrypt? Ok, even if I don't need encryption I thought I might go ahead and try to learn it, and as I said in the previous post I managed to get it working everywhere but on the login script first I have a form that sends username and password to login.php, in that file I have something like this ? $the host user pswd and db vars mysql_connect($host, $user, $pswd); mysql_select_db($db); $query = SELECT * FROM users WHERE username='$username' and password='$password'; $result = mysql_query($query); $num = mysql_num_rows($result); if ( $num != NULL ) { session_start(); session_register(admin_allow); $admin_allow = mytopsecretpassword; header(location: admin/index.php); } else { header(location: admin.php); } ? I know it looks messy, and I removed some stuff to make it smaller to post, but when I use non encrypted passwords this works fine, my problem is that I don't know how to to do read a encrypted password in the $query, or if I need to do it in some other way(been trying a few different this far) I tried with $query = SELECT * FROM users WHERE username='$username' and password=password('$password'); but that made $num = 0, and the login fail I'm getting really tired (from sleeping to little..) and that might have reduced my thinking even more than usual, but what am I doing wrong ? :P Hawk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] What is going on here? list() = each()
change to: ? $var = this.that; list( $thisVal, $thatVal ) = explode( ., $var ); echo $thisVal, $thatVal ? -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 23, 2002 3:43 PM To: PHP-General Subject: [PHP] What is going on here? list() = each() ? $var = this.that; list( $thisVal, $thatVal ) = each( explode( ., $var )); echo $thisVal, $thatVal ? What is getting echo'd out is: 0, this Why? What am I missing here? Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Correction
$newlines = nl2br($oldline); print $newlines; The $oldline would contain text which contains newline characters. -Original Message- From: Scott Fletcher [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 23, 2002 3:57 PM To: [EMAIL PROTECTED] Subject: [PHP] Correction I mean how to make the data in HTML to work like a Line Feed? That way, the data are all align! Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] can anyone explain this error ?
It means you are trying to insert 22 values into 20 fields -Original Message- From: Matthew Darcy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 23, 2002 4:11 PM To: PHP developers Subject: [PHP] can anyone explain this error ? I am doing an insert into a EMPTY mysql table. 1 field is an auto increment. here is the error I get when I do the insert Column count doesn't match value count at row 1 What does this mean ? Here is the php used to insert it. ?php include(../dbconnect.php); if ($submit == sign!) { $query = insert into account_details (account_number, account_type, account_name, account_address, account_addres1, account_address2, account_address3, account_address4, account_address5, account_contact, account_phone, account_fax, account_email, account_start_date, account_authorised_credit, account_pin, account_disabled_flag, metered_jobs, unmetered_jobs, account_pin_activate) values ('$account_number', '$account_type', '$account_name', '$account_house', '$account_street', '$account_street1', '$account_street2', '$account_town', '$account_city', '$account_postcode', '$account_country', '$account_contact', '$account_phone', '$account_fax', '$account_email', '$account_start', '$account_credit_authorised', '$account_pin', '$account_disabled_flag', '$metered_job_count', '$unmetered_job_count', '$account_pin_activated'); mysql_query($query) or die (mysql_error()); ? H2 Data Submitted /H2 H2 A HREF=view_test_records.php View the records /A/H2 ?php } else { include(datafillcommit.php); } ? ~ Thanks, Matt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] What do you mean?
First, no such PHP function exists which will fix up the amount of spaces for each lines to make the end of each line to be all aligned. Second, you could verify that in section LXXXIII. String functions of the PHP manual before asking. Third, please keep the same subject line. It makes following the thread easier. -Original Message- From: Scott Fletcher [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 23, 2002 4:24 PM To: [EMAIL PROTECTED] Subject: [PHP] What do you mean? What do you mean? There is a php function that can clean up the carriage return and line feed. There's a php function somewhere that will fix up the amount of spaces for each lines to make the end of each line to be all aligned. So, what would it be? Thank, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] MySQL queston - Which row does it put your info into?
When records are deleted, the space they occupied are marked as vacant. New records are inserted into those locations. That said, since this is a relational database, it really doen't matter where the new records are inserted. If you want the nitty-gitty details of MYSQL or help, go to the the [EMAIL PROTECTED] mailing list -Original Message- From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 1:15 PM To: [EMAIL PROTECTED] Subject: [PHP] MySQL queston - Which row does it put your info into? When Im adding rows into my MySQL database using PHP, it seems to put them in random places in the database. Sometimes at the beginning, sometimes at the end, sometimes in the middle of the database. Why is it doing this? Thanks for your help!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Re: while loop on an array
You don't need to know when you hit the end. Rather, simply remove the last || after the completion of the loop. while (list($new_qID,$new_aID) = each ($new_answers)) { $sql .= qID=\$new_qID || \; } $sql .= substr( $sql, 0, -3) .) AND uID = \$uID\; -Original Message- Joe Rice [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... Hello, I would like to know how i can know when i'm at the end of an array during a while loop? reset($new_answers); while (list($new_qID,$new_aID) = each ($new_answers)) { $sql .= qID=\$new_qID\ || ; } $sql .= ) AND uID = \$uID\; i would like to know how to stop putting the || at the end of $sql in the middle of the while loop. any help would be appreciated. thanks, joe -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Got a problem I cant figure out
SHOW US YOUR CODE -Original Message- From: Ben Turner [mailto:[EMAIL PROTECTED]] Sent: Sunday, January 27, 2002 10:56 PM To: [EMAIL PROTECTED] Subject: [PHP] Got a problem I cant figure out Parse error: parse error in /var/www/docs/tacklebox/404handler.php on line 47 I am receiving this error on my page but the problem is that line 47 is the ? and last line of the page. Is their something Im missing here?? Thanks, Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Sending an e-mail to 1,000 people
yes you can by using MYSQL to store the names, PHP to generate the letters (or you can store letter template in database as well), and PHP's mail() function will take you home. -Original Message- From: Ben Clumeck [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 1:43 PM To: [EMAIL PROTECTED] Subject: [PHP] Sending an e-mail to 1,000 people I would like to send an e-mail (the same e-mail) to 1,000 different people. I want each persons name to be in the To: field. Is there a way to customize it to where it can say Dear (having a different persons name corresponding to an e-mail address) so that it looks customized. Thanks, Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Sending an e-mail to 1,000 people
1. Create a mysql database with the names. You would have to enter all the names and addresses into the database. 2. Create a PHP program which would read the names from the database. The names would go into a variable. 3. Using a template letter in the PHP program, insert the names (from the variable's values) into the template. 4. Call PHP's mail() function to send the emails. Then, in the future, you can simply change the letter template in the PHP script and easily send the new email to the 1000 recipients. Note: I mean you no insult. But, do you know how to script using PHP and MYSQL? If not, that's a whole other matter. rick -Original Message- From: Ben Clumeck [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 3:02 PM To: Rick Emery Subject: RE: [PHP] Sending an e-mail to 1,000 people Thanks for your response. How would it know who to send it to? Would I have to input all the names separtely into the mail() function? Or would it be a variable? Not quite sure on how to do it. Thanks for your help. Ben -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 12:00 PM To: 'Ben Clumeck'; [EMAIL PROTECTED] Subject: RE: [PHP] Sending an e-mail to 1,000 people yes you can by using MYSQL to store the names, PHP to generate the letters (or you can store letter template in database as well), and PHP's mail() function will take you home. -Original Message- From: Ben Clumeck [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 29, 2002 1:43 PM To: [EMAIL PROTECTED] Subject: [PHP] Sending an e-mail to 1,000 people I would like to send an e-mail (the same e-mail) to 1,000 different people. I want each persons name to be in the To: field. Is there a way to customize it to where it can say Dear (having a different persons name corresponding to an e-mail address) so that it looks customized. Thanks, Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] curious - any phpshop/core users?
I use PHP Coder. It's an excellent IDE and it's free.. -Original Message- From: Jaxon [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 11:46 AM To: PHP Subject: [PHP] curious - any phpshop/core users? hi, has anyone used PHPShop and Core (www.phpshop.org) ?? i'm thinking about using it for a project and wanted to know if it's actually any good :) cheers, jaxon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Page Not Found - on IE
Is the PHP script you're moving to trying to dao a long or complec database query? that is, are you timing out? -Original Message- From: Bryan Gintz [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 12:33 PM To: PHP List Subject: [PHP] Page Not Found - on IE Sometimes with certain PHP scripts, when a form is posted to another PHP script, IE says the page cannot be found. It seems to happen randomly, and if you refresh a couple times, you can then load the page. Any ideas on why, and how to fix it? Thanks, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] unset a function?
what happened when you tried unset()? -Original Message- From: Bas Jobsen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 2:52 PM To: PHP List Subject: [PHP] unset a function? Hello, I have this: ? include(file1); function_somename(); include(file2); function_somename(); ? file1 and contain a function definition, but the function in both files had the same name. This will give Cannot redeclare . So can i unset the function before the second include? Tnx, Bas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] unset a function?
include_once() won't help. In fact, he is including each file only once. He wants to have a function with the same name in each file. That's the kicker... -Original Message- From: Philip Olson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 30, 2002 3:03 PM To: Bas Jobsen Cc: PHP List Subject: Re: [PHP] unset a function? This sounds like a job for include_once www.php.net/include_once regards, Philip Olson On Wed, 30 Jan 2002, Bas Jobsen wrote: Hello, I have this: ? include(file1); function_somename(); include(file2); function_somename(); ? file1 and contain a function definition, but the function in both files had the same name. This will give Cannot redeclare . So can i unset the function before the second include? Tnx, Bas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Plz help w/ query
Remove the MYSQL_ASSOC. I've never needed it for what you're doing: while ($row_1=mysql_fetch_array($result_1)) -Original Message- From: Anthony Rodriguez [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 7:30 AM To: [EMAIL PROTECTED] Subject: [PHP] Plz help w/ query The following query displays 0 e-mails. Why? Tbl con_inf holds 51 records w/ 51 usernames. Tbl scr_149 holds 37 records with 37 equivalent usernames of which 14 show date_done=0. ?php $connection=mysql_connect(localhost,wagner,xxx) or die (No connection!); $db=mysql_select_db(sbwresearch,$connection) or die (No database!); $qry_1=select con_inf.e_mail from con_inf, scr_149 where scr_149.date_done=\0\ AND con_inf.username=scr_149.username; $result_1=mysql_query($qry_1,$connection) or die (No query # 1!); while ($row_1=mysql_fetch_array($result_1, MYSQL_ASSOC)) { $e_mail=$row_1[e_mail]; echo $e_mail\n; }; mysql_free_result($result_1); mysql_close($connection); exit; ? Thanks! Anthony F. Rodriguez ([EMAIL PROTECTED]) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP Hosting Services
I use http://www.nomonthlyfees.com, which provides 500 meg of disk and 5 gig of bandwidth. It's $200 the first year, which includes domain registration. It's $70 a year thereafter, which includes domain re-registration. I subdivide the disk space; I have 5 domains that I point to various subdirectories on the site. Many services offered, including shopping carts, SSL, ssh -Original Message- From: Mike Baranski [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 8:36 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP Hosting Services -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, just wondering if anyone here could recommend a good (free, if there is a good one) PHP/mysql Hosting service. I'm willing to pay some, but not more than 15 /month Thanks GPG Key located on: http://www.keyserver.net/en/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8WVZjn0XmoxBj3PwRAizbAJ0QZETkXf+i7xx1XPpUa/0P4xnwMwCfTLLN xSXs4S0fHADWDAj+FSDR4mY= =jSpN -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] autorefresh/redirect ?
meta http-equiv=refresh content=10; http://www.newpage.com; where 10 specifies you want to refresh in 10 seconds -Original Message- From: Hawk [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 1:20 PM To: [EMAIL PROTECTED] Subject: [PHP] autorefresh/redirect ? what do I type to redirect or refresh a page after a sertain time? :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Need Urgent Help!!
mail([EMAIL PROTECTED],Subject line,$message,From: $txtname $email); -Original Message- From: Scott's Mail [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 2:00 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Need Urgent Help!! Shannon, I appreciate your help! The following are the form fields I have created in Flash and their variable names, I need to be able to receive an email from the website using php. FIELD = VARIABLE NAME name = txtname email = txtemail message = txtmessage the email address it needs to be sent to is my email address: [EMAIL PROTECTED] Thanks in Advance! - Original Message - From: Shannon Cox [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, January 31, 2002 12:06 PM Subject: Re: [PHP] Need Urgent Help!! Scott, Did you ever get this solved? If not, let me know and I will help you. Please reply both to my address and send a copy to the list. Thanks, Jason Scott [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... All, I have just found out that the VB script that I have used to send email from my web site is null and void, apparently the server does not do VB or something along those lines (security) but that's not the issue. I have contacted my teh people who host my site and they told me I have to use PHP script. My website (Flash) needs to be able to send emails and membership applications from form I have already created, does anyone have any scripts and directions that some with absolutely no code writing skills can use. Your help is greatly appreciated!! Billy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] newbie: regular expression suggestios
try: if (eregi(^[a-zA-Z0-9]*$, $name)) This searches for [a-zA-Z0-9] between start and end of line with no other intervening characters -Original Message- From: Lee P Reilly [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 1:45 PM To: PHP List Subject: [PHP] newbie: regular expression suggestios Hi, I am using (getting to grips with) regular expressions for validating form data and have come across a little problem: I have a statement like the following: if (eregi(^[a-z0-9]{strlen($name)}$, $name)) { blah... return true; } , but the strlen($name) does not seem to evaluated. Is there any way this can be accomplished? If the code above is not clear (or correct!), I am returning true iff the input is comprised of chars (letters/numbers) only. Maybe there's a better/more efficient way to accomplish this..? Any information greatly aprpeciated. Thanks in advance! - Best regards, Lee Reilly -- Lee P. Reilly, ms:G758 Szilard Resource, tel:505-665-7025 Bioscience Division, SM-30 Bikini Atoll Rd, Los Alamos National Laboratory, mailto:[EMAIL PROTECTED] Los Alamos, NM 87545. http://home.lanl.gov/lreilly Quidquid latine dictum sit, altum viditur -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] newbie: regular expression suggestios
I thought about the case insensitivity, but I wanted to be certain that A-Z was captured. Personnally, I'd use ereg(), as you suggest. -Original Message- From: Administrator [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 2:38 PM To: Rick Emery Subject: Re: [PHP] newbie: regular expression suggestios Would I be mistaken to say that the A-Z is not needed when using eregi() ? ereg(^[a-zA-Z0-9]*$); or eregi(^[a-z0-9]*$); eregi() being case insensitive... Am I wrong? - Original Message - From: Rick Emery [EMAIL PROTECTED] To: 'Lee P Reilly' [EMAIL PROTECTED]; PHP List [EMAIL PROTECTED] Sent: Thursday, January 31, 2002 2:27 PM Subject: RE: [PHP] newbie: regular expression suggestios try: if (eregi(^[a-zA-Z0-9]*$, $name)) This searches for [a-zA-Z0-9] between start and end of line with no other intervening characters -Original Message- From: Lee P Reilly [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 1:45 PM To: PHP List Subject: [PHP] newbie: regular expression suggestios Hi, I am using (getting to grips with) regular expressions for validating form data and have come across a little problem: I have a statement like the following: if (eregi(^[a-z0-9]{strlen($name)}$, $name)) { blah... return true; } , but the strlen($name) does not seem to evaluated. Is there any way this can be accomplished? If the code above is not clear (or correct!), I am returning true iff the input is comprised of chars (letters/numbers) only. Maybe there's a better/more efficient way to accomplish this..? Any information greatly aprpeciated. Thanks in advance! - Best regards, Lee Reilly -- Lee P. Reilly, ms:G758 Szilard Resource, tel:505-665-7025 Bioscience Division, SM-30 Bikini Atoll Rd, Los Alamos National Laboratory, mailto:[EMAIL PROTECTED] Los Alamos, NM 87545. http://home.lanl.gov/lreilly Quidquid latine dictum sit, altum viditur -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] ereg et all
try: eregi_replace(this,that,This equals this equals tHis); -Original Message- From: Edward van Bilderbeek - Bean IT [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 3:40 PM To: [EMAIL PROTECTED] Subject: [PHP] ereg et all hi, is there a simple way to replace an occurence of a string, into another, maintaing capital positions... Like: $str = This equals this equals tHis; and I wanna replace all occurences of this in that, that the result will be: $str = That equals that equals That; Edward -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Best way to frequently check database?
To timeout users after 20 minutes, use a cookie which is set for 20 minutes. I'm not exactly sure what you are attempting to limit on database: 100 entries per hour, per day, per year, concurrently? -Original Message- From: Hawk [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 31, 2002 3:58 PM To: [EMAIL PROTECTED] Subject: [PHP] Best way to frequently check database? Let's say I have a database that recieves new information about 6 times/minute and I want the database to be checked to frequently to limit the maximum entrys to the database to.. let's say 100. And also timeout users if their session has been inactive for, let's say 20 minutes. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] need some advice; small server on a win98 machine.
Dump PWS, PHP module, mysql Download and install PHPTRIAD, which will install Apache server, PHP, and MySQL on your system. It's a turn-key operation. -Original Message- From: Wilbert Enserink [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 6:18 AM To: [EMAIL PROTECTED] Subject: [PHP] need some advice; small server on a win98 machine. Hi all, I'm a php programmer building my first server. I think I need some advice. I'm trying to build a very small server on a win98 machine. I just installed PWS, then I installed PHP4 as a CGI module using the 'self'-installer from php.net. Then I installed mySQL, latest version. I know PWS worx, since all local pages can be seen through the browser (also asp pages). mySQL also worx. I can perform mySQL statements in my DOS window. But somehow the php code doesn't function/isn't parsed right. The code isn't really executed, but displayed as HTML in my browser. Can anybody give me some advice, on what is going wrong? Any tips are much appreciated! Thanx. Wilbert Enserink - Pas de Deux Van Mierisstraat 25 2526 NM Den Haag tel 070 4450855 fax 070 4450852 http://www.pdd.nl [EMAIL PROTECTED] - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP commands and HTML combobox
Eduardo, You've already solved your own problem. You just need to take it one step further. given: form method=post action=formprocess.php select name=combo option value=01Option 01 option value=02Option 02 option value=03Option 03 /select -- in formprocess.php file: a href=http://www.iasp.br/iasponline.php?option=?php print $combo;? img border=0 src=baok.gif width=17 height=17 /a -Original Message- From: Eduardo Melo [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 5:19 AM To: [EMAIL PROTECTED] Subject: [PHP] PHP commands and HTML combobox How can i use a HTML combobox content into a PHP code as such as : select name=combo optionOption 01 optionOption 02 optionOption 03 /select a href=http://www.iasp.br/iasponline.php?option=xx; img border=0 src=baok.gif width=17 height=17 /a xx must be the option select in the combo named ~combo~ but must be an substr (x,7,2) Is it posible ??? someone can help me ? best regards, eduardo melo computer programmer _ Chat with friends online, try MSN Messenger: http://messenger.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Date format
list($y,$m,$d) = explode(,,$phpdate); $newdate = $d/$m/$y; -Original Message- From: Jose [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 9:36 AM To: [EMAIL PROTECTED] Subject: [PHP] Date format Hi all. How can I write the date in this format (dd/mm/) if php gives me (,mm,dd)?? Thanks --Jose Fco. ( [EMAIL PROTECTED] ). OLINET, S.L. Teléfono: 952207135 - Fax: 952207600 Avda. Juan Sebastián Elcano, 39-41. 29017 Málaga. Spain -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] getting information from a COMBOBOX
You get the results by including it in a FORM/FORM and calling another PHP script which uses that value. As I stated earlier, you CANNOT retrieve the value of the COMBO BOX in the same page that it is created until the SUBMIT button is pushed -Original Message- From: Eduardo Melo [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 10:22 AM To: [EMAIL PROTECTED] Subject: [PHP] getting information from a COMBOBOX how can i get a result from a COMBOBOX ? as such as : ?=combo? best regards eduardo melo computer programmer _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Newbie: function for downloading
Well, the quick and dirty is that the user RIGHT-CLICKs on the link. The Context menu will display which invites the user to Save Target As. But I gues you really want a LEFT-CLICK option? -Original Message- From: Manuel Ritsch [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 12:02 PM To: [EMAIL PROTECTED] Subject: [PHP] Newbie: function for downloading Hey There I have a little question I'm making a page where you can download mp3's (hip hop and funk beats made by myself) and i want, if you press on the link (a href=yadayada.mp3), that it doesn't start an internal audio player (like some configurations/browsers do), rather i want that the download dialog (like when you download .exe or .zip files) appears to save the mp3 on your harddisk, can anyone give me a tip? Greets -- manu -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Generating populated variables from component/content pairs in a database
$sql = SELECT * FROM $table_name WHERE sec = '$sec' AND WHERE subsec = '$subsec' AND WHERE name = '$name' ORDER BY component ; $result = mysql_query($sql) or die(Error: .mysql_error().$sqlBR); while ( link($component,$content) = mysql_fetch_array($result) ) { ...do stuff... } The filed values will be in the $component and $content. -Original Message- From: James Hallam [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 3:07 PM To: [EMAIL PROTECTED] Subject: [PHP] Generating populated variables from component/content pairs in a database I've got a fairly basic website content management system I'm working on, and I've got the data split up in MySQL by the following: a few columns for identifiers like language, section and unique keyname, a column for a component name and a column for the relevant content for that component. As follows: | component | content | | foo | 123456 | | bar | 654321 | Assuming I've got the right sql statement here (it just looks for the rows that match the section and subsection provided earlier in the script): $sql = SELECT FROM $table_name WHERE sec = '$sec' AND WHERE subsec = '$subsec' AND WHERE name = '$name' ORDER BY component ; What can I do to end up with a variable for each component/content pair, with the variable named with the value of the component, and assigned the value of the content?: $foo = 123456; $bar = 654321; Is there a simple way to do this? Thanks, James Hallam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Generating populated variables from component/content pairs in a database
MEA CULPA...Big-Time typo on my part. I am sorry... I meant list() not link(): while ( list($component,$content) = mysql_fetch_array($result) ) This statement will return the number of component/content pairs, regardless of number that are in the database. In the place where I say do stuff, that would be where you would use the variables, such as displaying them or using them in tables, combo boxes, etc. If you wanted to store them in an associated array, you could: while ( list($component,$content) = mysql_fetch_array($result) ) { myarray[$component] = $content; } Hence, the component is the key. -Original Message- From: James Hallam [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 3:36 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Generating populated variables from component/content pairs in a database Thanks for your reply.. I guess I should have mentioned my platform: iPlanet/NT.. The manual says that link() isn't available for Windows users.. Is there another function I could use? My second question concerns the .. do stuff here .. portion.. I'm not sure what I'd actually put there. My goal is to have a variable for each component/content pair, regardless of how many pairs there are returned by the SQL statement, and then to have those variables available for display later on in the page. Do you have any suggestions? James -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 2:18 PM To: 'James Hallam'; [EMAIL PROTECTED] Subject: RE: [PHP] Generating populated variables from component/content pairs in a database $sql = SELECT * FROM $table_name WHERE sec = '$sec' AND WHERE subsec = '$subsec' AND WHERE name = '$name' ORDER BY component ; $result = mysql_query($sql) or die(Error: .mysql_error().$sqlBR); while ( link($component,$content) = mysql_fetch_array($result) ) { ...do stuff... } The filed values will be in the $component and $content. -Original Message- From: James Hallam [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 3:07 PM To: [EMAIL PROTECTED] Subject: [PHP] Generating populated variables from component/content pairs in a database I've got a fairly basic website content management system I'm working on, and I've got the data split up in MySQL by the following: a few columns for identifiers like language, section and unique keyname, a column for a component name and a column for the relevant content for that component. As follows: | component | content | | foo | 123456 | | bar | 654321 | Assuming I've got the right sql statement here (it just looks for the rows that match the section and subsection provided earlier in the script): $sql = SELECT FROM $table_name WHERE sec = '$sec' AND WHERE subsec = '$subsec' AND WHERE name = '$name' ORDER BY component ; What can I do to end up with a variable for each component/content pair, with the variable named with the value of the component, and assigned the value of the content?: $foo = 123456; $bar = 654321; Is there a simple way to do this? Thanks, James Hallam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Need eregi() help
What do you mean it does not work? What error do you get? Logic error? Compile error? -Original Message- From: Robby [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 3:28 PM To: [EMAIL PROTECTED] Subject: [PHP] Need eregi() help I am using this code below but it does not work (php in installed and working proplely): ?php $file=fopen(http://somedomain/time.html;, r); if (!$file) echo error when connect\n; exit; } $line = fread ($file, filesize ($file)); eregi(^{font color=greenb}{.*}{/b/font}$, $line, $out) echo $out[1]; fclose($file); ? Robby -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Generating populated variables from component/content pairs in a database
Place $ in front of compDisplay: $compDisplay[$comp] = $content; -Original Message- From: James Hallam [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 5:02 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Generating populated variables from component/content pairs in a database Okay, I stripped the SQL statement down to just select all, as there is only one set of test data in the DB right now. $component is renamed as $comp in the new code, as that is the actual name of the table column. I've got the code in as follows, but I'm just getting a blank HTML page with nothing in the body tag: // Connecting Stuff up here $sql = SELECT * FROM en_na; //This is the right table $result = @mysql_query($sql,$connection) or die(Couldn't execute query.); while ( list($comp,$content) = mysql_fetch_array($result) ) { $compDisplay[$comp] = $content; } ? // HTML Stuff in here .. ? echo $compDisplay['headline']; //headline is the first component.. ? Grr. I'm stumped.. James -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 2:45 PM To: 'James Hallam'; [EMAIL PROTECTED] Subject: RE: [PHP] Generating populated variables from component/content pairs in a database MEA CULPA...Big-Time typo on my part. I am sorry... I meant list() not link(): while ( list($component,$content) = mysql_fetch_array($result) ) This statement will return the number of component/content pairs, regardless of number that are in the database. In the place where I say do stuff, that would be where you would use the variables, such as displaying them or using them in tables, combo boxes, etc. If you wanted to store them in an associated array, you could: while ( list($component,$content) = mysql_fetch_array($result) ) { $myarray[$component] = $content; } Hence, the component is the key. -Original Message- From: James Hallam [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 3:36 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Generating populated variables from component/content pairs in a database Thanks for your reply.. I guess I should have mentioned my platform: iPlanet/NT.. The manual says that link() isn't available for Windows users.. Is there another function I could use? My second question concerns the .. do stuff here .. portion.. I'm not sure what I'd actually put there. My goal is to have a variable for each component/content pair, regardless of how many pairs there are returned by the SQL statement, and then to have those variables available for display later on in the page. Do you have any suggestions? James -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 2:18 PM To: 'James Hallam'; [EMAIL PROTECTED] Subject: RE: [PHP] Generating populated variables from component/content pairs in a database $sql = SELECT * FROM $table_name WHERE sec = '$sec' AND WHERE subsec = '$subsec' AND WHERE name = '$name' ORDER BY component ; $result = mysql_query($sql) or die(Error: .mysql_error().$sqlBR); while ( link($component,$content) = mysql_fetch_array($result) ) { ...do stuff... } The filed values will be in the $component and $content. -Original Message- From: James Hallam [mailto:[EMAIL PROTECTED]] Sent: Friday, February 01, 2002 3:07 PM To: [EMAIL PROTECTED] Subject: [PHP] Generating populated variables from component/content pairs in a database I've got a fairly basic website content management system I'm working on, and I've got the data split up in MySQL by the following: a few columns for identifiers like language, section and unique keyname, a column for a component name and a column for the relevant content for that component. As follows: | component | content | | foo | 123456 | | bar | 654321 | Assuming I've got the right sql statement here (it just looks for the rows that match the section and subsection provided earlier in the script): $sql = SELECT FROM $table_name WHERE sec = '$sec' AND WHERE subsec = '$subsec' AND WHERE name = '$name' ORDER BY component ; What can I do to end up with a variable for each component/content pair, with the variable named with the value of the component, and assigned the value of the content?: $foo = 123456; $bar = 654321; Is there a simple way to do this? Thanks, James Hallam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail
RE: [PHP] Mysql
Look-up GRANT PRIVILEGES in the mysql manual. That should get ya going -Original Message- From: Roman Duriancik [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 1:11 AM To: [EMAIL PROTECTED] Subject: [PHP] Mysql Pleae help me ! I need delete record from table user.mysql in mysql database, i log on in mysql like root and I log on on linux server like root. But when I write command : delete from user where user=''; mysql send me error message : ERROR 1036 Table 'user; is read only ! Thans for you helps... roman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Using functions before they're defined
What happened when you tried? -Original Message- From: Brad Harriger [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 8:22 AM To: [EMAIL PROTECTED] Subject: [PHP] Using functions before they're defined How does PHP 4 locate function definitions if the function is called before it is defined? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Quote in input tag value?
I prefer: print input type=text value=\My Quote\; -Original Message- From: Nathan Cassano [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 3:54 PM To: [EMAIL PROTECTED] Subject: [PHP] Quote in input tag value? If there is a quote mark in an input tags value what is the correct way to print the quote? input type=text value=quotMy Quotequot or input type=text value=\My Quote\ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: [PHP-DB] Need to delete charcters from a string
$str = substr($str,0,-3); -Original Message- From: Renaldo De Silva [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 1:57 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-DB] Need to delete charcters from a string I need to delete the last 3 character of a string, what command can i use o do this. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Newbie Question about PHP / MySQL
SELECT COUNT(col_name) FROM mytable WHERE some condition This will return the number of items with that condition in that columne, name col_name -Original Message- From: Ron Clark [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 11:19 AM To: [EMAIL PROTECTED] Subject: [PHP] Newbie Question about PHP / MySQL -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello All: How do I read all of the data from just one column, then develop a count based on those items? I think I start with mysql_fetch_field(), but right there I get stuck. Any ideas to point me in the right direction? Thanks in advance, Ron C. -BEGIN PGP SIGNATURE- Version: PGP 7.1 iQA/AwUBPGQIlESpEYIqgLQzEQIzeQCg/JWV1gTtsr0msG3FyUsLK3oaHL8AoNls m6KXlfmfZPhEIJOdvTX4VBRw =71Ww -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Parameters via Link
try: if( ! strcmp($link, home) ) { include(soundmp3.php); } -Original Message- From: Manuel Ritsch [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 12:24 PM To: [EMAIL PROTECTED] Subject: [PHP] Parameters via Link Hey there I want to make a webpage out of one main pagewith php, if you press on a link i want that it changes the content of the page, but it doesn't seem to work, i tried it like this... link: a href=index.php?link=home php code: if($link == home) { include'soundmp3.php'; } but it doesn't work (i don't get an error, the content of soundmp3.php just doesn't shows up). Any Help is Welcome -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Php Projects
Do I detect a bit of Friday-afternoon sarcasm??? GRIN Actually, a beer sounds good about now -Original Message- From: Nick Wilson [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 1:40 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Php Projects -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Arik Ashepa declared Hi. I was wondring... maybe you want to develop a project? have any ideas? Yes! How about a database backed set of scripts to create world peace and send a steady supply of beer to my house? - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8ZCmLHpvrrTa6L5oRAk63AKCIidIl7jTdl9weiRbnJau/YVwCKQCcCukg vfCBVeUKS8xMpnfderSjLXw= =UDHe -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] A MYSQL COUNTER
The question you must answer first: what do you intend to do with the data once it's collected? Will you simply review the data without sorting it or performing data manipulation? If so, why incur the overhead of MYSQL? If all you need to do is log the user page hits, use a text file; then use grep/awk/sed/perl/php to search for specific users with their page hits, etc. Define your requirements more explicitly, then choose a solution. -Original Message- From: Matthew Walker [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 6:39 PM To: Georgie Casey; [EMAIL PROTECTED] Subject: RE: [PHP] A MYSQL COUNTER This is too much for a text file. You should definitely use MySQL for this. Matthew Walker Ecommerce Project Manager Mountain Top Herbs -Original Message- From: Georgie Casey [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 3:22 PM To: [EMAIL PROTECTED] Subject: [PHP] A MYSQL COUNTER I need a way of tracking what user was logged in when vieweing a particular member page, so I'm thinking of having EVERY unique page view of each member page added to a MySQL database, which just the ip, time and date, server name and browser, stuff like that. Is this too much for a MySQL DB??? Should I just write all the info to a textfile??? TANX -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Ireland's Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How can i count the number of users logged in my system
Store the user count to a database or file. Increment when new user enters; decrement when user logs out. If user does not log out and simply types a new URL into the address line, then you have another problem. -Original Message- From: V [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 9:16 AM To: [EMAIL PROTECTED] Subject: [PHP] How can i count the number of users logged in my system I'm developing a site where many users can log in. I want to know how many users are using the system simoultaneously, and display it in a document so the users can see it. ¿How can i do that? Thanks Salu2, ___ Powered by Sambar Webmail - http://www.sambar.com) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] A MYSQL COUNTER
I just looked at your website (http://www.filmfind.tv) to get a better feeling for what you might be after. Based upon your comments below and the purpose of filmfind.tv, it appears a mysql solution might be required. At the least, you need to store the email address of your members. I assume you already have that stored elsewhere. Second, the requirement for new unique visitor is the phrase that pays here. You will need to maintain a list of visitors and search that list to determine uniqueness. A database would be the fastest to develop. As to whether your application is too much for MYSQLworry not. There are MYSQL DBs out there with millions of rows and very complex relational structures. -Original Message- From: Georgie Casey [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 11:00 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] A MYSQL COUNTER whenever they're is a new unique visitor, I want a script to email the member about who visited. And have a permanent record for each member of who viewed their pages, accesible when they login. Rick Emery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... The question you must answer first: what do you intend to do with the data once it's collected? Will you simply review the data without sorting it or performing data manipulation? If so, why incur the overhead of MYSQL? If all you need to do is log the user page hits, use a text file; then use grep/awk/sed/perl/php to search for specific users with their page hits, etc. Define your requirements more explicitly, then choose a solution. -Original Message- From: Matthew Walker [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 6:39 PM To: Georgie Casey; [EMAIL PROTECTED] Subject: RE: [PHP] A MYSQL COUNTER This is too much for a text file. You should definitely use MySQL for this. Matthew Walker Ecommerce Project Manager Mountain Top Herbs -Original Message- From: Georgie Casey [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 3:22 PM To: [EMAIL PROTECTED] Subject: [PHP] A MYSQL COUNTER I need a way of tracking what user was logged in when vieweing a particular member page, so I'm thinking of having EVERY unique page view of each member page added to a MySQL database, which just the ip, time and date, server name and browser, stuff like that. Is this too much for a MySQL DB??? Should I just write all the info to a textfile??? TANX -- Regards, Georgie Casey [EMAIL PROTECTED] *** http://www.filmfind.tv Ireland's Online Film Production Directory *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/2002 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/2002 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Exchange substitute
http://twig.screwdriver.net/ -Original Message- From: Erik H. Mathy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 11:23 AM To: PHP General List Subject: RE: [PHP] Exchange substitute I'm doing a project to move my company off of microsloth exchange. I have dont qmail with courier imap, now I was looking for suggestions for the rest of exchange features, calendaring, scheduling and so on and so forth. Is there one good package? Try TWIG. I've played with an older version and it does all of that pretty well. It could only have gotten better since then. Don't know the address off the top of my head. Do a search on Freshmeat to find it. Have fun! - Erik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re-Importing .CSV file into Database
look at MYSQL's LOAD DATA INFILE command: LOAD DATA INFILE datafile.csv INTO mytable FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\n' -Original Message- From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 12:02 PM To: [EMAIL PROTECTED] Subject: [PHP] Re-Importing .CSV file into Database Glory! I have a bunch of .CSV (Microsoft Excel Comma Seperated Values) Files with me, whose data i want to put back into my mySQL database tables. How can i do that through php? or otherwise... thanks, T. Edison jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re-Importing .CSV file into Database
connect to your mysql server select the mysql database $query = LOAD DATA INFILE datafile.csv INTO mytable . FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\' . LINES TERMINATED BY '\n' ; mysql_query($query) or die(error:. mysql_error()); -Original Message- From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 1:11 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Re-Importing .CSV file into Database I have space on a server on the internet. I have mySQL PHP4 support. And i can easily upload the .CSV files on the server itself. Could you kindly help me out with the php code that would make this possible.. Thanks, T. Edison jr. --- Rick Emery [EMAIL PROTECTED] wrote: The file is located on the server and you have access to it, yes. If the file is on the client, then no -Original Message- From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 12:21 PM To: Rick Emery Subject: RE: [PHP] Re-Importing .CSV file into Database HI, Thanks.. i will try this. But tell me, can this same be executed through a php page rather than the mySQL command line? T. Edison Jr. --- Rick Emery [EMAIL PROTECTED] wrote: look at MYSQL's LOAD DATA INFILE command: LOAD DATA INFILE datafile.csv INTO mytable FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\n' -Original Message- From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 12:02 PM To: [EMAIL PROTECTED] Subject: [PHP] Re-Importing .CSV file into Database Glory! I have a bunch of .CSV (Microsoft Excel Comma Seperated Values) Files with me, whose data i want to put back into my mySQL database tables. How can i do that through php? or otherwise... thanks, T. Edison jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Refreshing a page.
did you try: meta http-equiv=refresh content=0; URL=http://my.site.com//thispage.html; -Original Message- From: Morten Nielsen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 3:10 PM To: [EMAIL PROTECTED] Subject: [PHP] Refreshing a page. Hi, I got a page, which uses frames. When a user logges in I would like to refresh a frame, but I don't know how to do that. Can anybody help me? Thanks, Morten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Work in New York
George, I don't have any job sources for. However, I wondered where you lived in Germany. Ich habe fur drei Jahre in Kaiserlautern gewohnt. Von 1985 bis 1988. Sind Sie Deutscher oder Amerikaner im militar? rick -Original Message- From: George PHP [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 3:21 PM To: [EMAIL PROTECTED] Subject: [PHP] PHP Work in New York Hi PHPers, I just moved to NYC from Germany and I'm looking for a job here. Where would be a good place to look? George __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Newbie question about links
reference the file that you wish to link to: A href=newpage.phpClick here/A -Original Message- From: Chris Schoeman [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 1:13 PM To: [EMAIL PROTECTED] Subject: [PHP] Newbie question about links I want to make links on my website which doesn't show the original url of that page. How Can I do that? Thankx Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to POST a HTML-page with the header function
Short answer: NO. Because your method is the same as the GET method Use cookies or sessions to pass hidden variable values -Original Message- From: L. Hoeneveld [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 3:05 AM To: [EMAIL PROTECTED] Subject: [PHP] How to POST a HTML-page with the header function We use the header() function to display a html page like this: header(Location: $mail_error_page?CODE=$CODE); But instead of showing the variable $CODE we would like to hide it. Just like when you POST variables to a HTML-page. Is there any way to do this? -- Regards, Léon Hoeneveld The Netherlands E-mail TNO: [EMAIL PROTECTED] E-mail CMG: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How can i count the number of users logged in my system
I don't know if there is a method to tracke active sessions on the server, other than the method I suggest. The problem I mention is that when a user is in your web site (having logged in) but does not log-out. That is, the user simply types in another web-site outside of your site or selects a new web-site from the Favorites or Bookmarks list in the browser. Your app would not know that the user left. Somebody else previously suggested tracking the last time a user changed pages within your web-site; if a uses hasn't changed pages within the last 10 minutes, then assume the user has left your web-site and decrease the number of users by 1. -Original Message- From: V [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 8:38 AM To: 'V'; [EMAIL PROTECTED]; Rick Emery Subject: RE: [PHP] How can i count the number of users logged in my system Ok, but i'm using sessions. My users log in the system, there is no anonymous navigation. So i was thinking something about tracking the number of active sessions. I don't know how to do that. ¿Any ideas?. Thanks On 12/Feb/2002 09:22:40, Rick Emery wrote: Store the user count to a database or file. Increment when new user enters; decrement when user logs out. If user does not log out and simply types a new URL into the address line, then you have another problem. -Original Message- From: V [A HREF=mailto:[EMAIL PROTECTED];mailto:[EMAIL PROTECTED]/ A] Sent: Tuesday, February 12, 2002 9:16 AM To: [EMAIL PROTECTED] Subject: [PHP] How can i count the number of users logged in my system I'm developing a site where many users can log in. I want to know how many users are using the system simoultaneously, and display it in a document so the users can see it. ¿How can i do that? Thanks Salu2, Salu2, V ___ Powered by Sambar Webmail - http://www.sambar.com) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] querystrings passed in header(Location: n) ?
try: header(Location: domain.com/errorpage.php?errorcode=.urlencode($errorcode)); -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 8:51 AM To: PHP Subject: [PHP] querystrings passed in header(Location: n) ? Can you pass a querystring along in header(Location: n)? This is my code: // get name of current page $errorcode = basename($_SERVER['PHP_SELF']); // send them to error page with previous page's name in $_GET array header(Location: domain.com/errorpage.php?errorcode=$errorcode); See what I'm doing? Trying to send the errorpage.php a variable in the querystring to identify which page sent them there. I'd like to avoid HTTP_REFERER for now, if possible. But when I get sent to errorpage.php, there is no querystring at all. Thanks, Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to POST a HTML-page with the header function
something like: setcookie(cookiename,cookievalue); header( Location: $mail_error_page); exit; in mail_error_page: ?php $mycookie = $HTTP_COOKIE_VARS['cookiename']; ? The cookie will exist until the web browser is closed.. -Original Message- From: L. Hoeneveld [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 9:30 AM To: Rick Emery Cc: [EMAIL PROTECTED] Subject: Re: [PHP] How to POST a HTML-page with the header function I'll study on that. And in case you have an easy example for both suggested methods I am willing to receive that. We use the PHP-pages as external services and I wonder if a session-ID can be used then. But maybe a cookie is an idea... In any case thanks and regards, Léon Hoeneveld Rick Emery wrote: Short answer: NO. Because your method is the same as the GET method Use cookies or sessions to pass hidden variable values -Original Message- From: L. Hoeneveld [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 3:05 AM To: [EMAIL PROTECTED] Subject: [PHP] How to POST a HTML-page with the header function We use the header() function to display a html page like this: header(Location: $mail_error_page?CODE=$CODE); But instead of showing the variable $CODE we would like to hide it. Just like when you POST variables to a HTML-page. Is there any way to do this? -- Regards, Léon Hoeneveld The Netherlands E-mail TNO: [EMAIL PROTECTED] E-mail CMG: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ This inbound message from KPN has been checked for all known viruses by KPN IV-Scan, powered by MessageLabs. For further information visit: http://www.veiliginternet.nl _ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] querystrings passed in header(Location: n) ?
What error did you receive? What was displayed? Please show your code; I hope there was no line break as shown below. Unfortunately, my mail client breaks lines after about 40 cchars. I agree with you that it is handled as any string. -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 9:34 AM To: Rick Emery Cc: PHP Subject: Re: [PHP] querystrings passed in header(Location: n) ? On Wednesday, February 13, 2002, at 09:53 AM, Rick Emery wrote: try: header(Location: domain.com/errorpage.php?errorcode=.urlencode($errorcode)); I tried that, and it didn't work. But it does raise a question, which I'll ask in a minute. I also tried doing $errorcode = basename($_SERVER['PHP_SELF']); $errorcode = urlencode($errorcode); header(Location: http://domain.com/errorpage.php?errorcode=$errorcode;); Which also didn't work. My question is unrelated to my problem, simply for my own edification: Can you break out of a quoted string and use the dot to concatenate a variable in the way that you did in your example? I didn't know that was allowed -- I suppose the header() function is simply taking a string as an argument (Location: n), but can we do this kind of string manipulation within a function's arguments? I'm not trying to question you, only to tie up a loose end. Back to the subject at hand, I am sorry to report that header() is not passing along the querystring. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Newbie - Session Help
show us the code you've tried so far. -Original Message- From: Richard O'Flaherty [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 9:18 AM To: [EMAIL PROTECTED] Subject: [PHP] Newbie - Session Help I have a log-in form on my site that registers a session for the username and password entered, on my other pages i want it to include a file on the page if the session contains a value, but if its not then i want it to include a different file. All my attempts at this have failed, can anyone tell me what code i should be writing? Regards, Richard O'Flaherty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re-Importing .CSV file into Database
Has fanlist_try table been created? -Original Message- From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 10:54 AM To: Jason Murray Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Re-Importing .CSV file into Database Hi, Ok, considering the FULL PATH and the QUOTES thingy, this is the code i'm applying : ?php $db = mysql_connect(localhost,mydb,pwd); mysql_select_db(mydb,$db); $query = LOAD DATA INFILE 'D:\Apache Group\Apache\htdocs\mjimm\php3\tabledata\fanlist.csv' INTO fanlist_try FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\' LINES TERMINATED BY '\n' ; mysql_query($query) or die(error:. mysql_error()); ? And this is the error i'm getting : error:You have an error in your SQL syntax near 'fanlist_try FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '' LINES TERMINATED' at line 1 So... what's the problem?? Thanks guys, though. T. Edison jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cheap, PHP, mySQL hosting!
http://www.nomonthlyfees.com 500 megs space, 5 gig bandwidth, PHP4, MYSQL, SSL,SSH, etc On-line administration tool decent customer service $200 first year (includes domain registration) $70 year thereafter, includes domain registration -Original Message- From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 11:04 AM To: [EMAIL PROTECTED] Subject: [PHP] Cheap, PHP, mySQL hosting! Hi, Lookin for about 50 Megs with php4, mySQL and the works. Any economical hosts?? thanks.. t. edison jr __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re-Importing .CSV file into Database
Thomas, Can you provide your table structure and about a dozen lines from your file? I'd like to experiment with it on my machine. We WILL get this resolved... rick -Original Message- From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 11:09 AM To: Rick Emery Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Re-Importing .CSV file into Database Oh yes, definately. With the appropriate columns too. --- Rick Emery [EMAIL PROTECTED] wrote: Has fanlist_try table been created? -Original Message- From: Thomas Edison Jr. [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 10:54 AM To: Jason Murray Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Re-Importing .CSV file into Database Hi, Ok, considering the FULL PATH and the QUOTES thingy, this is the code i'm applying : ?php $db = mysql_connect(localhost,mydb,pwd); mysql_select_db(mydb,$db); $query = LOAD DATA INFILE 'D:\Apache Group\Apache\htdocs\mjimm\php3\tabledata\fanlist.csv' INTO fanlist_try FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\' LINES TERMINATED BY '\n' ; mysql_query($query) or die(error:. mysql_error()); ? And this is the error i'm getting : error:You have an error in your SQL syntax near 'fanlist_try FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '' LINES TERMINATED' at line 1 So... what's the problem?? Thanks guys, though. T. Edison jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] querystrings passed in header(Location: n) ?
This is frustrating, because I have used header(location) with parameters and it has worked. -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 11:12 AM To: Rick Emery Cc: PHP Subject: Re: [PHP] querystrings passed in header(Location: n) ? On Wednesday, February 13, 2002, at 10:37 AM, Rick Emery wrote: What error did you receive? What was displayed? Please show your code; I hope there was no line break as shown below. Unfortunately, my mail client breaks lines after about 40 cchars. Well, to post the actual code would be quite difficult, as there is a mess of includefiles involved. Basically, I received no error -- just that when I use the header() function and include a querystring in the argument to header(), there is no querystring in the URL of the next page. Someone who is familiar with the low-level nuts and bolts of the PHP engine should know whether or not querystrings are even valid in the header() function. for example: 'header(Location: http://n.com/n.php?n=1;)' Next page's URL: 'http://n.com/n.php' Can any of the PHP development lurkers on this list comment on this? I agree with you that it is handled as any string. You mean that I am correct? Or that you think I should be correct? (not trying to sound insolent, just trying to nail down what's being said ;) Thanks Rick Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php