[PHP] Mail() not setting MIME TYPE
Hi, can some one please have a look at this and tell me why it's not setting correctly? ? $address .= [EMAIL PROTECTED]; // Subject $subject = VFSA-eRentals Application Form; //Body of email $body = html title VFSA-eRentals Application /title body table tr tdhowdy ho stranger/td /tr tr tdhow aint ya doing/td /tr /table ; $headers .= From: VFSA-eRentals [EMAIL PROTECTED]\n; $headers .= X-Sender: VFSA-eRentals [EMAIL PROTECTED]\n; $headers .= X-Mailer: PHP\n; // mailer $headers .= Return-Path: VFSA-eRentals [EMAIL PROTECTED]\n; // Return path for errors $headers .= X-Priority: 1\n; // Urgent message! /* If you want to send html mail, uncomment the following line */ //$headers .= Content-Type: text/html; charset=iso-8859-1\n; // Mime type //send the email $mail = mail($address, $subject, $body, $headers \nContent-Type: text/html; charset=iso-8859-1\nContent-Transfer-Encoding: 64bit ); ? Now that doesn't show all the html I use in the body but it will give you an idea.. as far as I can tell this script should work and set the content-type to text/html but when it sends the email the Content-Type: text/html; charset=iso-8859-1 is changed to Content-Type: text/plain; charset=us-ascii and I get this after it's set the content type X-BadHeader: html; charset=iso-8859-1 but from looking in the PHP manual and php books I have the way I've tried to set it should be right. if you want to look at my page with the script on let me know and I will send it to you off the list. thanks in advance -- Peter Houchin Sun Rentals STR Manager Phone: 03 9329 1455 Fax: 03 9329 6755 [EMAIL PROTECTED] http://www.sun.com.au/rentals = _ __ /\ /_/_/_\/ |_/ \ /_/_/___ __ __ __ / \ \_/_/_\ /_/ /_/ /_/ /_/ \ _ / ___\_\_\/ /_/_/_/ /_//\/_/\_/ \/\_/ \_//_/_/ /_/_/_/ /_/ \/_/v /_/_/_/_/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ /_/_ _/_/ __ __ __ /_/ __ __ /_/_/_/_/ /_/_/_/ /_/ /_/ /_/ /_/\_\/_//_/_/_/ /_/ \_\ /_/ _/ /_//\/_/ /_/ /_/__\_\ /_/___ _\_\_\ /_/\_\/_/_/_/ /_/ \/_/ /_/ /_/\_\/_/_/_//_/_/_/ = Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755 * We rent the dot in .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] location bar
Hi everyone, I am somewhat new at the use of php and would appreciate if someone could help me with a question re location bar How can a location bar such as the sample below be generated in php to be displayed in web pages ... Location : home:/category:sub_1:/page title Is there a specific setup needed in terms of the directory structure on the server? Or will this only function with database type website? Thanks in advance for any input and helpful ideas ... God bless you with His grace and peace Wolfgang Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/
[PHP] Using fopen to read a URL - DNS Problem?
The following code: $url = http://www.php.net/;; print ( implode( , file( $url ) )); causes my browser to sit and twiddle it's thumbs for ages and then produce: Warning: file(http://www.php.net/;) - Bad file descriptor in myfile.php on line 33 Warning: Bad arguments to implode() in myfile.php on line 33 If, however, I explictly use the IP address: $url = http://208.247.106.187/;; print ( implode( , file( $url ) )); it will successfully dump a copy of the php front page. This says to me that PHP can't resolve names. It is not a problem with the linux box it's running on, given that I ran ping www.php.net on that particular box to find the IP address. Can anyone tell me what I need to do to make it work? Regs Brian White - Brian White Step Two Designs Pty Ltd - SGML, XML HTML Consultancy Phone: +612-93197901 Web: http://www.steptwo.com.au/ Email: [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] Re: variable $PATH_INFO
PHP is configured to loadModule php4ts.dll i don't know configured to pass that variable on ! Richard Lynch [EMAIL PROTECTED] a écrit dans le message : 014601c12459$6e069920$[EMAIL PROTECTED] why can i read PATH_INFO server variable with apache under windows server ? with IIS 5 it's OK how can i ? ? print $PATH_INFO ? - Warning: Undefined variable: PATH_INFO in e:\sitephp\php_edit\htdocs\var.php on line 3 Is Apache configured to pass that variable on? Did you compile as CGI -- IE, are you using Action in your httpd.conf or LoadModule/AddModule? -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] Mail() not setting MIME TYPE
$mail = mail($address, $subject, $body, $headers \nContent-Type: text/html; charset=iso-8859-1\nContent-Transfer-Encoding: 64bit ); Hi peter, You've got a space and a newline right after the headers ($headers).. they shouldn't be there.. and i'd put a \n after 64bit I don't know if that will solve your problem, but from what i understand of headers, it should help :) by the way, make sure that your $headers \nContent-Type: .. etc string is all on the same line... also, why aren't you using the $headers variable for your extra header information? Cheers James Quinn-Hawtin Web Development Training Online International http://www.trainingonline.com.au/ -Original Message- From: Peter Houchin [SMTP:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 4:20 PM To: [EMAIL PROTECTED] Subject:[PHP] Mail() not setting MIME TYPE Hi, can some one please have a look at this and tell me why it's not setting correctly? ? $address .= [EMAIL PROTECTED]; // Subject $subject = VFSA-eRentals Application Form; //Body of email $body = html title VFSA-eRentals Application /title body table tr tdhowdy ho stranger/td /tr tr tdhow aint ya doing/td /tr /table ; $headers .= From: VFSA-eRentals [EMAIL PROTECTED]\n; $headers .= X-Sender: VFSA-eRentals [EMAIL PROTECTED]\n; $headers .= X-Mailer: PHP\n; // mailer $headers .= Return-Path: VFSA-eRentals [EMAIL PROTECTED]\n; // Return path for errors $headers .= X-Priority: 1\n; // Urgent message! /* If you want to send html mail, uncomment the following line */ //$headers .= Content-Type: text/html; charset=iso-8859-1\n; // Mime type //send the email $mail = mail($address, $subject, $body, $headers \nContent-Type: text/html; charset=iso-8859-1\nContent-Transfer-Encoding: 64bit ); ? Now that doesn't show all the html I use in the body but it will give you an idea.. as far as I can tell this script should work and set the content-type to text/html but when it sends the email the Content-Type: text/html; charset=iso-8859-1 is changed to Content-Type: text/plain; charset=us-ascii and I get this after it's set the content type X-BadHeader: html; charset=iso-8859-1 but from looking in the PHP manual and php books I have the way I've tried to set it should be right. if you want to look at my page with the script on let me know and I will send it to you off the list. thanks in advance -- Peter Houchin Sun Rentals STR Manager Phone: 03 9329 1455 Fax: 03 9329 6755 [EMAIL PROTECTED] http://www.sun.com.au/rentals = _ __ /\ /_/_/_\/ |_/ \ /_/_/___ __ __ __ / \ \_/_/_\ /_/ /_/ /_/ /_/ \ _ / ___\_\_\/ /_/_/_/ /_//\/_/\_/ \/\_/ \_//_/_/ /_/_/_/ /_/ \/_/v /_/_/_/_/ /_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ /_/_ _/_/ __ __ __ /_/ __ __ /_/_/_/_/ /_/_/_/ /_/ /_/ /_/ /_/\_\/_//_/_/_/ /_/ \_\ /_/ _/ /_//\/_/ /_/ /_/__\_\ /_/___ _\_\_\ /_/\_\/_/_/_/ /_/ \/_/ /_/ /_/\_\/_/_/_//_/_/_/ = Telephone : (03) 9329 1455 Facsimile : (03) 9329 6755 * We rent the dot in .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] PHP Script causing recursive free() calls (?)
On Tue, 14 Aug 2001 13:45, Chris Cameron wrote: I was told this was a PHP problem, and to submit a bug report. I'm not too sure what such a bug report would look like, or even if this is a PHP problem. Below is the message I sent to an Apache list, could someone tell me whether my problem is crummy code, or an actual problem with PHP/Apache? Thanks Chris -Original Message- From: Chris Cameron [mailto:[EMAIL PROTECTED]] Sent: Friday, August 10, 2001 12:40 PM To: [EMAIL PROTECTED] Subject: PHP Script causing recursive free() calls (?) I've got quite a problem with part of a PHP script I wrote causing Apache too fill up it's error logs with: httpd in free(): warning: chunk is already free. httpd in free(): warning: chunk is already free. httpd in malloc(): warning: recursive call. FATAL: emalloc(): Unable to allocate 256 bytes Each call of this script will put about 20 megs in my error log. My Apache setup is: Apache/1.3.20 (Unix) mod_ssl/2.8.4 OpenSSL/0.9.6b PHP/4.0.6 And my phpinfo page is at chris.upnix.com/index.php The part of my PHP script that's causing the problem (sorry about the wraping): /* If no errors, submit junk to database */ if(!isset($Error)) { for($i = 1; $i = $Days; $i++) { /* Write to bookings first */ $QueryString = INSERT INTO bookings VALUES(nextval('BID'), '$CompanyID', ' . $TimeSpan[$i] . ', '$TimeF', '$TimeT', '$PricePerUnit'); $Query = pg_exec($Connect, $QueryString); $OID = pg_getlastoid($Query); /* Find the BID we were given */ $QueryString = SELECT bid FROM bookings WHERE oid = ' . $OID . '; $Query = pg_exec($Connect, $QueryString); $Result = pg_fetch_array($Query, 0); $BID = $Result['bid']; /* Go through our therapists */ foreach($Therapists[$i] as $Key = $TherapistID) { $QueryString = INSERT INTO bookedtherapist VALUES(' . $BID . ', '$TherapistID', '$TimeF', '$TimeT'); pg_exec($Connect, $QueryString); } } /* Everything Should be done, send us off to schview.php */ header(Location: . $BaseURL . admin/schview.php); exit; } I've tried rewriting little parts of this script, but haven't had any luck in stopping the errors. Also, I've recompiled everything twice now, which also didn't help. Any help would be appreciated. Thanks, Chris This comes from someone who has no experience with Postgres, but I suspect that you may be getting into trouble inside your for and foreach loops where you do apossibly huge number of inserts without freeing used result pointers. Try doing a pg_free_result after each insert and see if that helps. For reporting PHP bugs, try www.php.net and follow the link 'reporting bugs' at the top right :-) -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Fact is solidified opinion -- 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] Sessions in older browsers
Hello: I am using Sessions for user authentication in one of our sites. The problem is now so many users are calling us saying that they are not able to access the site. They have got IE v 4.0 . Are there any problems with sessions in older browser versions. Could anybody please suggest a way to solve this issue. Many thanks Sheni R Meledath [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] Re: prob with session start
Hi! Renze, good afternoon. oh i forgot attachments are not allowed to this group...so i am pasting here... login.html !DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"htmlheadHEADTITLEIMAC/TITLE meta http-equiv="Expires" CONTENT="0" meta http-equiv="Cache-Control" CONTENT="no-cache" meta http-equiv="Pragma" CONTENT="no-cache"/HEADSCRIPT language="Javascript" function check(){ if (document.login.emp_id.value=='') { alert('Please enter your employee number'); document.issue.emp_id.focus(); return false; } else if(document.login.emp_pass.value=='') { alert("Please enter the password"); document.issue.emp_pass.focus(); return false; } else {document.login.method = "POST";document.login.action="http://10.145.2.23/authentication.php";document.login.submit(); return true; } }/script/head body text="arial" background="imacbg1.gif" font face="arial" center h1 WELCOME TO IMAC TOOL /h1/centercenterimg SRC="logo.gif" height=100 width=100/imgpreform name="login" bEmployee No:/b input type="text" size="10" name="emp_id" maxlength="10" value=""brbPassword :/b input type="password" size="10" name="emp_pass" maxlength="10" value=""br input type="button" Value="LOGIN" /form/pre/center/font/body/html authentication.php ?phpheader ("Cache-Control: no-cache, must-revalidate");header ("Pragma: no-cache"); // Connect to MySQL mysql_connect( 'localhost', 'balaji', 'pingpong' ) or die ( 'Unable to connect to server.' ); // Select database on MySQL server mysql_select_db( 'imac' ) or die ( 'Unable to select database.' ); // Formulate the query $sql = "SELECT * FROM employee WHERE emp_id = '$emp_id' AND emp_pass = '$emp_pass'"; // Execute the query and put results in $result $result = mysql_query( $sql ) or die ( 'Unable to execute query.' ); // Get number of rows in $result. $num = mysql_numrows( $result ); if ( $num != 0 ) { // A matching row was found - the user is authenticated. session_start(); session_register('$emp_id'); error_log ("emp_id: $emp_id", 0); error_log ("Lastname: $emp_pass", 0); $row = mysql_fetch_object($result); if ($row-user_type=='S'){ include('super.php'); }else if ($row-user_type=='O'){include('ordinary.php'); } } else { file://User does not exist or not authenticated.echo 'centerh1Authorization Required./h1/center';file://header( 'WWW-Authenticate: Basic realm="Private"' );file://header( 'HTTP/1.0 401 Unauthorized' );exit; } ? logout.php ?phpsession_start();session_unregister($emp_id);session_destroy();?!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"HTMLHEADTITLEThankyou /TITLE meta http-equiv="Expires" CONTENT="0" meta http-equiv="Cache-Control" CONTENT="no-cache" meta http-equiv="Pragma" CONTENT="no-cache" /HEAD BODY background="nightsky.gif" text="white" p centerh1THANKYOU FOR USING IMAC TOOL/h1/centerbrbr center h3Do you want to login again?/h3a href="login.html"clickhere/a /center /p/BODY/HTML Thanks in advance Regards -Balaji Original Message - From: Renze Munnik To: Balaji Ankem Sent: Monday, August 13, 2001 5:46 PM Subject: Re: [PHP] Re: prob with session start On Mon, Aug 13, 2001 at 05:45:27PM +0530, Balaji Ankem wrote: Hi,these are the pages... see u tomorrow.. thankyou.. -BalajiEh... I get the impression you forgot to attach something. Youannounce the files, but they didn't follow... :)-- * RzE:-- -- Renze Munnik-- DataLink BV E: [EMAIL PROTECTED]-- W: +31 23 5326162-- F: +31 23 5322144-- M: +31 6 21811143-- H: +31 23 5516190 Stationsplein 82-- 2011 LM HAARLEM http://www.datalink.nl-- --- Information transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- 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: cropping a string
Thanks for the reply chris, altho that was what I had already. Guess it's down to me measuring chars myself then :-( - Original Message - From: Chris Lee [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 13, 2001 10:28 PM Subject: [PHP] Re: cropping a string function truncate($string, $size) { $new_string = substr($string, 0, $size); $new_string = explode(' ', $new_string); array_pop($new_string); $new_string = implode(' ', $new_string); return $new_string; } this function can defn be improved apon. all this does is trims the string to the spec length and takes the last word (or pastial word) off. you might want to take a look at wordwrap() too, probably not what your looking for though. -- Chris Lee [EMAIL PROTECTED] Tom Carter [EMAIL PROTECTED] wrote in message 01ea01c1243c$36fd1d40$0a00a8c0@bjorn">news:01ea01c1243c$36fd1d40$0a00a8c0@bjorn... hi all I was wondering if anyone had found a solution to the problem of cropping a string to a certain length...however a certain length based upon the actual size of it. By this I don't mean after n characters, or even after m words (have a function for this already)... what I'm looking for is function that will take a string and crop it down to a length dependant upon its size, ie. it would treat a w different to a l (apologies to those reading this on a monospaced client). I'm guessing such a function would take type of font (say, serif ot times) and the desired length in standard characters and then compare the string, translating each character into a length comparative with the standard character. I appreciate tha because of the nature of the medium that it becomes difficult to control how things appear on browsers, and that it would be nigh on impossible to make an *exact* function, all I'm looking for is something rough and ready which is better then counting chars. TIA, Tom -- 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] session_questions() part IV
On Mon, Aug 13, 2001 at 05:59:42PM +0200, Aniceto Lopez wrote: Renze asked: how would you detect whether or not someone has closed his browser? (session is over then) Do I realy need to know this to let or not a registered user navigate some restricted web pages? Aniceto Lopez That question was just a small part of my message. I was explaining that you don't need to destroy the session when someone closes the browser. You were asking if you needed to take some action if the browser closes. But you never can tell when it closes. That's why I mentioned (not really asked) how you thought to detect the browser closing. -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- -- 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: The secrecy of PHP code
James Shaker [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Greetings, [snip] calculations and I code them in PHP for use on a website are they safe from being viewed or taken? If your php-code is on a web-server which gives access to other than you they can read your code. An example could be other people being hosted on the same server.. Regards, Søren -- 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: The secrecy of PHP code
its a problem because the code is not compiled into binary file, and then every one who can browse the directory ( using ftp for example ) can view your code. To prevent this ( as root ) I chroot every user that log to ftp to another directory so they cant go out and browse the /etc /php-directories or what ever. The problem still stays if you open php to system commands like `echo /etc/passwd` or using system() -- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 http://sites.canaan.co.il -- - Original Message - From: Soeren Nielsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 14, 2001 10:56 AM Subject: [PHP] Re: The secrecy of PHP code James Shaker [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Greetings, [snip] calculations and I code them in PHP for use on a website are they safe from being viewed or taken? If your php-code is on a web-server which gives access to other than you they can read your code. An example could be other people being hosted on the same server.. Regards, Søren -- 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] qwestion about %E6%E2%E0%F7%EA%E0
Hi I'm doing the script for searching the mySQL db in Russian language. but output of textform http://localhost/indexr.php3?search_idea=%E6%E2%E0%F7%EA %E0 is not the same as http://localhost/indexr.php3?search_idea=%C6%C2%C0%D7%CA %C0 (this is the same word but first is lower case and second is upper case) so search becomes case sencitive, I don't want to have case sencitive search so, how can I tell to program that both of above are the same word? Thank you for help, Youri -- 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: NEXT - PREVIOUS coding
Hi, what about other possibilities to do this ? Tom Other possibilities? Why not just utilize the second argument of the LIMIT function with a fairly simple SQL query? Here's a portion of a script I wrote, modified to be an example on this matter: ?php $articles_display_limit = 5; // set the number of articles to be displayed on each page /* $article_number sets the position in the database from which the current query results will begin from. $article_number is passed to the script as a GET method variable (i.e article.php?record_number=5) */ $articles = mysql_query(SELECT * FROM articles LIMIT $article_number,$articles_display_limit); $next = $article_number + $articles_display_limit; // next page's starting point $prev = $article_number - $articles_display_limit ; // previous page's starting point $total_number_of_articles = mysql_num_rows(mysql_query(SELECT NULL FROM articles)); /* display this page's articles*/ /* determine if a 'Previous' button is required */ if ($prev = 0) { echo 'a href=article.php?article_number=' . $prev . 'Previous/a' . \n; } /* determine if a 'Next' button is required */ if ($next $total_number_of_articles) { echo 'a href=article.php?article_number=' . $next . 'Next/a' . \n; } ? This should do the trick if I haven't modified too much. There's a good but a bit messy article about it in PHPBuilder: http://phpbuilder.com/columns/rod2221.php3 The script is much more experienced and advanced than my own. --- regards, Boaz Amit Hello Pranot, On 16-Jul-01 06:09:33, you wrote: hi.. friends i have a database (mysql) in which their r many records. Through PHP i want them to display on the page. Main requirement is that there should be a NEXT - PREVIOUS facility. So if there r 20 records and suppose only 10 should show up on scren at a time, then a NEXT link should be visible which could show the remaining 10 records. Their can be n no. of records. Maybe you would like to try this PHP class that does exactly what you are asking. http://phpclasses.UpperDesign.com/browse.html/package/130 Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED] -- E-mail: [EMAIL PROTECTED] URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp -- -- 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: prob with session start
I think I know what it is. The construction I mentioned to avoid the reloading used three pages to login: the login-page, the validation page and then some page that produces output to the user. What you do, is include that output page in the validation page (authentication.php). You shouldn't do that. Instead of the include('super.php') you should use header(Location: super.php) and instead of include('ordinary.php') you should use header(Location: ordinary.php). If you include super.php/ordinary.php you still don't leave authentication.php. That means that one can still reload authentication.php. Then the browser asks for resubmitting the form. If you use header() instead of include() you actually leave authentication.php and go to a different page. The user can ofcourse reload that page, but that page wasn't actually the result of a form-submital so the page will then just be reloaded and no information will be resubmitted. Even if one pushes Back from that page, he/she will not go back to authentication.php but to login.html. And gone is your problem. I think this should be your solution... Oh... btw: in authentication.php: session_register('$emp_id'); should be: session_register(emp_id); and in logout.php: session_unregister($emp_id); should be session_unregister(emp_id); -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- -- 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: Strange session problems. Please help.
I wish someone deletes this post! It's posted with date 2002! I'm gonna see it on the top of my messages for about a year now! I'm using the news server and not mailing list! By Proxy [EMAIL PROTECTED] wrote in message 005301c23ee3$27ba1500$[EMAIL PROTECTED]">news:005301c23ee3$27ba1500$[EMAIL PROTECTED]... Hi. Does anybody know of any issues in PHP 4.0B2 regarding to the handling of session variables on different networks? Here is the problem. I have written a user authentication system using session variables. When the user logs in their name and pass are stored as an associative array (with other details from a database). If the details are invalid the user is booted back to the logon screen. The system worked fine for everyone except myself and one other person who was on the same network (optus@home network). The problem was that although the username and password were sent and stored into the session variables, upon accessing another page the session variables were not carried forward (although the session id was) and so I was thrown back to the login. As I said, this was only true for users on the optus@home network. Fpr anyone else it seemed to be fine. Identical code on a server running PGP 4.0.4pl1 worked universally. I have been tearing my remaining hair out for days on this one now. Does anyone have any suggestions (except for 'Upgrade PHP on the 4.0B2 server' or 'move to a different server'. That, unfortunately is beyond my control :( ) Cheers Lee -- 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: mysql_query()
Actually the mysql_query() seems to accept only one statement at a time. Any work around so i can do query suchs: mysql_query( SELECT 1+1; SHOW DATABASES; USE database1; SELECT * FROM table1; ); Just multiple commands seperated with ';' ? (as if using the Mysql command prompt) -- 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] qwestion about %E6%E2%E0%F7%EA%E0
As I recall MySQL is not case sensitive did you use --with-charset=koi8_ru ( or what ever) when you did ./configure ? snip form INSTALL-SOURCE file of mysql-3.23.40 * By default, *MySQL* uses the ISO-8859-1 (Latin1) character set. To change the default set, use the `--with-charset' option: shell ./configure --with-charset=CHARSET `CHARSET' may be one of `big5', `cp1251', `cp1257', `czech', `danish', `dec8', `dos', `euc_kr', `gb2312', `gbk', `german1', `hebrew', `hp8', `hungarian', `koi8_ru', `koi8_ukr', `latin1', `latin2', `sjis', `swe7', `tis620', `ujis', `usa7', or `win1251ukr'. *Note Character sets::. -- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 http://sites.canaan.co.il -- - Original Message - From: BRACK [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 14, 2001 11:28 AM Subject: [PHP] qwestion about %E6%E2%E0%F7%EA%E0 Hi I'm doing the script for searching the mySQL db in Russian language. but output of textform http://localhost/indexr.php3?search_idea=%E6%E2%E0%F7%EA %E0 is not the same as http://localhost/indexr.php3?search_idea=%C6%C2%C0%D7%CA %C0 (this is the same word but first is lower case and second is upper case) so search becomes case sencitive, I don't want to have case sencitive search so, how can I tell to program that both of above are the same word? Thank you for help, Youri -- 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] Re: location bar
I don't believe such locations can't be displayed. Usually location contains: http://server/directory/file.ext The ':' used in the location denotes the port number that is used to connect to the web server. Maybe javascript can do that. Don't know exactly how. Good luck. Wolfgang Schneider [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi everyone, I am somewhat new at the use of php and would appreciate if someone could help me with a question re location bar How can a location bar such as the sample below be generated in php to be displayed in web pages ... Location : home:/category:sub_1:/page title Is there a specific setup needed in terms of the directory structure on the server? Or will this only function with database type website? Thanks in advance for any input and helpful ideas ... God bless you with His grace and peace Wolfgang Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/ -- 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: mysql_query()
You cant do this. Its even recommended to drop the `;' from the end of the sql command. You can go around using array to store the sql statements and use foreach to run mysql_query with thee sql statement. But I don't think its right way to do thing ! If you intention was to do update one after other then you should use locks or use Postgres :) -- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 http://sites.canaan.co.il -- - Original Message - From: lallous [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 14, 2001 12:59 PM Subject: [PHP] PHP: mysql_query() Actually the mysql_query() seems to accept only one statement at a time. Any work around so i can do query suchs: mysql_query( SELECT 1+1; SHOW DATABASES; USE database1; SELECT * FROM table1; ); Just multiple commands seperated with ';' ? (as if using the Mysql command prompt) -- 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] PUT method support
Hi! How do I use a PUT method support to upload files from the client to the WEB server? Can anyone pls. help me out to find a solution to these problems. It's very urgent regards Rukhiya
[PHP] to include php file into html page
Hi people I have tried to include php file into html page using the syntax below and it said syntax error at this part when the page is loaded. What is wrong with calling php file this way? Or is there any other way to call php file from html page? *** html body script language='JavaScript' src='/include/adjs.php/script /body /html *** Jack [EMAIL PROTECTED] Love your enemies, it will drive them nuts
Re: [PHP] PHP: mysql_query()
No actually I have a .SQL file that is a complete dump of my database. All i want to do is the execute with mysql_query() the whole .SQL which will create databases and tables and fillin fields! Ben-Nes Michael [EMAIL PROTECTED] wrote in message 004701c124a0$e690c860$[EMAIL PROTECTED]">news:004701c124a0$e690c860$[EMAIL PROTECTED]... You cant do this. Its even recommended to drop the `;' from the end of the sql command. You can go around using array to store the sql statements and use foreach to run mysql_query with thee sql statement. But I don't think its right way to do thing ! If you intention was to do update one after other then you should use locks or use Postgres :) -- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 http://sites.canaan.co.il -- - Original Message - From: lallous [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 14, 2001 12:59 PM Subject: [PHP] PHP: mysql_query() Actually the mysql_query() seems to accept only one statement at a time. Any work around so i can do query suchs: mysql_query( SELECT 1+1; SHOW DATABASES; USE database1; SELECT * FROM table1; ); Just multiple commands seperated with ';' ? (as if using the Mysql command prompt) -- 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] SQL script ---------any help
In MS SQL server, table data can be uploaded on webserver by using the Enterprise Manager by using the export option. Is there any feature in Mysql to upload the data on webserver? I understand that it can be done with the help of SQL script file. This is the only way or some another way also is there? Also, Pl. let me know: 1. How to create SQL script file, with what extension it is to be saved? The format? 2. How to call/execute/run that file using php? Can anyone send me sample SQL script file? Thanks in advance??.. Ajay K. Ratra Ludhiana (INDIA) [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] Re: The secrecy of PHP code
Ben-Nes Michael [EMAIL PROTECTED] wrote in message 022201c12498$79178ce0$[EMAIL PROTECTED]">news:022201c12498$79178ce0$[EMAIL PROTECTED]... The problem still stays if you open php to system commands like `echo /etc/passwd` or using system() A problem is also that other web-programers can read your source code through PHP. An example from my page is this: My homepage is here: /hotel/my domain/WWW I can make a php-script that opens /hotels/some other domain/WWW , list the files, view them, steal code from others etc etc. Hope what I wrote gave some sort of meaning :-) /Søren -- 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] to include php file into html page
The language is php, not javascript. Plus I'm not sure if you can use an src attribute, but you can use the include or require functions... http://php.net/manual/en/language.basic-syntax.php On Tuesday 14 August 2001 14:32, you wrote: Hi people I have tried to include php file into html page using the syntax below and it said syntax error at this part when the page is loaded. What is wrong with calling php file this way? Or is there any other way to call php file from html page? *** html body script language='JavaScript' src='/include/adjs.php/script /body /html *** Jack [EMAIL PROTECTED] Love your enemies, it will drive them nuts -- 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]
Fw: [PHP] Re: prob with session start
Hi,Renze i tried u'r last solution first.But it is acting as same .no change. After that i tried u'r first solution i.e removing include and adding header("Location"); It is giving the following error message. Warning: Cannot add header information - headers already sent in c:\www\authentication.php on line 40 Thanks and regards -Balaji - Original Message - From: Renze Munnik To: Balaji Ankem Cc: [EMAIL PROTECTED] Sent: Tuesday, August 14, 2001 2:26 PM Subject: Re: [PHP] Re: prob with session start I think I know what it is. The construction I mentioned to avoid thereloading used three pages to login: the login-page, the validationpage and then some page that produces output to the user.What you do, is include that output page in the validation page(authentication.php). You shouldn't do that. Instead of theinclude('super.php') you should use header("Location: super.php")and instead of include('ordinary.php') you should useheader("Location: ordinary.php"). If you includesuper.php/ordinary.php you still don't leave authentication.php.That means that one can still reload authentication.php. Then thebrowser asks for resubmitting the form. If you use header() insteadof include() you actually leave authentication.php and go to adifferent page. The user can ofcourse reload that page, but thatpage wasn't actually the result of a form-submital so the page willthen just be reloaded and no information will be resubmitted. Evenif one pushes Back from that page, he/she will not go back toauthentication.php but to login.html. And gone is your problem.I think this should be your solution...Oh... btw:in authentication.php: session_register('$emp_id');should be: session_register("emp_id");and in logout.php: session_unregister($emp_id);should be session_unregister("emp_id");-- * RzE:-- -- Renze Munnik-- DataLink BV E: [EMAIL PROTECTED]-- W: +31 23 5326162-- F: +31 23 5322144-- M: +31 6 21811143-- H: +31 23 5516190 Stationsplein 82-- 2011 LM HAARLEM http://www.datalink.nl-- -- 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] --- Information transmitted by this E-MAIL is proprietary to Wipro Limited and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail from your records. -- 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: prob with session start
header() must be before anything is writen on the page - Original Message - From: Balaji Ankem To: [EMAIL PROTECTED] Sent: Tuesday, August 14, 2001 8:10 PM Subject: Fw: [PHP] Re: prob with session start Hi,Renze i tried u'r last solution first.But it is acting as same .no change. After that i tried u'r first solution i.e removing include and adding header(Location); It is giving the following error message. Warning: Cannot add header information - headers already sent in c:\www\authentication.php on line 40 Thanks and regards -Balaji - Original Message - From: Renze Munnik To: Balaji Ankem Cc: [EMAIL PROTECTED] Sent: Tuesday, August 14, 2001 2:26 PM Subject: Re: [PHP] Re: prob with session start I think I know what it is. The construction I mentioned to avoid the reloading used three pages to login: the login-page, the validation page and then some page that produces output to the user. What you do, is include that output page in the validation page (authentication.php). You shouldn't do that. Instead of the include('super.php') you should use header(Location: super.php) and instead of include('ordinary.php') you should use header(Location: ordinary.php). If you include super.php/ordinary.php you still don't leave authentication.php. That means that one can still reload authentication.php. Then the browser asks for resubmitting the form. If you use header() instead of include() you actually leave authentication.php and go to a different page. The user can ofcourse reload that page, but that page wasn't actually the result of a form-submital so the page will then just be reloaded and no information will be resubmitted. Even if one pushes Back from that page, he/she will not go back to authentication.php but to login.html. And gone is your problem. I think this should be your solution... Oh... btw: in authentication.php: session_register('$emp_id'); should be: session_register(emp_id); and in logout.php: session_unregister($emp_id); should be session_unregister(emp_id); -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- -- 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] Need people's advice on a web registration system.
Hi all! I'm trying to build a registration system for a community site that I'm building, and was wondering if people could give me advice or tell me about problems they've been having?? I'm planning to let people register with a username and password (encrypted), and then make them login with that, and thus putting a cookie on their machine. If the cookie is detected the next time, they don't have to login, but if it is, then they do. Sounds pretty simple?? Any advice? TIA! sunny Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie -- 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: mysql_query()
For that MySQL team designed the Mysql client to get input from file and execute it. do system ( mysql sql.fie); or `mysql sql.fie`; dont forget to use -D and -p if User is required. - Original Message - From: lallous [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 14, 2001 1:29 PM Subject: Re: [PHP] PHP: mysql_query() No actually I have a .SQL file that is a complete dump of my database. All i want to do is the execute with mysql_query() the whole .SQL which will create databases and tables and fillin fields! Ben-Nes Michael [EMAIL PROTECTED] wrote in message 004701c124a0$e690c860$[EMAIL PROTECTED]">news:004701c124a0$e690c860$[EMAIL PROTECTED]... You cant do this. Its even recommended to drop the `;' from the end of the sql command. You can go around using array to store the sql statements and use foreach to run mysql_query with thee sql statement. But I don't think its right way to do thing ! If you intention was to do update one after other then you should use locks or use Postgres :) -- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 http://sites.canaan.co.il -- - Original Message - From: lallous [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 14, 2001 12:59 PM Subject: [PHP] PHP: mysql_query() Actually the mysql_query() seems to accept only one statement at a time. Any work around so i can do query suchs: mysql_query( SELECT 1+1; SHOW DATABASES; USE database1; SELECT * FROM table1; ); Just multiple commands seperated with ';' ? (as if using the Mysql command prompt) -- 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] Re: Apache/PHP File Upload problems
Thanks for the message Richard, I've been advised to upgrade to a new version (now running 4.0.6) and it works fine. Martin Richard Lynch wrote: If I try to submit a file for upload using the form using Netscape I get Document contains no data. If I do the same in IE5.0 it just waits forever. Looking at the apache server error_log file I appear to be getting a Segmentation Fault (11) each time I try and Post the contents of the form to the server. It should just work. Your page *IS* trying to return some HTML as well as dealing with the uploaded file, right?... With the segfault, read the instructions on http://bugs.php.net about generating a back-trace to submit. You may want to back off of the -dev version (development == untested) and go with an actual release. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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: How give a 'timed' online quiz?
Hello, I did an timed online quiz using session variables for my timer. It work fine. When the user start the quiz, you check the time and calculate the duration of your quiz. exemple: 20:00 + 60 min = 21:00 So you register 2100 in a session variable Each subsequent request you make shure the current time is still below 2100 or you stop the quiz and tell user. py - Original Message - From: Evan Nemerson [EMAIL PROTECTED] To: Bryan Cyngon Helmkamp [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, August 14, 2001 1:16 AM Subject: Re: [PHP] Re: How give a 'timed' online quiz? You can't do this and keep it tamper-proof with JavaScript/PHP. No matter what, anyone with an IQ above that of a tree stump could play with the POST variables. I think the only way to do this and keep it tamper proof would be a Java applet. If memory serves, you can have record the time on the server, and have each answer sent as it is answered. If you had a web site that posted forms to the server after every answer, the transmission time would have a big effect. No, Java is the way to go. On Monday 13 August 2001 19:18, you wrote: You could have PHP insert a hidden form value holding the start time in the form. Then compare the start time with the current time when they submit and handle as needed. You could somehow encrypt the start time to prevent tampering. -Bryan -- 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] session security issue
I have pages that uses session for security that looks something like this: ?php session_start(); if( !isset($uid) ) { include(include/auth.inc.php); auth_user(); } more code... ? so $uid tells me if the user is logged on or not... but what if somebody calls the script directly from the address bar like this: http://server/script.php?uid=10 wouldn't this be a security problem? . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- 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] session security issue
On Tue, Aug 14, 2001 at 08:42:22AM -0300, Christian Dechery wrote: I have pages that uses session for security that looks something like this: ?php session_start(); if( !isset($uid) ) { include(include/auth.inc.php); auth_user(); } more code... ? so $uid tells me if the user is logged on or not... but what if somebody calls the script directly from the address bar like this: http://server/script.php?uid=10 wouldn't this be a security problem? Christian, This can indeed be a security issue. Try using $HTTP_SESSION_VARS{uid} instead. It's a saver solution. Then one cannot just use ?uid=10 in order to fool you. At least, not in that way. -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- -- 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: inserting a remote html file
Re: inserting a remote html file Minardi boy [EMAIL PROTECTED] wrote: Hello I wanted the user to choose certain html files (one or more) via a checkbox and then insert them into the new php site. The checkbox thing is okay but I keep recieveing errors on the php site Could you help me? *** html body Here is your required information ?php if ($choice==arlberg) { include (C:\\inetpub\\wwwroot\\page1.html); } if ($choice==paznauntal) { include (C:\\inetpub\\wwwroot\\page2.html); } if ($choice==otztal) { include (C:\\inetpub\\wwwroot\\page3.html); } else { echo (Please select a Skiing resort); } ? /body /html *** Thanks RJ You wrote the path with backslashes (\). An inclusion path should be written with regular slashes: include('C:/inetpub/wwwroot/page1.html'); --- Regards, Boaz Amit -- 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] session security issue
If you test $HTTP_SESSION_VARS[uid] instead, you'll know that it came from a session and not from a GET variable. - Tim On 14 Aug 2001 08:42:22 -0300, Christian Dechery wrote: I have pages that uses session for security that looks something like this: ?php session_start(); if( !isset($uid) ) { include(include/auth.inc.php); auth_user(); } more code... ? so $uid tells me if the user is logged on or not... but what if somebody calls the script directly from the address bar like this: http://server/script.php?uid=10 -- 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] ucwords Except 'The' 'And' etc?
I know, I know, I have a lot of work to do...I shouldn't be doing this. I did get to play with PCRE regexps here, though...lotsa cool features over eregs!. Anyway, here's a *** NEW!!! IMPROVED!!! *** version of smart_ucwords(), that's probably way too much overkill. I did some quick tests, seems to work. Beware of email-induced line-wrapping, particularly in the comment black quoted strings: ?php function smart_ucwords($String, $ForceCase=1, $CapitalizeTrailing=1) { # # A more sophisticated approach to title-casing. # ## PARAMETERS ## # # $String string Input string. # $ForceCase 0|1 If true, will force title case (only first letter #capitalized, no matter what case the string is in. # $CaptializeTrailing 0|1 If true, will capitalize a normally-excepted #word if it is the last word in the string. So, a #string like 'Shot In the Dark, A' works properly. # ## USAGE NOTES # # # The Exception List words should be in the case you desire; normally this will # be lowercase. # # The Invariant List contains words and titles (eg; NASA, MySQL, PostGreSQL, # eBusiness) whose capitalization should be fixed, no matter what. # # If one of these arrays is not to be used, simply set it to array(). # ## MODIFICATION HISTORY # # 14 august 2001: S. Edberg, UCDavis [EMAIL PROTECTED] # Original # $EXCEPTION_LIST = array( 'a', 'an', 'and', 'at', 'but', 'for', 'nor', 'or', 'some', 'the', 'to', 'with' ); $INVARIANT_LIST = array( 'NASA', 'MySQL', 'PostGreSQL', 'eBusiness' ); # First, strip save leading trailing whitespace preg_match( '/^(\s*?)(.*)(\s*)$/U', ($ForceCase ? strtolower($String) : $String), $StringParts ); # Replace exception words $String = ucwords($StringParts[2].($CapitalizeTrailing ? '' : ' ')); foreach ($EXCEPTION_LIST as $Word) { $String = preg_replace(/(\s+)$Word(\s+)/i, \\1$Word\\2, $String); } # Replace invariants $String = $String ; foreach ($INVARIANT_LIST as $Word) { $String = preg_replace(/(\s+)$Word(\s+)/i, \\1$Word\\2, $String); } # Replace whitespace and return return $StringParts[1].trim($String).$StringParts[3]; } ? At 4:09 PM -0500 8/13/01, Jeff Oien wrote: Fabulous. Thanks to Steve and Mark. Exactly what I needed. Jeff Oien Something like this, perhaps (untested): I needed this too so I just tested it. function smart_ucwords($String) { $ExceptionList = array('the', 'an', 'a'); # should all be in lowercase $String = ucwords(strtolower(ltrim($String))); # LINE A foreach ($ExceptionList as $Word) { $String = eregi_replace([[:space:]]+$Word[[:space:]]+, $Word, $String); } this line should be more like: $String = eregi_replace(([[:space:]]+).$Word.([[:space:]]+), \\1.$Word.\\2, $String); return $String; # LINE B } thanks! - Mark -- +-- Factoid: Of the 100 largest economies in the world, 51 are --+ | Steve Edberg University of California, Davis | | [EMAIL PROTECTED] Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +--- corporations -- http://www.ips-dc.org/reports/top200text.htm ---+ -- 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] to include php file into html page
At 4:32 PM -0500 8/14/01, Jack wrote: Hi people I have tried to include php file into html page using the syntax below and it said syntax error at this part when the page is loaded. What is wrong with calling php file this way? Or is there any other way to call php file from html page? *** html body script language='JavaScript' src='/include/adjs.php/script /body /html *** Well first of a PHP script is not a JavaScript. You need to actually use a php statement to include a php, text, or other file type. There are two methods for including a file, the general include, or the more stringent, require file. I've included a sample if both statements below: html ?php require(/web/ftp/biz/path_to_file/html/includes/globals.php3); include(/web/ftp/biz/path_to_file/html/includes/location.php3); ? ?php require($gBasePath . /includes/header.php); include($gBaseURL . /includes/header.php); ? ?php require(/includes/header.php); include(/includes/header.php); ? .. You'll note some differences: The first require statement basically indicates the page shouldn't run or display unless this file is found. The path_to_file is given implicitly from the server root rather than from the .html folder. You can require a file for many reasons, but in general I do so only if the information absolutely needs to be included on the page. So for template pages: header, footer, and startBody, closeBody statements are all required, as well as a global file and a config file, just in case, we rapidly ad a MySQL statement. The second statement is an include statement, which can use absolute or relative path. The following two statements use the same method, but call on specifications defined in the globals file. The global file defines a BaseURL (http://www.yourdomain.net), and a BasePath (/web/path_to_file). Once defined they can be used to specify a full path in more relative terms. This is useful for files that are called throughout the site, since if your always using a header, on ever page, regardless of directory, you don't want to code for it ../includes/header.php on one page and ../../../includes/header.php on the next. A global base or global url, will keep the code portable, short, and sweet. The last two statements basically specify relative paths, for including files within the same folder. Alnisa -- . Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . applying technology to transform . -- 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: mysql_query()
At 2:21 PM +0200 8/14/01, lallous wrote: I can't execute MySql via system() I have no rights! Generally ISPs either give you shell rights or access to PHPMyAdmin, if they give access to a MySQL database. Otherwise, you'd never be able to add tables, or modify data. If PHPMyAdmin is installed, you can general locate it in the following manner: your_url/phpmyadmin So http://www.my_crazy_domain.com/phpmyadmin You'll need to enter your database username and password, but this will allow you to upload INSERT statements, perform routine MySQL tasks, as well as run SQL queries. Otherwise you need to request shell access from your ISP. Some ISPs only provide it when asked. Alnisa -- . Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . applying technology to transform . -- 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: Storing Credit Card Numbers, etc.
Hi, I agree completly with him. You should go through another entity for payment. You should go through some company that ensures you reliability and security. Here in Europe there are a lot of histories about company databases being hacked and loosing up to 15.000 cc numbers. By no way you could get the security these companies can offer you. Try these ones (I do not endorse to any of these companies or have no information about them) ccbill.com or americanbank.com. I recomend you browsing through the net for more. Also for the private information you should use SSL in the trasactions. Hope this helps Sean C. McCarthy SCI, S.L. (www.sci-spain.com) Richard Lynch wrote: I'm new to PHP and to e-commerce. Needless to say, I've done a lot of studying over the last few weeks and I'm ready to dive in head first! Actually, you're not... Sorry. The fact that you want to store data in flat files, and that you want to store CREDIT CARD INFO the way you describe tells me that you haven't read enough. I'll be building an e-commerce site and I'll be using PHP. I'd like customers to have the option of saving their information so that they don't have to enter it each time they purchase -- much like Buy.com does or like Amazon.com's One-Click feature. Those are nice features, *IF* the information is stored and accessed properly. This means that the customer will be storing information like one or more credit cards, shipping addresses, billing addresses, etc. I'm planing on storing all information in flat files so that I don't have the additional expense of using MySQL (My ISP is charging 24.95/month extra for MySQL service). Consider moving to a different server. $24.95/month should get you everything you need including MySQL *UNLESS* you're a high-volume site with 10,000+ hits/day or heavy bandwidth like audio/video. So the question is: How can I store each customer's information safely? Can I use .htaccess and .htpasswd to help me out? Or don't they even apply? .htaccess and htpasswd would be okay for AUTHENTICATION of a few people, but if your server is running PHP as a Module, you're better off using PHP to do the HTTP Authentication. See the PHP manual online for sample code. http://php.net/ Authenticating a user as a specific customer is COMPLETELY SEPARATE from safely storing their credit card information. My intention is to store the user's password encoded with md5 or something and also to develop my own cipher for disguising the credit card numbers as well. Any suggestions? Don't. md5 is useless for this, and developing your own cipher is out-and-out silly unless you are a cryptography expert. When Amazon et al store a credit card number, they have a very specific custom setup for that, involving: A separate dedicated computer *NOT* directly connected to the Internet to store the cc info. These machines are: accessible via a SECOND Ethernet card in the web-servers invisible to the outside world only accept connections to the Database server -- no other software installed only accept data from that one Ethernet cable physically accessible only to trusted few Further, even their web-servers are DEDICATED machines, not shared-access at an ISP. These machines will have an extremely limited number of users able to directly access them. Yours has several hundred untrusted users. In short, if you are balking at $24.95 a month for MySQL, your budget is *NOWHERE* *NEAR* within reach of the hardware/software/facilities required to safely STORE credit card numbers. By all means, feel free to hook up with a third-party firm to process your credit cards in real-time. But you'll have to forego the STORAGE of credit card info feature for now. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm -- 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] SQL script ------ .any help
Hi, In MS SQL server, table data can be uploaded on webserver by using the Enterprise Manager by using the export option. Is there any feature in Mysql to upload the data on webserver? I understand that it can be done with the help of SQL script file. This is the only way or some another way also is there? Also, Pl. let me know: 1. How to create SQL script file, with what extension it is to be saved? The format? 2. How to call/execute/run that file using php? Can anyone send me sample SQL script file? Thanks in advance??.. Ajay K. Ratra Ludhiana (INDIA) [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] Re: call to unsupported or undefined function mysql_connect()
On Tue, 14 Aug 2001, Luis Brito wrote: Hi at all. I get this problem, I use a sparcstation 20 and my system is debian potato, I installed php3,php-mysql and mysql I did with the command apt-get install. Then I do not understand why that happen?, because I think that I did well, and I apreciated if somebody can help me to fix this. Thanks Luis Brito -- 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: mysql_query()
I have made this a small script called SQL2PHP, --- html headtitleSQL2PHP/title/head body pre ? /* SQL2PHP v0.1 by [EMAIL PROTECTED] You may use this script as long as you credit the original author */ function parse_sql_stream($all) { $len = strlen($all); $lines = array(); $inquotes = false; $lastquote = ''; $lastch = \xa; $start = 0; $incomment1 = false; $incomment2 = false; $brokestr = ; for ($i=0;$i$len;$i++) { $ch = $all[$i]; // single line comment - ON if ( $ch == '#' !$inquotes) { $incomment1 = true; continue; } // single line comment - OFF if ($incomment1 ($ch == \r || $ch == \n)) { $incomment1 = false; $start = $i; continue; } // multiline comment - ON if (!$inquotes $lastch == '/' $ch == '*') { $incomment2 = true; $brokestr = substr($all, $start, $i - $start - 1); continue; } // multiline comment - OFF if ($incomment2 $ch == '/' $lastch=='*') { $incomment2 = false; $start = $i+1; continue; } // inquote desicions if (($ch == '\'' || $ch=='')) { if (!$inquotes) { $lastquote = $ch; $inquotes = true; } else $inquotes = ( ($lastch == \\ $ch == $lastquote) || ($ch != $lastquote) ); } // new statment decision if ($ch == ';' !$inquotes !$incomment1 !$incomment2) { $lines[] = trim($brokestr . trim(substr($all, $start, $i - $start))); $brokestr = ; $i++; // skip the ';' $start = $i; } // update last read character $lastch = $ch; } // for i return $lines; } function parse_sql_file($filename) { $fp = fopen($filename, 'rb'); $all = fread($fp, filesize($filename)); fclose($fp); return parse_sql_stream($all); } set_time_limit(0); mysql_connect('localhost', 'test', 'test'); $test = parse_sql_file('file3.sql'); for ($i=0; $icount($test);$i++) { $result = mysql_query($test[$i]); if (!$result) { echo Failed at line $i with query:\n{$test[$i]}\nMySql error: . mysql_error() . \n; break; } } echo done!\n; ? /pre /body /html --- file3.sql can contain: --- DROP DATABASE t; CREATE DATABASE t; USE t; # # Table structure for table 'brands' # DROP TABLE /*!32200 IF EXISTS*/ brands; CREATE TABLE /*!32300 IF NOT EXISTS*/ brands ( id int(10) unsigned NOT NULL auto_increment, language tinyint(2) DEFAULT '1' , company varchar(50) , countryid int(10) unsigned , name varchar(50) NOT NULL DEFAULT '' , logo varchar(200) NOT NULL DEFAULT '' , description mediumtext NOT NULL DEFAULT '' , PRIMARY KEY (id) ); # # Dumping data for table 'brands' # INSERT INTO brands VALUES(122,1,NULL,12,Hummer,,); INSERT INTO brands VALUES(2,1,NULL,12,Buick,,); INSERT INTO brands VALUES(3,1,NULL,12,GMC,,); INSERT INTO brands VALUES(4,1,NULL,12,Jeep,,); INSERT INTO brands VALUES(5,1,NULL,12,Ford Motor Company,,); INSERT INTO brands VALUES(6,1,NULL,12,Opel,,); INSERT INTO brands VALUES(7,1,NULL,12,Audi,,); INSERT INTO brands VALUES(8,1,NULL,12,BMW,,); INSERT INTO brands VALUES(9,1,NULL,12,Porche,,); INSERT INTO brands VALUES(10,1,NULL,12,Mercedes,,); INSERT INTO brands VALUES(11,1,NULL,12, Infinity*,,); INSERT INTO brands VALUES(12,1,NULL,12,Isuzu,,); INSERT INTO brands VALUES(13,1,NULL,12,Subaru,,); INSERT INTO brands VALUES(14,1,NULL,12,Suzuki,,); INSERT INTO brands VALUES(15,1,NULL,12,Mazda,,); INSERT INTO brands VALUES(16,1,NULL,12,Mitsubishi Motors,,); INSERT INTO brands VALUES(17,1,NULL,12,Honda,,); INSERT INTO brands VALUES(18,1,NULL,12,Alfa Romeo,,); # as much as you want!!! # --- Hope someone make use of it! I tried it with a SQL file with 32554 lines long! //elias Lallous [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Actually the mysql_query() seems to accept only one statement at a time. Any work around so i can do query suchs: mysql_query( SELECT 1+1; SHOW DATABASES; USE database1; SELECT * FROM table1; ); Just multiple commands seperated with ';' ? (as if using the Mysql command prompt) -- 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] qwestion about %E6%E2%E0%F7%EA%E0
I can do this on my local server but I can't do it on provider's server, can I do anything else? Youri On 14 Aug 2001, at 12:03, Ben-Nes Michael wrote: As I recall MySQL is not case sensitive did you use --with-charset=koi8_ru ( or what ever) when you did ./configure ? snip form INSTALL-SOURCE file of mysql-3.23.40 * By default, *MySQL* uses the ISO-8859-1 (Latin1) character set. To change the default set, use the `--with-charset' option: shell ./configure --with-charset=CHARSET `CHARSET' may be one of `big5', `cp1251', `cp1257', `czech', `danish', `dec8', `dos', `euc_kr', `gb2312', `gbk', `german1', `hebrew', `hp8', `hungarian', `koi8_ru', `koi8_ukr', `latin1', `latin2', `sjis', `swe7', `tis620', `ujis', `usa7', or `win1251ukr'. *Note Character sets::. -- Canaan Surfing Ltd. Internet Service Providers Ben-Nes Michael - Manager Tel: 972-4-6991122 http://sites.canaan.co.il -- - Original Message - From: BRACK [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 14, 2001 11:28 AM Subject: [PHP] qwestion about %E6%E2%E0%F7%EA%E0 Hi I'm doing the script for searching the mySQL db in Russian language. but output of textform http://localhost/indexr.php3?search_idea=%E6%E2%E0%F7%EA %E0 is not the same as http://localhost/indexr.php3?search_idea=%C6%C2%C0%D7%CA %C0 (this is the same word but first is lower case and second is upper case) so search becomes case sencitive, I don't want to have case sencitive search so, how can I tell to program that both of above are the same word? Thank you for help, Youri -- 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: mysql_query()
Basically I have PHPMyAdmin... If I am to paste the 33,000+ lines SQL query the PHPMyAdmin would take more than 30secs to execute it which will make everything fail! Anyway, I solved it. Check the recent post in the same thread about SQL2PHP script. Alnisa Allgood [EMAIL PROTECTED] wrote in message news:p05100305b79ec2415b87@[63.202.15.82]... At 2:21 PM +0200 8/14/01, lallous wrote: I can't execute MySql via system() I have no rights! Generally ISPs either give you shell rights or access to PHPMyAdmin, if they give access to a MySQL database. Otherwise, you'd never be able to add tables, or modify data. If PHPMyAdmin is installed, you can general locate it in the following manner: your_url/phpmyadmin So http://www.my_crazy_domain.com/phpmyadmin You'll need to enter your database username and password, but this will allow you to upload INSERT statements, perform routine MySQL tasks, as well as run SQL queries. Otherwise you need to request shell access from your ISP. Some ISPs only provide it when asked. Alnisa -- . Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . applying technology to transform . -- 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] session security issue
Hi, For security use SSL and get the SSLSession ID instead. This cannot be fooled since it is based in PK handshake and with simetric encryption. Sean C. McCarthy SCI, S.L. (www.sci-spain.com) Christian Dechery wrote: I have pages that uses session for security that looks something like this: ?php session_start(); if( !isset($uid) ) { include(include/auth.inc.php); auth_user(); } more code... ? so $uid tells me if the user is logged on or not... but what if somebody calls the script directly from the address bar like this: http://server/script.php?uid=10 wouldn't this be a security problem? . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- 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] session_questions(end)
thanks everybody helping to clear my mind with sessions affair. many people asking about this so two possible problems: coders don't read manuals carefully or the info there is not so clear. [ trying to help a little bit newbies like me, as soon as I finish this navigation access for logged users work I'll post the php files ] aniceto lopez http://www.lamundial.net visit us, download and spread our music -- 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] bizarre problems with php_gd.dll and IIS
I am running sites that use both PHP4 and ASP. Both types of sites are running on IIS4. I've just recently started using the php_gd.dll to resize images in PHP. It appears to run fine, until the gd library generates any sort of error. As soon as that happens, all ASP pages on the entire server become inaccessible. HTML and PHP pages are still fine, as is everything else, but ASP just hangs. The only fix I've found is a complete reboot of the system. Needless to say, I am finding this incredibly frustrating. Has anyone seen similar behavior to this before, and does anyone have a solution. Thanks. Michael Hall Lead Web Developer / Database Engineer Prairie Fire Internet Technologies [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] Instalation
Help me. I have RED HAT Linux 7.0 and I want install Apache web server with php and mysql support. How ? I have : apache_1.3.20.tar.gz php-4.0.6.tar.gz mysql-3.23.38.tar.gz thanx roman -- 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: The secrecy of PHP code
On Tue, 14 Aug 2001 12:06:01 +0200 impersonator of [EMAIL PROTECTED] (Soeren Nielsen) planted I saw in php.general: Ben-Nes Michael [EMAIL PROTECTED] wrote in message 022201c12498$79178ce0$[EMAIL PROTECTED]">news:022201c12498$79178ce0$[EMAIL PROTECTED]... The problem still stays if you open php to system commands like `echo /etc/passwd` or using system() A problem is also that other web-programers can read your source code through PHP. An example from my page is this: My homepage is here: /hotel/my domain/WWW I can make a php-script that opens /hotels/some other domain/WWW , list the files, view them, steal code from others etc etc. Hope what I wrote gave some sort of meaning :-) Well. Skliar's example do confirm once again, that programmers _can_ do illegal things, like breaking copyrihgt, stealing the code etc. But is is responsibilities of the servers administrators to configure the system in such a way - even if it has multiply users (which is the case for most) - so to not allow such (and alike) sample opening occur outside of web-server structure. And only owner/user of the site has a passworded FTP and other access to his data outside of web-server. Of course passwords could be compromised, but this is an another matter. All in all - I strongly believe - that server stuff is carriing full responsibility for the above matter. And only the should have root access. PS: There are servers, to my surprise, (i rent one:() that set write group attribute for files on download by default, and then refuse executing them on this basis, so you have to re-set attribute manually. But this alone still doesn't allow others to read .php as source (these files can only be overwritten) /Søren Just my legal 2c i leonid. -- 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] Session preserve
Hello! I am VERY new to php and i have a question (maybe it's pretty simple, but i couldn't get it work): I have a form page where i start a session. I cannot use php auth because the server does not run php as a module. Supposing the client has cookies disabled, please tell me how to propagate my session variables from the form page to another (i found that SID can be used in url to preserve session id) but when i get to the other page (with header(Location: http://theserver/result.php?SID=$SID;), nothing is there but the SID variable. As you could probably figured out, i cannot allow to see the information entered in the form listed in url. So, please help me! thanks, Maxx [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] Regular Expression Problem and PHP 4 (urgent)
Here is the problem: I'm retrieving a page of data from another process using PHP4 on Solaris 2.51 This data is placed in an array by line and simply returned to the browser after formatting. A sample line may look something like this: blah blah blah blah blah Link blah blah blah blah Link I think I need to use eregi_replace to make the line look like this: blah blah blah blah blah a href='#'Link/a blah blah blah blah a href='#'Link/a when it is returned to the browser. Thanks in advance Ross -- 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] bizarre problems with php_gd.dll and IIS
Usually when PHP brings other IIS services down it is because you are running the ISAPI module version of PHP rather than the CGI. If this is the case, you need to switch to using php.exe. Cheers -- Phil Driscoll -- 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] Instalation
check de readme or install files provided in each one ! At 15:39 14/08/01 +0200, Roman wrote: Help me. I have RED HAT Linux 7.0 and I want install Apache web server with php and mysql support. How ? I have : apache_1.3.20.tar.gz php-4.0.6.tar.gz mysql-3.23.38.tar.gz thanx roman -- 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] EuroVox 4, place Félix Eboue 75583 Paris Cedex 12 Tel : 01 44 67 05 05 Fax : 01 44 67 05 19 Web : http://www.eurovox.fr -- 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 people's advice on a web registration system.
I think, when they register or log in the first time, ask to the user if they want you to remember them by placing a cookie.. Don't do it automaticaly ! Most people doesn't like that, and if they are not on their computer (web bar, or at the office...), they could not like this... At 11:43 14/08/01 +0100, sunny AT wde wrote: Hi all! I'm trying to build a registration system for a community site that I'm building, and was wondering if people could give me advice or tell me about problems they've been having?? I'm planning to let people register with a username and password (encrypted), and then make them login with that, and thus putting a cookie on their machine. If the cookie is detected the next time, they don't have to login, but if it is, then they do. Sounds pretty simple?? Any advice? TIA! sunny Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie -- 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] EuroVox 4, place Félix Eboue 75583 Paris Cedex 12 Tel : 01 44 67 05 05 Fax : 01 44 67 05 19 Web : http://www.eurovox.fr -- 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: mysql_query()
At 4:05 PM +0200 8/14/01, _lallous wrote: Basically I have PHPMyAdmin... If I am to paste the 33,000+ lines SQL query the PHPMyAdmin would take more than 30secs to execute it which will make everything fail! Anyway, I solved it. Check the recent post in the same thread about SQL2PHP script. You don't have to past, you just upload the file, as a SQL query, and select go. If the file still fails, just break it in two. fileinsert1.sql, fileinsert2.sql, I've seen people insert over 60,000 records this way no errors. I've personally never worked with more than 10,000 records at a time, but if time outs are the issue, then just break the file into smaller files. Alnisa -- . Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . applying technology to transform . -- 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: problems sorting an associative array...
Use arsort(), and while you're in the manual ( http://www.php.net/manual/en/ref.array.php http://www.php.net/manual/en/ref.array.php ) familiarise yourself with all the other sort functions (and array functions in general). There's some useful stuff there that you might not expect, and therefore not look for. Tim Ward Senior Systems Engineer Please refer to the following disclaimer in respect of this message: http://www.stivesdirect.com/e-mail-disclaimer.html -- From: Ben Rigby [SMTP:[EMAIL PROTECTED]] Sent: 13 August 2001 20:21 To: [EMAIL PROTECTED] Subject: problems sorting an associative array... hi. any help would be mych appreciated! i'm trying to sort an associative array, but when i do, the key is converted into a number (it should be a string). ie: $email_array[[EMAIL PROTECTED]]=1; $email_array[[EMAIL PROTECTED]]=4; $email_array[[EMAIL PROTECTED]]=10; rsort ($email_array); i'm trying to sort by the value and then echo out the key and value together, but when i do, the key is always a number, rather than the email address that i wanted. any ideas?? 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] Anyone using Interbase/Linux?
I am having a problem starting Interbase 6.0 on RH 7.1. Anyone using Interbase on Red hat 7.1? Todd -- Todd Cary Ariste Software [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: mysql_query()
I have PHPMyAdmin 2.21 I only see GO button, where can I upload my SQL file? Alnisa Allgood [EMAIL PROTECTED] wrote in message news:p05100309b79edae8263f@[63.202.15.82]... At 4:05 PM +0200 8/14/01, _lallous wrote: Basically I have PHPMyAdmin... If I am to paste the 33,000+ lines SQL query the PHPMyAdmin would take more than 30secs to execute it which will make everything fail! Anyway, I solved it. Check the recent post in the same thread about SQL2PHP script. You don't have to past, you just upload the file, as a SQL query, and select go. If the file still fails, just break it in two. fileinsert1.sql, fileinsert2.sql, I've seen people insert over 60,000 records this way no errors. I've personally never worked with more than 10,000 records at a time, but if time outs are the issue, then just break the file into smaller files. Alnisa -- . Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . applying technology to transform . -- 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] Instalation
Hi Roman, I think that the follow page can help you: http:// jips.kipelhouse.com/linux/apache/ssl/ Try . On Tue, 14 Aug 2001, Roman wrote: Help me. I have RED HAT Linux 7.0 and I want install Apache web server with php and mysql support. How ? I have : apache_1.3.20.tar.gz php-4.0.6.tar.gz mysql-3.23.38.tar.gz thanx roman -- 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] unlink() and safe mode....
Hello I'm trying to do the following: allow a user to upload a file to a directory, and also allow them to delete that very file again. The uploading part works using http post, the file is saved with as UID the UID of www/www (on this particular ISP). Now, when I try to delete the filem I get a warning like this: Warning: SAFE MODE Restriction in effect. The script whose uid is 97613 is not allowed to access ../images/2/file.jpg owned by uid 1001 in script on line 5 What am I to do to make this work? I've considered using chown, but that's restricted to the SU... Anyone got a clue? Thanks, Jan -- 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] Select
Hi, I'm having a problem with my Select statement. This is what i'm doing: $connection = @mysql_connect(l, c, c) or die(Couldn't connect.); $db = @mysql_select_db($db_name, $connection) or die(Couldn't select database.); $sql = SELECT * FROM table_1 ; $result = @mysql_query($sql,$connection) or die(Couldn't execute query.); $data=mysql_fetch_row($result); $count=$data[0]; echo $count; Yet the only result I get is the first value of the first column. -- 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] Select
thats because mysql_fetch_row only returns one row. to get all the rows do while ($row = mysql_fetch_array($result) { //processing code here } This will run through all the rows putting the colums into the array $row[] Regards Jon -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07968 524175 PGP Key available, send blank email to [EMAIL PROTECTED] -Original Message- From: Jeremy Morano [mailto:[EMAIL PROTECTED]] Sent: 14 August 2001 15:53 To: [EMAIL PROTECTED] Subject: [PHP] Select Hi, I'm having a problem with my Select statement. This is what i'm doing: $connection = @mysql_connect(l, c, c) or die(Couldn't connect.); $db = @mysql_select_db($db_name, $connection) or die(Couldn't select database.); $sql = SELECT * FROM table_1 ; $result = @mysql_query($sql,$connection) or die(Couldn't execute query.); $data=mysql_fetch_row($result); $count=$data[0]; echo $count; Yet the only result I get is the first value of the first column. -- 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] Select
Jeremy Morano wrote: ... $data=mysql_fetch_row($result); $count=$data[0]; echo $count; Yet the only result I get is the first value of the first column. Of course, and $data[1] is the first value of second column, etc. If you want to get all result, use while-loop like this: ? while ($data=mysql_fetch_row($result)) { ... // do here something with $data array ... } ? -- Pavel a.k.a. Papi -- 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] Select
oops slight mistake i noticed there.. should be thats because mysql_fetch_row only returns one row. to get all the rows do while ($row = mysql_fetch_array($result)) { $firstcloumn = $row[0]; } This will run through all the rows putting the colunms into the array $row[] Regards Jon -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07968 524175 PGP Key available, send blank email to [EMAIL PROTECTED] -Original Message- From: Jeremy Morano [mailto:[EMAIL PROTECTED]] Sent: 14 August 2001 15:53 To: [EMAIL PROTECTED] Subject: [PHP] Select Hi, I'm having a problem with my Select statement. This is what i'm doing: $connection = @mysql_connect(l, c, c) or die(Couldn't connect.); $db = @mysql_select_db($db_name, $connection) or die(Couldn't select database.); $sql = SELECT * FROM table_1 ; $result = @mysql_query($sql,$connection) or die(Couldn't execute query.); $data=mysql_fetch_row($result); $count=$data[0]; echo $count; Yet the only result I get is the first value of the first column. -- 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] Select
Jeremy, The reason you are only getting the first value is because you are only retrieving the first value and assigning it to $data. You need to step through the result and do something with it. For example, if ($row = mysql_fetch_array($result)) { do { $data1 = $row[mycolumn1]; $data2 = $row[mycolumn2]; } while ($row = mysql_fetch_array($result)); // more code } Alternatively, you could insert the values into a multidimensional array inside the loop, so you don't have to hardcode the columns. It's up to you. Johan Alfredeen pongworld.com -Original Message- From: Jeremy Morano [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 8:53 AM To: [EMAIL PROTECTED] Subject: [PHP] Select Hi, I'm having a problem with my Select statement. This is what i'm doing: $connection = @mysql_connect(l, c, c) or die(Couldn't connect.); $db = @mysql_select_db($db_name, $connection) or die(Couldn't select database.); $sql = SELECT * FROM table_1 ; $result = @mysql_query($sql,$connection) or die(Couldn't execute query.); $data=mysql_fetch_row($result); $count=$data[0]; echo $count; Yet the only result I get is the first value of the first column. -- 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] location bar
The navigation system you are refering to is called breadcrumb navigation. You can find implementations of this all over the place. Try hotscripts.com or google.com. Kevin -Original Message- From: Wolfgang Schneider [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 12:35 AM To: php-general Subject: [PHP] location bar Hi everyone, I am somewhat new at the use of php and would appreciate if someone could help me with a question re location bar How can a location bar such as the sample below be generated in php to be displayed in web pages ... Location : home:/category:sub_1:/page title Is there a specific setup needed in terms of the directory structure on the server? Or will this only function with database type website? Thanks in advance for any input and helpful ideas ... God bless you with His grace and peace Wolfgang Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/ -- 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: to include php file into html page
Jack [EMAIL PROTECTED] wrote in message 021501c12508$abb1b200$[EMAIL PROTECTED]">news:021501c12508$abb1b200$[EMAIL PROTECTED]... Hi people I have tried to include php file into html page using the syntax below and it said syntax error at this part when the page is loaded. What is wrong with calling php file this way? Or is there any other way to call php file from html page? *** html body script language='JavaScript' src='/include/adjs.php/script /body /html *** This will run the php script, then try to interpret the result as JavaScript... which is exciting, but probably not what you had in mind. Why not try the plain old boring method, html body ?php include('/include/adjs.php'); ? /body /html -- 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] could i get a clue?
ok a basic question. perhaps I dont know enough about javascript but anyway.. I want to call a php script from javascript. Anybody have any hints for me? A link to a useful website would work as well. thanks mates -student of computer science -- 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] Looking for link system
I'm looking for a yahoo-style link system done in PHP. Anyone know if a good one exists out there and where I can find it? -- Thomas Deliduka IT Manager - New Eve Media The Solution To Your Internet Angst http://www.neweve.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] PHP or SSI -- What's faster?
PHPers: So if I was just going to need includes on a few pages, what's faster PHP or SSI on Linux/Apache? Christopher Raymond -- 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] Looking for link system
Search http://sourceforge.net/ and http://freshmeat.net/ Good luck, Johan Alfredeen PongWorld.com -Original Message- From: Thomas Deliduka [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 9:20 AM To: PHP List Subject: [PHP] Looking for link system I'm looking for a yahoo-style link system done in PHP. Anyone know if a good one exists out there and where I can find it? -- Thomas Deliduka IT Manager - New Eve Media The Solution To Your Internet Angst http://www.neweve.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] could i get a clue?
On Tue, Aug 14, 2001 at 10:18:18AM -0500, marilyn manson wrote: ok a basic question. perhaps I dont know enough about javascript but anyway.. I want to call a php script from javascript. Anybody have any hints for me? A link to a useful website would work as well. thanks mates -student of computer science FAIK the only possibility is to redirect to the PHP script. Then you'll get something like: window.location.href=myscript.php; -- * RzE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- -- 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: could i get a clue?
Marilyn Manson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... ok a basic question. perhaps I dont know enough about javascript but anyway.. I want to call a php script from javascript. Anybody have any hints for me? Well, to call a php script, you basically have to request a new file. If you just need to submit information, you can preload a new 'image' with parameters. If you need to get information back, you pretty much have to devote a frame to it somewhere - either a visible frame, where the script actually returns an updated page, or an invisible frame (ie one pixel high with a 10-pixel top margin) in the same window, or a new minimized window. -- 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] location bar
At 11:02 AM 8/14/2001, Kevin L wrote: I had a similar problem.jason murray gave me some ideas ;-) just stick this in a function as I did and you'll be sailing.its easy to update, and Extremely flexible. look at my code.. font face=Verdana, Arial, Helvetica, sans-serif size=-2Location : a href=http://www.usaexpress.net;Home/a / ?php $patharray = explode (/,$SCRIPT_NAME); $scriptname = basename($SCRIPT_NAME); for ($dirsi = 1; $dirsi count($patharray); $dirsi++){ $dirs = array( 'company' = 'Company', 'services' = 'Services', 'support' = 'Support', 'mac' = 'Mac', 'winnt' = 'Windows NT', 'win9x' = 'Windows 9X', 'unix' = 'Linux And Unix', 'customers' = 'Customers', 'noc' = 'NOC', 'help' = 'USAexpress.net Help' ); $linkdes = $dirs[$patharray[$dirsi]]; $link = $link . /$patharray[$dirsi]; if ($patharray[$dirsi] == $scriptname){ $linkdes = $title; $slash = ; $linkhtml = a href=\$link\$linkdes/a$slash; if ($patharray[$dirsi] == index.php){ $link = ; $linkdes = ; $slash = ; $linkhtml = ; } }else{ $slash = / ; $linkhtml = a href=\$link\$linkdes/a$slash; } echo $linkhtml; } ?/font you can see it in action at www.usaexpress.net. look at the location below our logo. ~kurth The navigation system you are refering to is called breadcrumb navigation. You can find implementations of this all over the place. Try hotscripts.com or google.com. Kevin -Original Message- From: Wolfgang Schneider [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 12:35 AM To: php-general Subject: [PHP] location bar Hi everyone, I am somewhat new at the use of php and would appreciate if someone could help me with a question re location bar How can a location bar such as the sample below be generated in php to be displayed in web pages ... Location : home:/category:sub_1:/page title Is there a specific setup needed in terms of the directory structure on the server? Or will this only function with database type website? Thanks in advance for any input and helpful ideas ... God bless you with His grace and peace Wolfgang Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/ -- 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: mysql_query()
At 5:25 PM +0200 8/14/01, _lallous wrote: I have PHPMyAdmin 2.21 I only see GO button, where can I upload my SQL file? Well my ISP uses PHPMyAdmin 2.10, which I can't imagine would be that different from 2.21. Basically, if I load, and click on the database name in the left top corner: Home + databasename To the right, the window display will list all my databases, action options and number of records. Under that area is a text box where I can enter SELECT statements, or upload queries as text files. The screen generally looks like: PHPMyAdmin Window (Right Pane Only) table Action Records . tb1 Browse Select Insert Properties Drop Empty150 tb2 Browse Select Insert Properties Drop Empty2456 . Run SQL query/queries on databasedatabasename [Documentation]: . : : : : : text box: : : . or Location of the textfile: . : file upload : Browse . Go ... The Go button will perform either information from the text box, or an indicated file. I believe it's a typical install of PHPMyAdmin, but I could be wrong. Alnisa -- . Alnisa Allgood Executive Director Nonprofit Tech (ph) 415.337.7412 (fx) 415.337.7927 (url) http://www.nonprofit-techworld.org (url) http://www.nonprofit-tech.org (url) http://www.tech-library.org . Nonprofit Tech E-Update mailto:[EMAIL PROTECTED] . applying technology to transform . -- 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: Put value directly into form?
http://www.yorkshire-search.co.uk/links/add.php3 Right, I seem to have not made myself too clear so I'll try again. Originally, the page add.php3 was using a plain HTML template called add_form.html which consisted of a simple form. If you click on the link above and have a look at the page, everything below Add Link was how it started off. In the code below, it's everything after the /php tag. Users would just complete the form and press submit. However, I decided instead of typing in certain fields, I wanted to autofill the boxes so I found a PHP4 script which would grab meta-tags and embedded it into the template. All PHP scripts have to be within php/php tags as defined in a different part of the search engine script. My problem is that whatever method I have tried, I have not managed autofil the forms text boxes with values from the script in a one step process. I first tried putting the HTML form in the script but this brought parsing errors. Next I tried keeping the form in the HTML but trying to use value=?? statement. This again brought parsing errors or the code simply appeared in the box. Hope that makes a bit more sense. table width=100% cellpadding=3 cellspacing=1 height=23 border=0 text=#00 link=#FF/table php // Include the function so you can use it later in the page require('metaengine.php'); // Call the MetaEngine function and assign the return value to an array $metaInfo = MetaEngine($url); // Array index is not numbers but names, such as: // $metaInfo[title] is the title of the page // $metaInfo[description] is the description of the page // $metaInfo[keywords] is the keywords of the page echo html head titleSample/title /head body form method=\POST\ action=\$PHP_SELF\ CENTERfont face=\Arial\ size=\2\bEnter URL:/b/font input type=\text\ name=\url\ size=\25\#32;#32;input type=\submit\ value=\Submit\ name=\B1\/CENTERbrfont face=\Arial\ size=\2\b1. Press the submit button and it will grab meta tags of website./b/fontbrhr /form FORM METHOD=POST ACTION=\add.php3\ input type=hidden name=title value=\$metaInfo[title]\ input type=hidden name=url value=\$url\ input type=hidden name=description value=\$metaInfo[description]\ table border=\0\ cellspacing=\0\ cellpadding=\4\ width=\100%\ tr tdcenterinput type=submit name=submit value=\Now press this button\ class=\button\/centerbrfont face=\Arial\ size=\2\b2. If complete URL displays in box below, press the above button./b/fontbrhr/td /tr /table /FORM /body /html ; /php p class=ptitleAdd Link/p table width=500 border=0 cellpadding=5 tr td colspan=3 center font face=Arial size=2 color=Red%error_msg%/font /center form action=add.php3 method=post input type=hidden name=pflag value=add table border=0 cellspacing=0 cellpadding=4 width=100% tr tdfont face=Arial size=2Url/font/td tdinput type=text name=title size=20 value=?=$title? /td /tr tr tdfont face=Arial size=2Title/font/td tdinput type=text name=title size=40 value=%title%/td /tr tr td valign=topfont face=Arial size=2Description/font/td tdtextarea name=description cols=40 rows=10 maxlength=255 wrap=virtual%description%/textarea/td /tr tr tdfont face=Arial size=2Category/font/td tdfont face=Arial size=2%category%/font/td /tr tr tdfont face=Arial size=2Contact Name/font/td tdinput type=text name=contact_name size=30 value=%contact_name%/td /tr tr tdfont face=Arial size=2Email/font/td tdinput type=text name=email size=30 value=%email%/td /tr tr tdfont face=Arial size=2Bid/font/td tdinput type=text name=bid size=10 value=%bid% font face=Arial size=2 color=green(optional)/font /td /tr tr tdnbsp;/td tdinput type=submit name=submit value=Add class=buttonbrOnce you are happy with your entries, press this button./td /tr /table /form /td /tr /table -- 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] SNMP and PHP
Hi, I need some help in compiling SNMP functions with PHP 4.06 on Solaris 2.6. What I did so far I downloaded UCD SNMP package and installed it. I compiled php with '--with-snmp=shared' + '--enable-ucd-snmp-hack' and installed everything without any errors. When I do a phpconfig on that installation I can see this configure option. Everything textbook. BUT when I try to use any of the snmp function calls I get an error message saying this is an undefined function. Any ideas, please!! Thanks Heiko -- 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] nav buttons not working correctly
I have some existing code that I want to modify to limit the display results to 5 rows and add nav buttons to display the next set of 5, etc. You all know what I am looking for. I have a book- MySQL/PHP Database Applications by Greenspan Bulger - which has an example that should work, but isn't. I have inserted the function from the book and can get 5 rows on the first page, and the next button, but the second page doesn't display any rows. Pasted below is the code for my page, the function in question is down aways. I am just learning this stuff, so don't be too hard on me about the existin code, it works fine with- out the nav function. I am sure there are probably more efficient ways to write this, but for now I just want to get the nav function to work properly. (some lines will undoubtedly wrap and make it all look real ugly) - ? $conn = @mysql_connect(localhost,root) or die (could not connect to the server); mysql_select_db(bulletins, $conn) or die (could not get the database); function authenticate ($realm=Secure Area,$errmsg=Please enter a usename and password) { header(WWW-Authenticate: Basic realm=\$realm\); header(HTTP/1.0 401 Unauthorized); die($errmsg); } if (empty($PHP_AUTH_USER)) { authenticate($realm,$errmsg,header); } else { $query = select name from users where password = ('$PHP_AUTH_PW') and name = ('$PHP_AUTH_USER'); $result = mysql_query($query); if ($result) { list($valid_user) = mysql_fetch_row($result); } if (!$result || empty($valid_user)) { authenticate($realm,$errmsg,query); } } ? html head meta name=generator content=HTML Tidy, see www.w3.org / titleDealer Bulletins, Simrad, Inc/title style type=text/css body { background-color: #b5e4f9; } /style /head body centerh1Simrad Dealer Bulletins/h1/center br / pYou can sort the bulletins in the following order:br / font size=-1(This will display all bulletins in one long page.)br / OR click on the bulletin subject line below (much quicker)/font /p ul li a href=bulletin_sorter.php?orderby=dateBulletin Date/a (oldest to newest) /li li a href=bulletin_sorter.php?orderby=date2Bulletin Date/a (newest to oldest) /li li Select bulletins from a href=bulletin_sorter.php?orderby=vladBrian Vlad/a - Plotter and Radar Products /li li Select bulletins from a href=bulletin_sorter.php?orderby=burkeTom Burke/a - Autopilots and Instrumentation /li li Select bulletins from a href=bulletin_sorter.php?orderby=hillersMike Hillers/a - Fisheries /li /ul br / OR br / form name=form1 action=bulletin_sorter.php method=post Enter a word to search for: input type=text size=30 name=searchbr / input type=submit name=submit value=Search font size=-1(You must press the search button to complete the search)/font /form br / ? $result1 = mysql_query(select count(*) from dbulletins) or die(mysql_error()); echo There are .mysql_result($result1,0,0). Bulletins listed in the database; ? br /br / hr width=75% noshade=noshade / table summary= border=0 cellpadding=5 align=center width=90% ? $db = mysql_connect(localhost, root); mysql_select_db(bulletins, $db); if ($orderby == 'date'): $sql = select * from dbulletins order by 'bulletin_date'; elseif ($orderby == 'date2'): $sql = select * from dbulletins order by 'bulletin_date' desc; elseif ($orderby == 'vlad'): $sql = select * from dbulletins where bulletin_from1 like '%Vlad%' order by 'bulletin_number' desc; elseif ($orderby == 'burke'): $sql = select * from dbulletins where bulletin_from1 like '%Burke%' order by 'bulletin_number' desc; elseif ($orderby == 'hillers'): $sql = select * from dbulletins where bulletin_from1 like '%Hillers%' order by 'bulletin_number' desc; elseif (isset($submit)): $sql = select * from dbulletins where match (body) against ('%$search%'); else: $sql = select * from dbulletins order by 'bulletin_date' desc; endif; $result2 = mysql_query($sql); while ( $row = mysql_fetch_array($result2)) { if ($orderby == 'vlad' || $orderby == 'burke' || $orderby == 'hillers' || $orderby =='date' || $orderby == 'date2' || $search == 'orderby'): { print(tr\ntd colspan=\2\\nimg src=\1pixb5e4f9.gif\ alt=\\ height=\20\ width=\1\\n/td\n/tr); print(tr\ntd bgcolor=\white\ colspan=\2\\nstrong\n); printf(font color=\blue\%s/font\n/strong\n/td\n/tr\n, $row[bulletin_number]); print(tr\ntd valign=\top\\nh2 class=\c1\\nbr /Dealer
Re: [PHP] Instalation
i think pgp has a quick install text file that is superb. sorta step-by-step simple and complicated. Steve Jean-Arthur Silve [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... check de readme or install files provided in each one ! At 15:39 14/08/01 +0200, Roman wrote: Help me. I have RED HAT Linux 7.0 and I want install Apache web server with php and mysql support. How ? I have : apache_1.3.20.tar.gz php-4.0.6.tar.gz mysql-3.23.38.tar.gz thanx roman -- 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] EuroVox 4, place Félix Eboue 75583 Paris Cedex 12 Tel : 01 44 67 05 05 Fax : 01 44 67 05 19 Web : http://www.eurovox.fr -- 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] SNMP and PHP
I had the same problem and never got it working on Linux. Posted a very similar question and got one response from someone that got it working on FreeBSD but that was it. Sincerely, Robert T. Covell President / Owner Rolet Internet Services, LLC Web: www.rolet.com Email: [EMAIL PROTECTED] Phone: 816.210.7145 Fax: 816.753.1952 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 10:45 AM To: [EMAIL PROTECTED] Subject: [PHP] SNMP and PHP Hi, I need some help in compiling SNMP functions with PHP 4.06 on Solaris 2.6. What I did so far I downloaded UCD SNMP package and installed it. I compiled php with '--with-snmp=shared' + '--enable-ucd-snmp-hack' and installed everything without any errors. When I do a phpconfig on that installation I can see this configure option. Everything textbook. BUT when I try to use any of the snmp function calls I get an error message saying this is an undefined function. Any ideas, please!! Thanks Heiko -- 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] How dynamically create objects
Hello, I would like to create an object from a db result like MySQL does in mysql_fetch_object How can I create an object with members which names are set at runtime ? Regards Bret -- 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: session security issue
what about registering a var called loggedin with the session and then testing on each script to see if it's set to 1 or something ? then base the access on that ? that's what i use and then register uid with the session as well so you can use it througout your site ... ok you've got me worried now, are there any problems with security doing it that way Steve Christian Dechery [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have pages that uses session for security that looks something like this: ?php session_start(); if( !isset($uid) ) { include(include/auth.inc.php); auth_user(); } more code... ? so $uid tells me if the user is logged on or not... but what if somebody calls the script directly from the address bar like this: http://server/script.php?uid=10 wouldn't this be a security problem? Christian Dechery (lemming) http://www.tanamesa.com.br Gaita-L Owner / Web Developer -- 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] smart table construction from array
Hello All -- I have a csv file that I need to parse into a table. Getting the file open and into stuffed into an array is not really a problem, but I want PHP to adapt the table structure to the data on the fly. For example, some data (from the hgitner.com stamp buying list): 26,used,3¢ Washington Dull Red type II,$1.00 ,-,- Fine + OG Hinged 232-40, 285-90, 294-99, 323-7 wanted. Call or ship!, 534A,single,2¢ Washington, type VI (imperf, offset),$20.00 ,$12.00 ,$6.00 534B,single,2¢ Washington, type Va (imperf, offset),Needed Urgently!,, I can easily get line 1 and 3 can easily into: td26/tdtd3¢ Washington Dull Red type II/tdtd$1.00/tdtd-/tdtd-/td but line 2 and 4 are my problem. I want PHP to take line 2 and see that there is only one cell of data in the and four blanks in the array and thus create: td colspan=5Fine + OG Hinged 232-40, 285-90, 294-99, 323-7 wanted. Call or ship!/td PHP should see that line 4 ends in two blanks and thus should output: td34B/tdtdsingle /tdtd2¢ Washington, type Va (imperf, offset) /tdtd colspan=3Needed Urgently! but I'm having some real trouble figuring out the logic/control structures to do this. If there is a class out there that does this, I'd be happy to hear of it. But I suspect my inexperience is the real problem: I'm really hoping that someone can explain the logic of how this might be done. thanks in advance. peter -- Peter Torraca [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] Re: variable $PATH_INFO
$PATH_INFO is server variable, that appear on IIS but not apache. maybe you can try $REQUEST_URI, that return URL with query string there. or you can check all the server variable with phpinfo(). you can put this into the web server and run it on your browser. ?php phpinfo(); ? -- Hidulf http://www.hidulf.com Lolodev News Php [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... why can i read PATH_INFO server variable with apache under windows server ? with IIS 5 it's OK how can i ? ? print $PATH_INFO ? - Warning: Undefined variable: PATH_INFO in e:\sitephp\php_edit\htdocs\var.php on line 3 -- 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] Win32 Compilation
I have the current 4.0.6 tarball. Has anyone built this out of the box using VC++ 6 ? Jerry. -- 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] Win32 mail()
Has anyone got this to work correctly with 4.0.6 ? If so I'd really appreciate knowing the configuration etc. Thanks Jerry. -- 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] Using Sockets to connect to an SSL site?
Hello, Does anyone know how I would go about connecting to an SSL site using sockets? Or could I need to go in another direction? Thank you, Brandon
Re[2]: [PHP] printing
Hello Matthew, Friday, August 10, 2001, 8:55:24 PM, you wrote: ML If you run windows, then see: ML http://www.php.net/manual/en/ref.printer.php ML -Original Message- ML From: Fernando Avila [mailto:[EMAIL PROTECTED]] ML Sent: Friday, August 10, 2001 10:18 AM ML To: [EMAIL PROTECTED] ML Subject: [PHP] printing ML Hello php-general, ML I was thinking about my problem about printing reports ML CAn i do something like connecting a printer to the server where php ML and mysql runs.. And when someone send the comand to print the quote ML get printed in the server's printer? ML if it's posible maybe i will be albe to print a good quote And if i run linux? because I have a redhat 6.2 server Thanks -- Best regards, Fernandomailto:[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] insertion question
I have to store a whole lot of text files into a database, each one containing 3 columns containing numbers and about 2500 lines. I was wondering if anyone knew which would be the best way to store these files, having one big table with each row containing the contents of the files, or making one table for each file and inserting each line of the file into its respective row in the database. The database will probably become pretty big and I'm looking for the option that won't slow it down too much. -petur -- 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] Code works fine on Apache, but not on PWS.
Instead of posting the code, I'll give you the link: http://www.phpbuilder.com/columns/bealers2904.php3?page=1 Short and long of it is the subject line. -- 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] Q: array intersection problem
hi, i have two arrays that i would like to find the intersection and at this intersection alter the value. $invalid = array(1,3,9); $questions = array(1,2,3,4,5,6,7,8,9); and i would like the result to be an new array that looks like this: $new_questions = array(font color=red1/font, 2, font color=red3/font, 4,5,6,7,8, font color=red4/font); thank you in advance, 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] popen returns true whether script exists or not?
Hi, I'm trying to popen a cgi script that was designed to be open via a SSI include, but cannot because of passing variable restrictions. I'm popening a cgi script and it is returning a process pointer regardless of whether the string passed to it points to anything. Is this the expected response? ? $p = popen( /web/guide/myfiles/bannerz.cgi,r ); ? this returns a process pointer even though bannerz.cgi doesn't exist I then need to read the results of the cgi script and dump them to the screen like so; ? while (!feof ($p)) { $buffer = fgets($p, 4096); echo $buffer; } pclose ($p); ? but this is not functioning, does anyone have any ideas? Regards Tom Hodder -- 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 to embed font
Is there anyway to use PHP to embed font types into web pages to the person visiting the page sees what you want them to even if they dont have the same fonts on their computer. Pat -- 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] Web page authentications
I am new to PHP and am confused on HTTP authentications. I have read that section in the manual and still have questions. Where does PHP look to see if the user is valid or if the passward matches the user. How do you use PHP to set up user registration so users can input their information for authentication. Can anyone point me in the right direction to read more on this and help clear my confusion. Pat -- 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 to embed font
I don't believe so. I think you'd just have to let them dl the font. Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com On Tue, 14 Aug 2001 14:22:06 -0400 admin [EMAIL PROTECTED] wrote: Is there anyway to use PHP to embed font types into web pages to the person visiting the page sees what you want them to even if they dont have the same fonts on their computer. Pat -- 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] smart table construction from array
This is the way I would do it: split your CSV into an array. Then traverse the array, saving any data and incrementing a counter for any empty element. Finally set up some conditional statements with the counter to output the table the way you want. Still with me? Here is some sample code I threw together. You may have to play with it to get it working the way you want... but it should at least give you a starting point. HTMLBODYTable Border=1 ?php $fp = fopen(file.csv,r); while (!feof ($fp)) { $buffer = fgets($fp, 4096); $linearr = explode(,,$buffer); $outarr = ; echo TR\n; $colspan=0; for($j=0; $j count($linearr); $j++) { if ($linearr[$j] == ) { $colspan++; } else { $outarr[] = chop($linearr[$j]); } } if ($colspan == 0) { echo TD$outarr[0]/TD\n; } else { if(count($outarr) == 0) echo TD Colspan=$colspan/TD\n; else echo TD Colspan=$colspan$outarr[0]/TD\n; } for($j=1; $j count($outarr); $j++) { echo TD$outarr[$j]/TD\n; } echo /TR\n; } ? /Table/Body/HTML Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com - Original Message - From: Peter Torraca [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 14, 2001 11:02 AM Subject: [PHP] smart table construction from array Hello All -- I have a csv file that I need to parse into a table. Getting the file open and into stuffed into an array is not really a problem, but I want PHP to adapt the table structure to the data on the fly. For example, some data (from the hgitner.com stamp buying list): 26,used,3¢ Washington Dull Red type II,$1.00 ,-,- Fine + OG Hinged 232-40, 285-90, 294-99, 323-7 wanted. Call or ship!, 534A,single,2¢ Washington, type VI (imperf, offset),$20.00 ,$12.00 ,$6.00 534B,single,2¢ Washington, type Va (imperf, offset),Needed Urgently!,, I can easily get line 1 and 3 can easily into: td26/tdtd3¢ Washington Dull Red type II/tdtd$1.00/tdtd-/tdtd-/td but line 2 and 4 are my problem. I want PHP to take line 2 and see that there is only one cell of data in the and four blanks in the array and thus create: td colspan=5Fine + OG Hinged 232-40, 285-90, 294-99, 323-7 wanted. Call or ship!/td PHP should see that line 4 ends in two blanks and thus should output: td34B/tdtdsingle /tdtd2¢ Washington, type Va (imperf, offset) /tdtd colspan=3Needed Urgently! but I'm having some real trouble figuring out the logic/control structures to do this. If there is a class out there that does this, I'd be happy to hear of it. But I suspect my inexperience is the real problem: I'm really hoping that someone can explain the logic of how this might be done. thanks in advance. peter -- Peter Torraca [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] Re: inserting a remote html file
[EMAIL PROTECTED] wrote: hi all, I cant seem to get my mail function to work. OK so i am a noob, that might have something to do with it. I am using a script I found called the HTML Mime Mail Class, which does everything i need except actually send the mail. I am guessing that there is some config problems, but i am not sure. Even when i try and use the mail() function i get a server error. So i guess that my problem is that my return address is messed up. Does it have to be my own domain, or the domain that the server is running on? Can i set the return address as a hotmail account, or do i need my own server mail program? And is there anything that i need to config in the php.ini file? Thanks for helping, T P K Cannell This article by the most helpful Julie Meloni answers your question: http://www.zdnet.com/devhead/stories/articles/0,4413,2802264,00.html --- Regards, Boaz Amit -- 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 to embed font
Here's how, but it does not use PHP: http://cnet.com/webbuilding/pages/Authoring/Typography/ss01.html -- Julio Nobrega. 2B||!BB - That's the question. Admin [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Is there anyway to use PHP to embed font types into web pages to the person visiting the page sees what you want them to even if they dont have the same fonts on their computer. Pat -- 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] mail function
[EMAIL PROTECTED] wrote: hi all, I cant seem to get my mail function to work. OK so i am a noob, that might have something to do with it. I am using a script I found called the HTML Mime Mail Class, which does everything i need except actually send the mail. I am guessing that there is some config problems, but i am not sure. Even when i try and use the mail() function i get a server error. So i guess that my problem is that my return address is messed up. Does it have to be my own domain, or the domain that the server is running on? Can i set the return address as a hotmail account, or do i need my own server mail program? And is there anything that i need to config in the php.ini file? Thanks for helping, T P K Cannell This article by the most helpful Julie Meloni answers your question: http://www.zdnet.com/devhead/stories/articles/0,4413,2802264,00.html --- Regards, Boaz Amit -- 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]