Re: [PHP] PHP and Oracle
On Mon, Mar 25, 2002 at 02:49:07PM -0500, Scarbrough, Jeb (ISS Atlanta) wrote: Is it possible to create a transaction the involves multiple pages using PHP and oracle. For example, can I log onto oracle using OCIPLogon on one page named master, insert information, go to the next page named detail, insert information and commit both transactions at the same time? no you can't - bacause HTTP is stateless and it is unlikely that your 2nd page will be served by the same httpd process there's no way to have transactions span multiple pages. you will have to emulate this behaviour! tc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [Newman] PHP causing exceptions in ntserver.
hay everyone can someone recommend a good solution for stopping my server from crashing. I have 4. something installed on my server and something nuts happens with the memory causing the server to crash and generate an exception. The only way I can fix this is to re-start. I run the isapi module. Please don't recommend the cgi version cos it don't work. Philip Newman Internet Developer http://www.philipnz.com/ [EMAIL PROTECTED] ICQ#: 20482482
[PHP] check form - save arrays in hidden fields?
I have a contact form (form.php). I check the submitted data with the same php file. If the e-mail adress is not valid I ask the user for a valid e-mail adress. Therefor I create a new form with the field e-mail. The valid date name, adress, ... I put into hidden fields, so they don't get lost. This works fine until I integreate a file upload into my form. The file data stored in the $_FILES array get lost, when I submit the form the second time (when the e-mail adress isn't valid). The same problem occours when I integrate a list box where it is possible to choose more then one item: select name=test[] size=3 multiple option value=test1 test1/option option value=test2 test2/option option value=test3 test3/option /select Is there an easy way (in PHP 4.1.2) to store arrays like scalar variables in hidden fields, without using a database or transforming the array data into a string? Thanks, Fabian Krumbholz www.2k-web.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to avoid Warning: Page has Expired error?
Hi there, i'm building a form that posts to a php page. When I click on back on my browser and then forward. It gives me this warning. Is there anyways to avoid this? thanks! -David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] *sigh* xmldom win2k php4.1.2 apache
I worked with the xmldom under php4.0.6 and everything was fine and dandy, though since I upgraded php on my staging server which is a win2k(pro) box to 4.1.2 there has been no way to get the libxml to work. I first tried 4.1.1, that wouldnt work, so I had a little bit of hope that 4.1.2 would do the trick but unfortunately I am still stuck. I almost cant believe that it isn't possible to get libxml to work on win2k with php 4.1.2, I tried everything I could possibly come up with, reading Mad Osterby's guide for 100 times over, looked on every forum I could find, but no results. If anybody has an idea (or can state that they could get it running) then please let me know, I am now developing on the live server which is not a relaxed situation - if I produce an error 4 portals go down and or show error msg's to the users untill the time I fixed them, which doesn't precisely make my commissiongivers happy. If there's noone out there who got it running, I will have to trash win2k and install linux, but that would be an enormous job so please please please if you know something, share this with me! Thanks very much * * * * * ** * * * * * Tobias Beuving * g a d g e t sm e d i a * http://www.gadgets.nl * * * * * ** * * * * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] image functions = text alignment
Hi all, I'm writing a script that generate invoices in a PNG files. My problem is that I have to write the numbers aligned to the right. I'm using the funciotn ImageTTFText and it haven't a parm that tells the alignment. I looked at the IMAGE functions list in www.php.net but I didn't found nothing about the alignment. Does anyone know if there's a function or a parameter to write with TTF fonts aligned to the RIGHT? Thank, Fabio www.kel666.it -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [PHP Upload] problem
When running this code: ?php if (is_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'])) { copy($HTTP_POST_FILES['userfile']['tmp_name'], C:\Inetpub\webpub\PHP\upload); move_uploaded_file($HTTP_POST_FILES['userfile']['tmp_name'], C:\Inetpub\webpub\PHP\upload); } else { echo Possible file upload attack. Filename: . $HTTP_POST_FILES['userfile']['name']; } ? .. form name=form1 method=post action=upload.php enctype=multipart/form-data input type=hidden name=MAX_FILE_SIZE value=1000 p input type=file name=userfile /p p input type=submit name=Submit value=Submit /p /form .. I got this: Warning: Unable to create 'C:\Inetpub\webpub\PHP\upload': Permission denied in c:\Inetpub\webpub\PHP\upload.php on line 3 Warning: Unable to create 'C:\Inetpub\webpub\PHP\upload': Permission denied in c:\Inetpub\webpub\PHP\upload.php on line 4 Warning: Unable to move 'C:\WINDOWS\TEMP\php187.tmp' to 'C:\Inetpub\webpub\PHP\upload' in c:\Inetpub\webpub\PHP\upload.php on line 4 I must leave register_globals=Off !!! Can anyone help? Thanks, Evan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] [PHP Upload] problem
I got this: Warning: Unable to create 'C:\Inetpub\webpub\PHP\upload': Permission denied in c:\Inetpub\webpub\PHP\upload.php on line 3 Warning: Unable to create 'C:\Inetpub\webpub\PHP\upload': Permission denied in c:\Inetpub\webpub\PHP\upload.php on line 4 Warning: Unable to move 'C:\WINDOWS\TEMP\php187.tmp' to 'C:\Inetpub\webpub\PHP\upload' in c:\Inetpub\webpub\PHP\upload.php on line 4 Hi! Make sure you're ok with the filerights in your nt-filesystem. i never tried it but i think the IWAM_[Servername]-User must have write access in the Upload-folder. good luck! dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Auto password generation
Hello friends, I have a form for registering by the users. This runs on php/mysql. Can someone tell me how I could include auto password generation and emailing of this password to users? Thanks denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re:[PHP] Auto password generation
26/03/2002 9:51:20 PM ? $password = substr(ereg_replace([^A-Za-z0-9], , crypt(time())) . ereg_replace([^A-Za-z0-9], , crypt(time())) . ereg_replace([^A-Za-z0-9], , crypt(time())), 0, 8); ? Random Password : b? echo $password; ?/b Denis L. Menezes [EMAIL PROTECTED] wrote on 26/03/2002 11:38:14 AM: Hello friends, I have a form for registering by the users. This runs on php/mysql. Can someone tell me how I could include auto password generation and emailing of this password to users? Thanks denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP, DB, images, ODBC
Hi, I'm working with PHP and ODBC to get images stored in a database (Blob fields). But I experiment little problems to display these pics. Has anyone any information about PHP/ODBC/images ? Thanks, Bilbo
[PHP] How to remove ^M characters from a directory?
Hi, I have moved my php files to linux system. Now it z showing (control+M)(^M) characters in the file. How can I remove those characters? Any help would be appreciable. Thanks and Regards Balaji **Disclaimer Information contained in this E-MAIL being proprietary to Wipro Limited is 'privileged' and 'confidential' and intended for use only by the individual or entity to which it is addressed. You are notified that any use, copying or dissemination of the information contained in the E-MAIL in any manner whatsoever is strictly prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] fsockopen
Hi! I'm trying to check the validity of given hyperlinks... I thought this code should work (Apache 1.3.9, Win98) $tempUrl = ereg_replace(http://;, , $url); $fp = fsockopen ($tempUrl, $tempPort, $errno, $errstr, 30); if (!$fp) { echo brerror opening $url: \$errstr=$errstr, \$errno=$errnobr\n; } else { fputs ($fp, GET / HTTP/1.0\r\n\r\n); echo brs . fgets($fp,1024); fclose($fp); } For each and every url, $fp = false; $errstr = ; $errno = 0; Where is my mistake? I guess I'm simply getting sth wrong... Any hint would be great. Cheers, Kiko - It's not a bug, it's a feature. christoph starkmann mailto:[EMAIL PROTECTED] http://www.fh-augsburg.de/~kiko ICQ: 100601600 - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] fsockopen
Is $tempPort set ? Alastair Battrick Senior Developer Lightwood Consultancy Ltd http://www.lightwood.net -Original Message- From: Christoph Starkmann [mailto:[EMAIL PROTECTED]] Sent: 26 March 2002 12:40 To: '[EMAIL PROTECTED]' Subject: [PHP] fsockopen Hi! I'm trying to check the validity of given hyperlinks... I thought this code should work (Apache 1.3.9, Win98) $tempUrl = ereg_replace(http://;, , $url); $fp = fsockopen ($tempUrl, $tempPort, $errno, $errstr, 30); if (!$fp) { echo brerror opening $url: \$errstr=$errstr, \$errno=$errnobr\n; } else { fputs ($fp, GET / HTTP/1.0\r\n\r\n); echo brs . fgets($fp,1024); fclose($fp); } For each and every url, $fp = false; $errstr = ; $errno = 0; Where is my mistake? I guess I'm simply getting sth wrong... Any hint would be great. Cheers, Kiko - It's not a bug, it's a feature. christoph starkmann mailto:[EMAIL PROTECTED] http://www.fh-augsburg.de/~kiko ICQ: 100601600 - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to remove ^M characters from a directory?
Whats showing the ^M? a Linux Editor? Well the ^M are part of the newline code on windows. There are programs out that which will strip them, The only one I have personally used is UltraEdit (but thats a general all purpose text/hex editor). But I'm pretty sure there are linux command line tools. BUT If you can put up with them you can keep them, since they won't damage anything.. OR you could manually delete them all :) Andrew - Original Message - From: Balaji Ankem [EMAIL PROTECTED] To: Php-General [EMAIL PROTECTED] Sent: Tuesday, March 26, 2002 12:16 PM Subject: [PHP] How to remove ^M characters from a directory? Hi, I have moved my php files to linux system. Now it z showing (control+M)(^M) characters in the file. How can I remove those characters? Any help would be appreciable. Thanks and Regards Balaji -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] fsockopen
Hi! Is $tempPort set ? Yes... 80 as default... $tempUrl = ereg_replace(http://;, , $url); $fp = fsockopen ($tempUrl, $tempPort, $errno, $errstr, 30); if (!$fp) { echo brerror opening $url: \$errstr=$errstr, \$errno=$errnobr\n; } else { fputs ($fp, GET / HTTP/1.0\r\n\r\n); echo brs . fgets($fp,1024); fclose($fp); } Cheers... Kiko - It's not a bug, it's a feature. christoph starkmann mailto:[EMAIL PROTECTED] http://www.fh-augsburg.de/~kiko ICQ: 100601600 - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] fsockopen
There are a few things that it could be. Change the ereg_replace to str_replace Try adding Host: $server_name on the line after the GET: fputs ($fp, GET / HTTP/1.0\r\nHost: $server_name\r\n\r\n); iirc, if the server uses virtual hosts, the GET won't work properly without it. If that's not it, try adding this instead of your single echo line: while (!feof ($fp)) { $line = fgets($fp, 4096); echo $line; } As that will return and echo all the page, not just the header. Alastair -Original Message- From: Christoph Starkmann [mailto:[EMAIL PROTECTED]] Sent: 26 March 2002 12:48 To: '[EMAIL PROTECTED]'; Christoph Starkmann; [EMAIL PROTECTED] Subject: RE: [PHP] fsockopen Hi! Is $tempPort set ? Yes... 80 as default... $tempUrl = ereg_replace(http://;, , $url); $fp = fsockopen ($tempUrl, $tempPort, $errno, $errstr, 30); if (!$fp) { echo brerror opening $url: \$errstr=$errstr, \$errno=$errnobr\n; } else { fputs ($fp, GET / HTTP/1.0\r\n\r\n); echo brs . fgets($fp,1024); fclose($fp); } Cheers... Kiko - It's not a bug, it's a feature. christoph starkmann mailto:[EMAIL PROTECTED] http://www.fh-augsburg.de/~kiko ICQ: 100601600 - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 26 Mar 2002 12:49:11 -0000 Issue 1249
php-general Digest 26 Mar 2002 12:49:11 - Issue 1249 Topics (messages 90127 through 90174): Re: PHPTriad Error in Windows XP. 90127 by: Peter Ruan Re: Regular Expression Challenge 90128 by: Christopher William Wesley 90130 by: Cameron Just 90148 by: Matt Moreton 90150 by: Richard Archer 90155 by: Matt Moreton Re: Does anyone use UltrDev? 90129 by: Jerry Artman Re: mail() function returns TRUE but no email is sent 90131 by: Demitrious S. Kelly Database connection problem 90132 by: Omland Christopher m 90133 by: Demitrious S. Kelly 90134 by: Cameron Just File Edit 90135 by: Randy Johnson 90136 by: Rasmus Lerdorf 90137 by: Randy Johnson 90139 by: Rasmus Lerdorf 90141 by: Randy Johnson 90154 by: Jason Wong which php book 2 buy ? 90138 by: Septic Flesh Find if a html tag was closed 90140 by: Julio Nobrega Re: FTP RAW 90142 by: Analysis Solutions Re: Bad Email Addresses 90143 by: Analysis Solutions Re: XML Comparison? 90144 by: Analysis Solutions Re: HTTP_REFERER 90145 by: Jim Koutoumis Re: Session Variables 90146 by: bob Re: header and session? 90147 by: bob Re: Non-Cache in forms? 90149 by: David Robley 90152 by: eric.coleman.zaireweb.com PEAR installation correct? 90151 by: lmlweb Re: php and javascript 90153 by: Dennis Moore Cookies 90156 by: Chuck \PUP\ Payne RESOLVED -- RE: [PHP] Mime type prepeded at file upload 90157 by: David McInnis Re: PHP and Oracle 90158 by: Thies C. Arntzen [Newman] PHP causing exceptions in ntserver. 90159 by: Philip J. Newman check form - save arrays in hidden fields? 90160 by: Fabian Krumbholz - 2k web solutions How to avoid Warning: Page has Expired error? 90161 by: DRaGoNLz *sigh* xmldom win2k php4.1.2 apache 90162 by: botsai image functions = text alignment 90163 by: Fabio Spinelli [PHP Upload] problem 90164 by: Evan 90165 by: Jaeggi David Auto password generation 90166 by: Denis L. Menezes Re:[PHP] Auto password generation 90167 by: Liam PHP, DB, images, ODBC 90168 by: David JURAS How to remove ^M characters from a directory? 90169 by: Balaji Ankem 90172 by: Andrew Brampton fsockopen 90170 by: Christoph Starkmann 90171 by: Alastair Battrick 90173 by: Christoph Starkmann 90174 by: Alastair Battrick Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- ---BeginMessage--- I did started MySQL server first. Avdija A . Ahmedhodzic [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Hi, I installed PHPTriad under Windows XP and I keep gettting the following error: Warning: MySQL Connection Failed: Can't connect to MySQL server on 'localhost' (10061) in C:\apache\htdocs\phpmyadmin\lib.inc.php on line 255 It worked before under Windows ME. WinMySQLadmin1.0 works fine as well as MySQL when I ran it in the cmd-line mode. What's the remedy? Thanks in advance, -Peter you should start MySQL first. -- Prevencija putem edukacije http://www.narkomanija.com/ ---End Message--- ---BeginMessage--- You won't be able to do that with a regexp alone. Recursively matching isn't possible. You'll need a little help from some additional code. ?php $string = wed-thurs 9:35, 14:56, 18:35; // YOUR STRING $regexp = ^([a-z]+)-([a-z]+)[\ ]+(.*)$; // GETS (day)-(day) (any/all times) $find = ereg( $regexp, $string, $matches ); $times = explode( ,, $matches[3] ); // BREAK APART (.*) print( $matches[1] . br\n . $matches[2] . br\n ); while( list( $key, $val ) = each( $times ) ){ print( trim( ${val} ) . br\n ); } ? That seems to do the trick. Hopefully that gets ya closer to where you want to go. If you really needed to regexp match on the times, you can do that within the while loop. g.luck, ~Chris /\ \ / Microsoft Security Specialist: X The moron in Oxymoron. / \ http://www.thebackrow.net On Mon, 25 Mar 2002, Cameron Just wrote: Hi, I am trying to pull out the following information via a regular expression. The string I am searching on is 'wed-thurs 9:35, 14:56, 18:35' and I want it to retreive wed thurs 9:35 14:56 18:35 The regular expression I am using is ([a-z]+)-([a-z]+)
[PHP] session_start() and javascript problem
I always get a error message:document.form1.user isn't an object. if i get rid of session_start(),everything becomes well. thanks in advane! ?php session_start(); ? !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEADTITLElogin /TITLE META content=text/html; charset=gb2312 http-equiv=Content-Type STYLE type=text/cssTABLE { FONT-SIZE: 10.5pt } /STYLE SCRIPT language=JavaScript !-- function Jtrim(str) { var i = 0; var len = str.length; if ( str == ) return( str ); j = len -1; flagbegin = true; flagend = true; while ( flagbegin == true i len) { if ( str.charAt(i) == ) { i=i+1; flagbegin=true; } else { flagbegin=false; } } while (flagend== true j=0) { if (str.charAt(j)== ) { j=j-1; flagend=true; } else { flagend=false; } } if ( i j ) return () trimstr = str.substring(i,j+1); return trimstr; } function check(){ if ((Jtrim(document.form1.user.value)==)||(Jtrim(document.form1.password.value)==)){ window.alert(please input username/password!); return false; } else return true; } -- /SCRIPT META content=MSHTML 5.00.3314.2100 name=GENERATOR/HEAD BODY onload=Javascript:document.form1.user.focus() bgColor=#ff P align=centerBFONT size=4login/FONT/B/P HR color=#008000 SIZE=4 width=60% FORM action=loginsave.php method=post name=form1 onsubmit=return check() TABLE align=center bgColor=#f6f6f6 border=1 borderColorDark=#ff borderColorLight=#cc cellPadding=0 cellSpacing=0 height=154 width=225 TBODY TR TD height=54 width=63user:/TD TD height=54 width=156INPUT name=user /TD/TR TR TD height=49 width=63password/TD TD height=49 width=156INPUT name=password type=password /TD/TR TR TD height=45 width=63nbsp;/TD TD height=45 width=156 P align=center/P/TD/TR/TBODY/TABLE P align=centerINPUT name=Submit2 type=submit value=enter INPUT name=Submit type=reset value=cancel /P/FORM HR color=#f6f6f6 SIZE=4 width=60% P align=centerFONT color=#c0c0c0y.k .co 2001/FONT/P/BODY/HTML -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Auto password generation
something like this function randString($length=16){ mt_srand((double)microtime()*100); $newstring=; if($length0){ while(strlen($newstring)$length){ switch(mt_rand(1,3)){ case 1: $newstring.=chr(mt_rand(48,57)); break; // 0-9 case 2: $newstring.=chr(mt_rand(65,90)); break; // A-Z case 3: $newstring.=chr(mt_rand(97,122)); break; // a-z } } } return $newstring; } $contact_person_pass = randString(); $msg = Your Name:\t$contact_person_name\n; $msg .= Please use the following details to login in future\n\n; $msg .= Your E-Mail:\t$contact_person_mail\n; $msg .= Your Password:\t$contact_person_pass\n\n; $msg .= You change your password later when you click on 'Firm Profile'\n\n; $recipient = $contact_person_mail; $subject = Login Details; $mailheaders = From: LesGay whatever@whatever \n; mail($recipient, $subject, $msg, $mailheaders); Hello friends, I have a form for registering by the users. This runs on php/mysql. Can someone tell me how I could include auto password generation and emailing of this password to users? Thanks denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] fsockopen
Oohh so sorry... Now it works. I simply forgot to crop the tailing / from the URL. Call me stupid for now... Thanx alot ;) Cheers, Kiko - Fool me once. Shame on you. Fool me twice. Shame on me. christoph starkmann mailto:[EMAIL PROTECTED] http://www.fh-augsburg.de/~kiko ICQ: 100601600 - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need help
Hello friends. I am a newbie to php. I am trying to connect to mysql with php. I have a website called www.abcresources.com The mysql database set up by the hosting company is called abc_resources.com I have a table called addressbook I log in into the admin page with my username as user and password as 12345. After that I do not use any username and password. So I am not sure if I need a username and password in the connection string. I have this line to connect : if (!($link=mysql_connect($hostname,$username,$password))){ displayerr(sprintf(internal error %d:%s\n, mysql_errno(), mysql_error())); What should $hostname, $username and $password be in the globals.php file? Thanks for help. Denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Need help
place these statements in your include file, which is standard for PHP development: $link=mysql_connect(localhost,user,12345) or die(Error: cannot connect.mysql(error()); mysql_select_db(mydatabase) or die(Error: cannot select db: .mysql_error()); -Original Message- From: Denis L. Menezes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 7:14 AM To: [EMAIL PROTECTED] Subject: [PHP] Need help Hello friends. I am a newbie to php. I am trying to connect to mysql with php. I have a website called www.abcresources.com The mysql database set up by the hosting company is called abc_resources.com I have a table called addressbook I log in into the admin page with my username as user and password as 12345. After that I do not use any username and password. So I am not sure if I need a username and password in the connection string. I have this line to connect : if (!($link=mysql_connect($hostname,$username,$password))){ displayerr(sprintf(internal error %d:%s\n, mysql_errno(), mysql_error())); What should $hostname, $username and $password be in the globals.php file? Thanks for help. Denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] what's undefined index ?
Your message of Tue, 26 Mar 2002 11:46:28 +1100: Undefined offset- numeric index doesn't exist Haven't seen one of these yet, but thanks for the warning ;-) Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com IE-Center: http://ie5.de http://msie.winware.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to remove ^M characters from a directory?
in the vi editor, type: :1,$s/ctrl-vctrl-m// :w! replace ctrl-v with the control-V character and ctrl-m with the control-M character. -Original Message- From: Balaji Ankem [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 6:16 AM To: Php-General Subject: [PHP] How to remove ^M characters from a directory? Hi, I have moved my php files to linux system. Now it z showing (control+M)(^M) characters in the file. How can I remove those characters? Any help would be appreciable. Thanks and Regards Balaji -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Database connection problem
$connect = mysql_connect(localhost,user,password) or die(mysql_error); -Original Message- From: Omland Christopher m [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 7:55 PM To: Cameron Just Cc: [EMAIL PROTECTED] Subject: [PHP] Database connection problem Hi, can anyone help me with this problem. I'm trying to connect to a MySQL database on my computer, I don't have a hostname for it, so I just insert the IP, something like this. ... mysql_cos? Thanks. -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php as an apache module (Phptriad)
Hi I have installed Phptriad in Windows 2000 and everything works fine except when I tried to test some user authentication scripts. -;echo You have enter $PHP_AUTH_PW as your password. ; } ? When I tried this I sucesfully show the authentication dialog box, but later the browser gets blocked while trying to connect to http://localhost. I would like to know if has to do with the instalation of Phptriad, where PHP is set as a cgi or an apache module.Anye help would be greatly appreciated. Karina - Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards®
RE: [PHP] which php book 2 buy ?
Julie Meloni's PHP book provides basic PHP instruction and a tutorial to create a shopping cart. -Original Message- From: Septic Flesh [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 8:16 PM To: [EMAIL PROTECTED] Subject: [PHP] which php book 2 buy ? I wanna buy a book from amazon . . .but don't know which one.. Do you know where I will find examples of shopping carts ? (which book ?) thanks.. -- Sapilas@/dev/pinkeye -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] register_shutdown_function
2 questions about register_shutdown_function. 1)Functions registered with register_shutdown_function are called after the script finishes processing. Is there a way to have a function only called when the PHP form is actually closed? 2)The function registered with register_shutdown_function does not seem to write to a file before the PHP page is closed. I need to send a message to another file when the PHP form is closed. Thanks Jason Goodman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to remove ^M characters from a directory?
I have moved my php files to linux system. Now it z showing (control+M)(^M) characters in the file. How can I remove those characters? /usr/bin/perl -i.bak -npe 's/\r\n/\n/g' filename where filename is the file with he ^M line endings. Regards jon -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 PGP Key available, send email with subject: Send PGP Key -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] using a counter in a foreach loop
I have a pretty basic question and was wondering if someone could point me in the right direction: I have a foreach loop, where I execute some commands for each element in a certain array. One thing I would like to add to this loop is a counter, so that on each iteration of the loop I have a next higher number. The following does not work: foreach ($months) { $i = 1; // do some things $i++; } because in each new iteration of the loop, $i is reset to 1. Is there a way that I can achieve this effect? Thanks for any advice, Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] check form - save arrays in hidden fields?
Why in a scalar? Why not pass the array through, i.e. Foreach($test as $element) { echo(input type='hidden' name='test[]' value='$element'); } Tim Ward Internet Chess www.chessish.com http://www.chessish.com -- From: Fabian Krumbholz - 2k web solutions [SMTP:[EMAIL PROTECTED]] Sent: 26 March 2002 09:31 To: PHP Mailingliste Subject: [PHP] check form - save arrays in hidden fields? I have a contact form (form.php). I check the submitted data with the same php file. If the e-mail adress is not valid I ask the user for a valid e-mail adress. Therefor I create a new form with the field e-mail. The valid date name, adress, ... I put into hidden fields, so they don't get lost. This works fine until I integreate a file upload into my form. The file data stored in the $_FILES array get lost, when I submit the form the second time (when the e-mail adress isn't valid). The same problem occours when I integrate a list box where it is possible to choose more then one item: select name=test[] size=3 multiple option value=test1 test1/option option value=test2 test2/option option value=test3 test3/option /select Is there an easy way (in PHP 4.1.2) to store arrays like scalar variables in hidden fields, without using a database or transforming the array data into a string? Thanks, Fabian Krumbholz www.2k-web.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] using a counter in a foreach loop
$i = 1; foreach ($months) { // do some things $i++; } -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 9:49 AM I have a foreach loop, where I execute some commands for each element in a certain array. One thing I would like to add to this loop is a counter, so that on each iteration of the loop I have a next higher number. The following does not work: foreach ($months) { $i = 1; // do some things $i++; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using a counter in a foreach loop
What an embarrassing oversight. I'm sorry, I figured this one out. You don't define the $i counter variable in the loop (DUH). $i = 1; foreach ($months) { // do some things $i++; } Thanks to all those who may respond before reading this Erik On Tuesday, March 26, 2002, at 09:49 AM, Erik Price wrote: I have a pretty basic question and was wondering if someone could point me in the right direction: I have a foreach loop, where I execute some commands for each element in a certain array. One thing I would like to add to this loop is a counter, so that on each iteration of the loop I have a next higher number. The following does not work: foreach ($months) { $i = 1; // do some things $i++; } because in each new iteration of the loop, $i is reset to 1. Is there a way that I can achieve this effect? Thanks for any advice, Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] using a counter in a foreach loop
On Tue, 26 Mar 2002, Erik Price wrote: I have a pretty basic question and was wondering if someone could point me in the right direction: I have a foreach loop, where I execute some commands for each element in a certain array. One thing I would like to add to this loop is a counter, so that on each iteration of the loop I have a next higher number. The following does not work: foreach ($months) { $i = 1; // do some things $i++; } because in each new iteration of the loop, $i is reset to 1. Is there a way that I can achieve this effect? Thanks for any advice, well... put $i = 1; outside your loop...? $i = 1; foreach ($months) { // do some things $i++; } -- Jan Rademaker [EMAIL PROTECTED] http://www.ottobak.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to remove ^M characters from a directory?
Balaji Ankem wrote: Hi, I have moved my php files to linux system. Now it z showing (control+M)(^M) characters in the file. How can I remove those characters? Any help would be appreciable. Thanks and Regards Balaji Name: Wipro_Disclaimer.txt Wipro_Disclaimer.txtType: Plain Text (text/plain) Encoding: 7bit -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php NAME dos2unix - convert text file from DOS format to ISO format SYNOPSIS dos2unix [ -ascii ] [ -iso ] [ -7 ] originalfile conver- tedfile DESCRIPTION The dos2unix utility converts characters in the DOS extended character set to the corresponding ISO standard characters. -- Ron Clark System Administrator/Web Coordinator Armstrong Atlantic State University 11935 Abercorn Street Savannah, Ga 31419 Phone: 912 961 3234 Fax: 912 927 5353 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] using a counter in a foreach loop
Hi Erik, I have a foreach loop, where I execute some commands for each element in a certain array. One thing I would like to add to this loop is a counter, so that on each iteration of the loop I have a next higher number. The following does not work: foreach ($months) { $i = 1; // do some things $i++; } because in each new iteration of the loop, $i is reset to 1. Is there a way that I can achieve this effect? Thanks for any advice, Put the $i = 1 outside the loop. $i = 1; foreach ($months) { // do some things $i++; } Incidentally, I *really* hope you're not planning on doing: $i = 1; foreach ($months) { echo month . $i. is . $months[$i]. br; $i++; } if you are, I suggest you play around with foreach ($months as $currentMonth) { and see where it gets you :-) Cheers Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MySQL arrays
I'm trying to do something a little different in my database class I have a method to do the query and store it in an array. function query ($s = ) { $q = mysql_query($s,$this-database_connect_id); if (!$q) { $tools-error(array(Query Resulted in NULL value)); return 0; } $len = sizeof($this-query); $len++; $this-query = array($len=$q); mysql_free_result($q); return $len; } function num_rows($q_id) { // Set temp array to the selected query $tq = $this-query[$q_id]; $rows = mysql_num_rows($tq); return $rows; } When I do a var_dump of the two key vars I get the following var_dump($this-query); array(1) { [1]= resource(2) of type (mysql result) } var_dump($tq); resource(2) of type (Unknown) Here is the error that happens when I do the mysql_num_rows br bWarning/b: 2 is not a valid MySQL result resource in b/var/www/includes/database_class.php/b on line b77/bbr any ideas as to what I can do to fix this so that I can store query for later use? -Jim _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] File Upload
I have developed a file upload facility that allows a user to upload a html file to a site. Is there a way to also upload images within the page without creating several file uploads. The images vary between 0 and x . Any help would be grateful Craig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL arrays
how can you take a size of a function: $len = sizeof($this-query); and WTF (query is a function, not an array): $tq = $this-query[$q_id]; -Original Message- From: Anzak Wolf [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 9:09 AM To: [EMAIL PROTECTED] Subject: [PHP] MySQL arrays I'm trying to do something a little different in my database class I have a method to do the query and store it in an array. function query ($s = ) { $q = mysql_query($s,$this-database_connect_id); if (!$q) { $tools-error(array(Query Resulted in NULL value)); return 0; } $len = sizeof($this-query); $len++; $this-query = array($len=$q); mysql_free_result($q); return $len; } function num_rows($q_id) { // Set temp array to the selected query $tq = $this-query[$q_id]; $rows = mysql_num_rows($tq); return $rows; } When I do a var_dump of the two key vars I get the following var_dump($this-query); array(1) { [1]= resource(2) of type (mysql result) } var_dump($tq); resource(2) of type (Unknown) Here is the error that happens when I do the mysql_num_rows br bWarning/b: 2 is not a valid MySQL result resource in b/var/www/includes/database_class.php/b on line b77/bbr any ideas as to what I can do to fix this so that I can store query for later use? -Jim _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL arrays
Sorry my mistake the array is $this-query_id the function is $query I still get the same results though. From: Rick Emery [EMAIL PROTECTED] To: 'Anzak Wolf' [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: [PHP] MySQL arrays Date: Tue, 26 Mar 2002 09:23:11 -0600 MIME-Version: 1.0 Received: from [216.92.131.4] by hotmail.com (3.2) with ESMTP id MHotMailBE69DDDA00B840042A0FD85C8304065D0; Tue, 26 Mar 2002 07:25:15 -0800 Received: (qmail 25557 invoked by uid 1010); 26 Mar 2002 15:24:18 - Received: (qmail 25534 invoked from network); 26 Mar 2002 15:24:16 - From php-general-return-90196-anzak Tue, 26 Mar 2002 07:26:42 -0800 Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Precedence: bulk list-help: mailto:[EMAIL PROTECTED] list-unsubscribe: mailto:[EMAIL PROTECTED] list-post: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] X-Mailer: Internet Mail Service (5.5.2653.19) how can you take a size of a function: $len = sizeof($this-query); and WTF (query is a function, not an array): $tq = $this-query[$q_id]; -Original Message- From: Anzak Wolf [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 9:09 AM To: [EMAIL PROTECTED] Subject: [PHP] MySQL arrays I'm trying to do something a little different in my database class I have a method to do the query and store it in an array. function query ($s = ) { $q = mysql_query($s,$this-database_connect_id); if (!$q) { $tools-error(array(Query Resulted in NULL value)); return 0; } $len = sizeof($this-query); $len++; $this-query = array($len=$q); mysql_free_result($q); return $len; } function num_rows($q_id) { // Set temp array to the selected query $tq = $this-query[$q_id]; $rows = mysql_num_rows($tq); return $rows; } When I do a var_dump of the two key vars I get the following var_dump($this-query); array(1) { [1]= resource(2) of type (mysql result) } var_dump($tq); resource(2) of type (Unknown) Here is the error that happens when I do the mysql_num_rows br bWarning/b: 2 is not a valid MySQL result resource in b/var/www/includes/database_class.php/b on line b77/bbr any ideas as to what I can do to fix this so that I can store query for later use? -Jim _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FTP RAW
Yes. Your solutions fails for any file over 5k about 99% of the time. The server I use does not have the FTP functions installed so I cannot use these, that is why I am looking to this solution.' Chris Analysis Solutions [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi Chris: On Mon, Mar 25, 2002 at 02:05:30PM -0700, Chris wrote: Can anyone help me with the command I need for a RAW FTP file upload? I can create connections and they empty file, but I have no idea how to get the data into the file and I have tried everything. Have you tried first creating the file on your system using the fopen(), fputs() and fclose() functions? Once that's done, then you can use PHP's FTP functions. Enjoy, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] module startup and shutdown functions
Can someone tell me about the shutdown functions or give me a URL to read about them? I have a couple of things I would like to have happen, only once, right before the PHP page is closed. Thanks, Jason Goodman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] header and session?
With register_globals on, $a and $b need to be registered using session_register(). Don't assign them to $_SESSION, PHP does that for you with register_globals on. 1.php - session_start(); $a = 'some_value'; $b = 'nuther_value'; session_register('a','b'); header(location: 2.php); 2.php - session_start(); echo a is $a; echo b is $b; -Original Message- From: bob [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 8:52 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] header and session? On Mon, 25 Mar 2002 08:54:27 -0700, [EMAIL PROTECTED] (Johny? ?rk) wrote: Do you have register_globals turned on or off in php.ini? What values are $a and $b being set to? Kirk -Original Message- From: bob [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 24, 2002 4:21 PM To: [EMAIL PROTECTED] Subject: [PHP] header and session? 1.php?2.php session_start(); session_start(); .. .. $_SESSION['a'] =$a; echo $_SESSION['a']; $_SESSION['b'] =$b; echo $_SESSION['b']; header(location: 2.php); after jump to 2.php ,there is an warning: undefined index a ,b if i change 1.php to session_start(); .. $_SESSION['a'] =$a; $_SESSION['b'] =$b; a href='2.php' go on /a it works well! register_globals is on.$a,$b is set to $_SESSION array,which is global in any scope. the problem is i submit a login form to 1.php,which register some session variable.then,in 2.php,i fail to print them out. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need help
On Tue, 26 Mar 2002, Denis L. Menezes wrote: I have a website called www.abcresources.com The mysql database set up by the hosting company is called abc_resources.com I have a table called addressbook One problem you may run into is that (at least as far as I know) a MySQL database name can't contain a period. So maybe they set it up as abc_resources. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] module startup and shutdown functions
You may start your search here : http://php.net/manual/en/zend.startup-and-shutdown.php Andrey - Original Message - From: Jason Goodman [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 26, 2002 5:40 PM Subject: [PHP] module startup and shutdown functions Can someone tell me about the shutdown functions or give me a URL to read about them? I have a couple of things I would like to have happen, only once, right before the PHP page is closed. Thanks, Jason Goodman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL arrays
CHANGE: $len = sizeof($this-query_id); $len++; $this-query_id = array($len=$q); mysql_free_result($q); return $len; TO: $this-query_id[] = $q; return sizeof($this-query_id); second: $q is a resource, that is, a pointer variable. When you execute mysql_free_result($q), you free-up the memory that it pointed to. Therefore, when you attempt to recall its value, it is pointing to memory that you no longer own. Hence, it is not a valid resource. Therefore, do not free the resource. When the script completes, the memory will automatically be de-allocated. Also, when you use the phrase $q, you are creating a pointer to a pointer; is that what you want? -Original Message- From: Anzak Wolf [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 9:09 AM To: [EMAIL PROTECTED] Subject: [PHP] MySQL arrays I'm trying to do something a little different in my database class I have a method to do the query and store it in an array. function query ($s = ) { $q = mysql_query($s,$this-database_connect_id); if (!$q) { $tools-error(array(Query Resulted in NULL value)); return 0; } $len = sizeof($this-query_id); $len++; $this-query_id = array($len=$q); mysql_free_result($q); return $len; } function num_rows($q_id) { // Set temp array to the selected query $tq = $this-query_id[$q_id]; $rows = mysql_num_rows($tq); return $rows; } When I do a var_dump of the two key vars I get the following var_dump($this-query); array(1) { [1]= resource(2) of type (mysql result) } var_dump($tq); resource(2) of type (Unknown) Here is the error that happens when I do the mysql_num_rows br bWarning/b: 2 is not a valid MySQL result resource in b/var/www/includes/database_class.php/b on line b77/bbr any ideas as to what I can do to fix this so that I can store query for later use? -Jim _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] register_shutdown_function
On Tue, 26 Mar 2002, Jason Goodman wrote: 2 questions about register_shutdown_function. 1)Functions registered with register_shutdown_function are called after the script finishes processing. Is there a way to have a function only called when the PHP form is actually closed? 2)The function registered with register_shutdown_function does not seem to write to a file before the PHP page is closed. I need to send a message to another file when the PHP form is closed. When you say when the PHP form is closed do you mean when the user has finished looking at the page on their browser and moves on to something else by clicking their mouse? Because there's not particularly a way to do this. The connection between PHP script and browser is finished before anything even displays in the browser window (unless you're flushing the output buffer, but that doesn't help you any). You could attach some JavaScript to the page that looks for window closure and away-clickery and then sends your server a request for a PHP file in response, but that's outside the scope of this list (it's a JavaScript problem). miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] image functions = text alignment
On Tue, 26 Mar 2002, Fabio Spinelli wrote: Hi all, I'm writing a script that generate invoices in a PNG files. My problem is that I have to write the numbers aligned to the right. I'm using the funciotn ImageTTFText and it haven't a parm that tells the alignment. I looked at the IMAGE functions list in www.php.net but I didn't found nothing about the alignment. Does anyone know if there's a function or a parameter to write with TTF fonts aligned to the RIGHT? First call the function ImageTTFBBox with your text. The array you receive in response will contain the information you need to calculate the width of the text ($a[5] - $a[7]). Then just subtract that from your desired right margin when you draw the text with ImageTTFText. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Please help
I am a newbie and need some help. I have a form with three textboxes named firstname, lastname and description My table is called addressbook Please tell me the INSERT statement. Also please tell me whether I should include the insert statement with a php tag. Thanks Denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please help
I realize that this is a newbie list, but isn't this just a tad bit ridiculous? It's not even a PHP question really, it's a SQL question. Here's a question... I need a form that accepts a name. Please write the code for me so I don't have to bother looking anything up, reading anything, and least of all, learn anything... At 11:57 PM 3/26/2002 +0800, Denis L. Menezes wrote: I am a newbie and need some help. I have a form with three textboxes named firstname, lastname and description My table is called addressbook Please tell me the INSERT statement. Also please tell me whether I should include the insert statement with a php tag. Thanks Denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL arrays
CHANGE: $len = sizeof($this-query_id); $len++; $this-query_id = array($len=$q); mysql_free_result($q); return $len; TO: $this-query_id[] = $q; return sizeof($this-query_id); second: $q is a resource, that is, a pointer variable. When you execute mysql_free_result($q), you free-up the memory that it pointed to. Therefore, when you attempt to recall its value, it is pointing to memory that you no longer own. Hence, it is not a valid resource. Therefore, do not free the resource. When the script completes, the memory will automatically be de-allocated. Also, when you use the phrase $q, you are creating a pointer to a pointer; is that what you want? I thought that $q created a new instance ie a copy of the data rather than a pointer. That worked though I have do a $q_id-- in my num_rows method because sizeof returns 1 but the way the value is being assigned it is being put in the 0 location. Though that is not a problem. Would it be better to parse out the data into arrays that I can access later then destroy the query? for example $q = mysql_query(select * from User); $this-query_id[] = mysql_num_rows($q); mysql_free_result($q); $len = sizeof($this-query_id) - 1; return $len; This way when I have a large number of queries stored I don't have the over head of all the pointers to the query objects or would doing this create more overhead? I'm trying to save on repeated calls to the database since it is possible that the database may change between with the first query is done and the last query is done and if they are the same query then the page would need the results to be the same. _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: which php book 2 buy ?
php and mysql web development ISBN 0-672-31784-2 Its got a good example of a php shopping cart system in it too Septic Flesh [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I wanna buy a book from amazon . . .but don't know which one.. Do you know where I will find examples of shopping carts ? (which book ?) thanks.. -- Sapilas@/dev/pinkeye -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please help
On Tue, 26 Mar 2002, Denis L. Menezes wrote: I am a newbie and need some help. I have a form with three textboxes named firstname, lastname and description My table is called addressbook Please tell me the INSERT statement. Also please tell me whether I should include the insert statement with a php tag. Assuming that you're using MySQL, you have already opened the database connection, and that you have magic_quotes_gpc set to on (ugh, but check with print ini_get('magic_quotes_gpc') ), it would look something like this: $sql = insert into addressbook (firstname, lastname, description) values ('{$_REQUEST['firstname']}', '{$_REQUEST['lastname']}', '{$_REQUEST['description']}'); $st = mysql_query($sql); miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Please help
Hi Denis, You need to give some more information, what database are you using, how is your database table layed out? If you are using MySQL you need to use the mysql_ functions, you can find out more about these in the PHP manual. If you need some help getting started with PHP there are some links to tutorials at http://www.php.net. You may look on amazon.com or bn.com for some PHP books, I found PHP and MySQL Web Development helpful myself but there are a wealth of books available. Jason -Original Message- From: Denis L. Menezes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 8:57 AM To: [EMAIL PROTECTED] Subject: [PHP] Please help I am a newbie and need some help. I have a form with three textboxes named firstname, lastname and description My table is called addressbook Please tell me the INSERT statement. Also please tell me whether I should include the insert statement with a php tag. Thanks Denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ANN :: QuB :: DHTML/PHP Visual Query Builder Released
InterAKT released the 1.0 version of QuB, the visual query builder for Ultradev (with PHAkt or ImpAKT). QuB is also available as a PHP/DHTML standalone version. QuB is an DHTML Query Builder designed to improve the way web developers create and use queries when creating dynamic PHP websites. This goal is reached by including some important features: - centralizing the SQL queries in a single repository - providing a graphical interface for editing queries - allowing instant result of the query in an intuitive manner QuB functionalities are very similar with Microsoft Access Query Builder ones, because we have created QuB to allow Access developers to easily upgrade from Access to a real database server as MySQL or PostgreSQL are. In the same time, QuB requires no advanced SQL knowledge, allowing even non-expert programmers to create complex queries. QuB is also tightly integrated with Ultradev, with an extension that allows Ultradev developers to use QuB recordsets in their PHP pages. The QuB Recordset is a new Recordset type designed to fully use the QuB potential from Ultradev, allowing Visual Recordset Editing. QuB has support for MySQL, Access and PostgreSQL databases. For more details on QuB, visit: http://www.interakt.ro/products/QuB/ QuB documentation can be found at: http://www.interakt.ro/products/documentation.php?prodId=11 A Flash demo of QuB can be viewed at http://www.interakt.ro/products/Demos/QUB.php The InterAKT Team -- --- Alexandru COSTIN Product Manager http://www.interakt.ro/ +401 411 2610 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cookie problem. Not possible to set and read a cookie on the same page?
Hi there, I am wondering if it is possible to send a cookie and read it on the same page. Following environment: There is a cookie already on the machine of the client, but expired. Now I am setting a new cookie and reading it on the same page via $sess_id = $HTTP_COOKIE_VARS[$sesscookiename]; Unfortuanaelly it gives me the old session id back. After refreshing I am getting the new sessid and everything works fine. The cookie has been sent with the right value, I did dubble check it. But the HTTP_C... reads the old one. why? Thanx for any help, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MS Access data = mySQL database
Hi, I did actually download DBTools and i think its' an excellent software. It's running perfect on my system too. Just a couple of things i'd like to ask you, since you have already used this and i'm fairly new to this... You see, my MySQL server/database is on a web server, for a online website. Now how do i connect the DBTools on my system to the Web Server on the Internet, and then to the database on the website?? Once i'm able to connect to that, then i think it should not be a problem to import the Data from the MS Access table into the MySQL table on the internet. Really appreciate your help... Thanks! T. Edison jr. --- Steven Dowd [EMAIL PROTECTED] wrote: you should try this program , DBTools http://www.dbtools.com.br/ a.. Import Structure and Data from others Databases (MS Access, MS FoxPro, Clipper, Dbase, Paradox, Text Files and ODBC Data sources) a.. Export the database/table contents to SQL, Text, HTML or XML documents. You can dump it directly by using the Dump Data or you can export your results (this includes other formats) a.. You don't need to have MySQL server installed in a WIN32 platform. DBTools can connect to MySQL wherever you have your server installed, using TCP/IP and MySQL C API. I use this constantly to transfer direct from access / excell into mysql. its isnt the answer for you if you want to do it completly with php, but it gets you to the basic area, and transfers the data.. there is at www.hotscripts.com a php accessmysql converter, i tried it last year, but found it very buggy. cannot remember what it was called steven dowd - Original Message - From: Thomas Edison Jr. [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 25, 2002 11:31 AM Subject: [PHP] MS Access data = mySQL database Can anyone tell me how to convert/send data stored in an MS Access database to a mySQL table through PHP?? T. Edison Jr. = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MS Access data = mySQL database
Thanks... actually the software DBTools from www.dbtools.com.br is excellent for the same purpose, as suggested by someone here. It does the needful pretty efficiently. Cheers! T. Edison Jr. --- Jon Farmer [EMAIL PROTECTED] wrote: Can anyone tell me how to convert/send data stored in an MS Access database to a mySQL table through PHP?? 3 Ways of doing this come to mind. Only one uses PHP though. 1. From PHP use ODBC to extract from access and send to MySQL through PHP functions. 2. Export to csv from Access and use mysqlimport to import into MySQL. 3. Use the MySQL ODBC driver to link the MySQL tables into Access and run a query to copy the records over. Regards Jon -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 PGP Key available, send email with subject: Send PGP Key = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OT - number of chars in querystring
Sorry for this quick OT question -- I'm skimming thru the HTTP spec but can't find anything that defines the character limit in GET requests. I'm writing a form that uses GET to send data to my PHP script, but I'm afraid that if the user enters too many characters then some will get cut off. Does anyone know the actual limit? If not, is there a generally-accepted maximum that is used (to assure compatibility with most user agents and servers)? Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: cookie problem. Not possible to set and read a cookie on the same page?
Not possible, read the manual page about setcookie: www.php.net/setcookie There's a 'common pitfall' entry saying so. Don't know why. Maybe the cookie is only written to user's disk after the page is fully loaded, maybe for security reasons. -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 Andy [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi there, I am wondering if it is possible to send a cookie and read it on the same page. Following environment: There is a cookie already on the machine of the client, but expired. Now I am setting a new cookie and reading it on the same page via $sess_id = $HTTP_COOKIE_VARS[$sesscookiename]; Unfortuanaelly it gives me the old session id back. After refreshing I am getting the new sessid and everything works fine. The cookie has been sent with the right value, I did dubble check it. But the HTTP_C... reads the old one. why? Thanx for any help, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cookie problem. Not possible to set and read a cookie onthe same page?
On Tue, 26 Mar 2002, andy wrote: I am wondering if it is possible to send a cookie and read it on the same page. Following environment: There is a cookie already on the machine of the client, but expired. Now I am setting a new cookie and reading it on the same page via $sess_id = $HTTP_COOKIE_VARS[$sesscookiename]; Unfortuanaelly it gives me the old session id back. After refreshing I am getting the new sessid and everything works fine. The cookie has been sent with the right value, I did dubble check it. But the HTTP_C... reads the old one. An HTTP request (the transaction between browser and server) always goes like this: 1) The browser sends a request. 2) The server sends a response. That's it. This creates certain constraints. The browser sends the appropriate cookies (those in the right domain) to the server along with its request. The server then sends any new cookies back to the browser as part of its response. There is no chance for the server to re-read the cookies from the browser after step 2 above, unless, as you've observed, you refresh the page, which in effect just repeats both steps. miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cookie problem. Not possible to set and read a cookie on the same page?
On Tuesday, March 26, 2002, at 11:42 AM, Miguel Cruz wrote: There is no chance for the server to re-read the cookies from the browser after step 2 above, unless, as you've observed, you refresh the page, which in effect just repeats both steps. One ugly way that I've gotten around this in one of my scripts was to set the cookie, and then use header(location: samepage.php) to refresh the page -- worked fine, and if all you do is set the cookie before calling header() it should be practically unnoticeable. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL arrays
All that you've accomplished in your example is to store the size of the queries; you've stored no data. Second, per my previous email: DO NOT RELEASE THE RESULT RESOURCE UNTIL YOU ARE DONE WITH THE PAGE. If you want to re-use a result record set, you can with the mysql_seek() function. You do not have to make yet another query to the database with the same SELECT query. You can free the result resources when you've completed the page. -Original Message- From: Anzak Wolf [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 10:07 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] MySQL arrays CHANGE: $len = sizeof($this-query_id); $len++; $this-query_id = array($len=$q); mysql_free_result($q); return $len; TO: $this-query_id[] = $q; return sizeof($this-query_id); second: $q is a resource, that is, a pointer variable. When you execute mysql_free_result($q), you free-up the memory that it pointed to. Therefore, when you attempt to recall its value, it is pointing to memory that you no longer own. Hence, it is not a valid resource. Therefore, do not free the resource. When the script completes, the memory will automatically be de-allocated. Also, when you use the phrase $q, you are creating a pointer to a pointer; is that what you want? I thought that $q created a new instance ie a copy of the data rather than a pointer. That worked though I have do a $q_id-- in my num_rows method because sizeof returns 1 but the way the value is being assigned it is being put in the 0 location. Though that is not a problem. Would it be better to parse out the data into arrays that I can access later then destroy the query? for example $q = mysql_query(select * from User); $this-query_id[] = mysql_num_rows($q); mysql_free_result($q); $len = sizeof($this-query_id) - 1; return $len; This way when I have a large number of queries stored I don't have the over head of all the pointers to the query objects or would doing this create more overhead? I'm trying to save on repeated calls to the database since it is possible that the database may change between with the first query is done and the last query is done and if they are the same query then the page would need the results to be the same. _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] OT - number of chars in querystring
Good day, The RFC says that there is no limit on the size of the request. But, I remember reading that the real world maximum is 2048 characters, which I believe is a hard limit on some clients. I also recall reading that there is an RFC that suggests limiting the request to 255 characters. It appears that you might be submitting a lot of data. If that's the case, you should really have your application determine the information to be submitted and then store/create them as hidden values in a form. That way, not only will you have no problems with length, but you don't have to worry about the client caching it. Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 9:41 AM To: [EMAIL PROTECTED] Subject: [PHP] OT - number of chars in querystring Sorry for this quick OT question -- I'm skimming thru the HTTP spec but can't find anything that defines the character limit in GET requests. I'm writing a form that uses GET to send data to my PHP script, but I'm afraid that if the user enters too many characters then some will get cut off. Does anyone know the actual limit? If not, is there a generally-accepted maximum that is used (to assure compatibility with most user agents and servers)? Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] which php book 2 buy ?
I wanna buy a book from amazon . . .but don't know which one.. Do you know where I will find examples of shopping carts ? (which book ?) MySQL/PHP Database applications by Greenspan and Bulger ISBN 0764535374 Good book. Also has a 40 page chapter on how to build a shopping cart complete with design rationale and working code (on CD) HTH Tony -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] cookie problem. Not possible to set and read a cookie on the same page?
Direct answer: No, you cannot read a cookie on the same page that creates it. The question is: why would you want to? After all, you already have the data available to you that you would read from the cookie because you had to use it to create the cookie on that page. -Original Message- From: andy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 10:39 AM To: [EMAIL PROTECTED] Subject: [PHP] cookie problem. Not possible to set and read a cookie on the same page? Hi there, I am wondering if it is possible to send a cookie and read it on the same page. Following environment: There is a cookie already on the machine of the client, but expired. Now I am setting a new cookie and reading it on the same page via $sess_id = $HTTP_COOKIE_VARS[$sesscookiename]; Unfortuanaelly it gives me the old session id back. After refreshing I am getting the new sessid and everything works fine. The cookie has been sent with the right value, I did dubble check it. But the HTTP_C... reads the old one. why? Thanx for any help, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] which php book 2 buy ?
On Tuesday, March 26, 2002, at 11:57 AM, Tony Crockford wrote: MySQL/PHP Database applications by Greenspan and Bulger ISBN 0764535374 Good book. Also has a 40 page chapter on how to build a shopping cart complete with design rationale and working code (on CD) I thought this would have been a great book if it weren't for the numerous errors in the code sections. I highly recommend it if you know PHP well enough to bang out a few forms and if you know MySQL well enough to write some INSERT and SELECT statements -- if this is the case then you will have no problem noticing the errors, and can use the book as a guide to writing complex web applications. In my case, though, I started learning PHP with this book, and the frustration with code errors drove me to return it to the store. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] which php book 2 buy ?
I thought this would have been a great book if it weren't for the numerous errors in the code sections. I highly recommend it if you know PHP well enough to bang out a few forms and if you know MySQL well enough to write some INSERT and SELECT statements -- if this is the case then you will have no problem noticing the errors, and can use the book as a guide to writing complex web applications. In my case, though, I started learning PHP with this book, and the frustration with code errors drove me to return it to the store. Nothing like a bit of debugging to get to know a language! The CD code is different too, so maybe they put it right? Oh well (I'll ask Jay, he's a regular on evolt's TheList! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT - number of chars in querystring
On Tuesday, March 26, 2002, at 11:47 AM, Darren Gamble wrote: It appears that you might be submitting a lot of data. If that's the case, you should really have your application determine the information to be submitted and then store/create them as hidden values in a form. That way, not only will you have no problems with length, but you don't have to worry about the client caching it. I wanted to use GET rather than POST method so that users could bookmark the results of the form -- it is essentially a search engine for a MySQL database. The form has built-in limits to how long the inputs can be, and in fact most of the inputs are really select listboxes and not text-style inputs, so I'm not really worried about having TOO many characters -- but it could get over 255, which is exactly the number that I thought I had read was a maximum. Thanks for the reply, Darren. 2048 seems like a workable limit to me. But I'm curious about your suggestion -- how would I get the user inputted data into hidden form variables without submitting the form in the first place? Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT - number of chars in querystring
You could store the query somewhere, like in a database or file, give it an id, and store this id on a cookie. When the visitor returns, just grab the corresponding query using the cookie's id. -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Array Question
I have some multiple select boxes in a form ie SELECT name=state[] multiple size=5 style=width:360; option value=allall Regions /option option value=16Region19 /option option value=14Region14/option option value=5Region15/option these then get passed and I want to use them in mysql query blah blah WHERE (t_state_id_state = $state[0]) Whats the best way of finding out how many items are in my array ? And how can I step through the ones the exist ? And can I only use LIKE % when my value is all ? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Personal web server that runs PHP
Hi, Does anyone know of a personal web server that I can installon my Win 98 machine that supports PHP 4.x? Thanks, Don
Re: [PHP] FTP RAW
Hi Chris: Yes. Your solutions fails for any file over 5k about 99% of the time. The server I use does not have the FTP functions installed so I cannot use I wouldn't really call it your solution, since it's really the solution. FTP stands for File Transfer Protocol. If you don't have a file, you don't have FTP. Your initial post didn't say you didn't have the FTP functions available. that is why I am looking to this solution. Uh, care to share which solution you're talking about? The only way we can help you is if you start geting specific. Clearly and thoroughly explain the methods you're using. Even better, include the code that's not working. Another option is to forget the files and FTP alltogether, switching to sockets instead. PHP has some new functions for this, but, again, your server may not have them up. If that's the case, can you use Perl? Enjoy, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Personal web server that runs PHP
Hi, Of course. The Personal Web Server that is available with Windows 98 as an Add-On totally supports PHP4. I have it configured on my system. I'm not sure if i know of a place where you can download it from.. But it's available as an Add-On with Windows 98 CD. If you look on the net, i'm sure you'll find the PWS. Regards, T. Edison jr. --- Don [EMAIL PROTECTED] wrote: Hi, Does anyone know of a personal web server that I can installon my Win 98 machine that supports PHP 4.x? Thanks, Don = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] *sigh* xmldom win2k php4.1.2 apache
Hi Tobias: On Tue, Mar 26, 2002 at 11:02:50AM +0100, botsai wrote: I worked with the xmldom under php4.0.6 and everything was fine and dandy, though since I upgraded php on my staging server which is a win2k(pro) box to 4.1.2 there has been no way to get the libxml to work. Forgive me for stating the obvious, but hey, simple oversights happen... Have you removed the ; from in front of this line in your php.ini file? ;extension=php_domxml.dll --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] COSF needs members More Info
COSF will be a CGI foundry that produces scripts from: - The existing projects of its members (which means if you have a project in the works which was supposed to be finished a year ago right before you started on the new one) - The Scripts which have been abandoned because the scripter lost his/her interest in. - From the brain child of any of our members. I am planning to make a CGI Open Source Foundry We will start in stages. After the Foundry is initially set-up we will begin to release scripts. The main goal would be to improve our skills, start something and actually finish it quickly and better than designed. The CGI Open Source Foundry is designed to help Perl/PHP developers find help and resources to improve the Open Source CGI community. We plan to have the CGI Open Source Foundry built by late-summer (refer to our schedule). We plan on using this site to share ideas, post news of our progress on the foundry and various other projects, and recruit programmers. We are looking for our first members to test and see if this is going to work. COSF will be producing Perl and/or PHP scripts for the open source community, most under the GNU Public License, -their may be a few sold under other licenses-. This is how COSF will operate: A developer will either start a project from his/her own projects or take up an abandoned/dead project from http://sourceforge.net or other places on the net. The developer can assign other developers to help them organize the project. The project then posts an entry on COSF's open projects board and uses COSF's groupware tools to help them collaborate on the project. The script is then distributed through COSF and where ever the developers desire. This was taken from the about page of the COSF site, so the formatting may be a little off. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Array in a Loop Question
I have a form that gets repeated depending on number of members in a group(1 form surrounds all members). I separate the entries by assigning a count value to the names of the inputs (Ex. input type=text name=address$count value=). Does anyone know how I can pull the values back out of the $_POST[]? Example of ideal scenario that does not work: case process1: for ($i=0;$i$_POST[count];$i++) { $_POST[address$i] } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Personal web server that runs PHP
In fact, using Apache Win32 Module on a Windows 98 PC is a much better choice option rather then PWS. Apache server gives greater flexibility support. I don't see any reason why you should choose PWS over Apache Win32 for your Win 98 PC? T. Edison Jr. --- R'twick Niceorgaw [EMAIL PROTECTED] wrote: u can use Apache on win 98 I believe ? - Original Message - From: Don [EMAIL PROTECTED] To: php list [EMAIL PROTECTED] Sent: Tuesday, March 26, 2002 12:56 PM Subject: [PHP] Personal web server that runs PHP Hi, Does anyone know of a personal web server that I can installon my Win 98 machine that supports PHP 4.x? Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Personal web server that runs PHP
Also good http://www.omnicron.ca but not free ! In fact, using Apache Win32 Module on a Windows 98 PC is a much better choice option rather then PWS. Apache server gives greater flexibility support. I don't see any reason why you should choose PWS over Apache Win32 for your Win 98 PC? T. Edison Jr. --- R'twick Niceorgaw [EMAIL PROTECTED] wrote: u can use Apache on win 98 I believe ? - Original Message - From: Don [EMAIL PROTECTED] To: php list [EMAIL PROTECTED] Sent: Tuesday, March 26, 2002 12:56 PM Subject: [PHP] Personal web server that runs PHP Hi, Does anyone know of a personal web server that I can installon my Win 98 machine that supports PHP 4.x? Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Rahul S. Johari (Director) ** Abraxas Technologies Inc. Homepage : http://www.abraxastech.com Email : [EMAIL PROTECTED] Tel : 91-4546512/4522124 *** __ Do You Yahoo!? Yahoo! Movies - coverage of the 74th Academy Awards® http://movies.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array in a Loop Question
for ($i=0;$i$_POST[count];$i++) { echo $_POST['address' . $i] . 'br'; } Concanate array key 'address' with $i -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinho? http://www.submarino.com.br/wishlistclient.asp?wlid=664176742884 Jeff Hatcher [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I have a form that gets repeated depending on number of members in a group(1 form surrounds all members). I separate the entries by assigning a count value to the names of the inputs (Ex. input type=text name=address$count value=). Does anyone know how I can pull the values back out of the $_POST[]? Example of ideal scenario that does not work: case process1: for ($i=0;$i$_POST[count];$i++) { $_POST[address$i] } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array in a Loop Question
On Tuesday, March 26, 2002, at 01:18 PM, Jeff Hatcher wrote: I have a form that gets repeated depending on number of members in a group(1 form surrounds all members). I separate the entries by assigning a count value to the names of the inputs (Ex. input type=text name=address$count value=). Does anyone know how I can pull the values back out of the $_POST[]? Example of ideal scenario that does not work: case process1: for ($i=0;$i$_POST[count];$i++) { $_POST[address$i] } The initial form: for ($i = 1; $i = $_POST['count']; $i++) { print input name=\address{$i}\ type=\text\ /\n; } print input name=\count\ type=\hidden\ value=\ . $_POST['count'] . \ / What the above loop does is it makes a number of address inputs equal to $count... if $count is equal to 3, then you will get input name=address1 type=text / input name=address2 type=text / input name=address3 type=text / input name=count type=hidden value=3 / I changed your $i from 0 to 1 because it makes it mentally easier to work with (for me at least). Now in your next script, which is the target of the form, here is what you want to have: for ($i = 1; $i = $_POST['count']; $i++) { // do some code with $_POST[address{$i}], such as // entering it into a database or echoing it to the user in HTML } Some further notes -- the hidden form field was so that you could give the second script the count variable, so it knows how many loops to do (this value is otherwise not available to the second script). Also, the use of doublequotes in the second script ($_POST[address{$i}]) is imperative because with singlequotes the variable $i will not expand to $_POST[address2] or whatever. HTH, Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array Question
I can make this just a little easier.. try this $query = SELECT * FROM mytable WHERE t_state_id_state in (' .join(', ', $state). '); if $state happens to be the name of the array that is passed from the multi-select Jim Lucas www.bend.com - Original Message - From: Rick Emery [EMAIL PROTECTED] To: 'John Fishworld' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, March 26, 2002 10:07 AM Subject: RE: [PHP] Array Question $n =sizeof($state); $srch = ; while( $x=0; $x$n; $x++) { ... do something with array element $state[$x] ... $srch .= $state[$x]., ; } $srch = rtrim($srch,, ); $query = SELECT * FROM mytable WHERE t_state_id_state in ($srch); -Original Message- From: John Fishworld [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 11:51 AM To: [EMAIL PROTECTED] Subject: [PHP] Array Question I have some multiple select boxes in a form ie SELECT name=state[] multiple size=5 style=width:360; option value=allall Regions /option option value=16Region19 /option option value=14Region14/option option value=5Region15/option these then get passed and I want to use them in mysql query blah blah WHERE (t_state_id_state = $state[0]) Whats the best way of finding out how many items are in my array ? And how can I step through the ones the exist ? And can I only use LIKE % when my value is all ? thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: which php book 2 buy ?
In article [EMAIL PROTECTED], Septic Flesh wrote: I wanna buy a book from amazon . . .but don't know which one.. Do you know where I will find examples of shopping carts ? (which book ?) Creating Dynamic Web Pages Using PHP and MySQL by David Tansley. -- Rgds Ralph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: which php book 2 buy ?
Or, of course, if you want to be cool like Carl: http://lerdorf.com/buy/ ;) -Rasmus On Tue, 26 Mar 2002, Ralph Friedman wrote: In article [EMAIL PROTECTED], Septic Flesh wrote: I wanna buy a book from amazon . . .but don't know which one.. Do you know where I will find examples of shopping carts ? (which book ?) Creating Dynamic Web Pages Using PHP and MySQL by David Tansley. -- Rgds Ralph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array in a Loop Question
I think to get the results you are wanting, you might try this. input type='text' name='address[]' value='' the address[] tells the form that this element is an array and when submitted, will be converted into an indexed array on the process page. so you take this new array on the process page and do something like this. foreach($address AS $k = $v) { echo $k : $v; } Jim Lucas www.bend.com - Original Message - From: Jeff Hatcher [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 26, 2002 10:18 AM Subject: [PHP] Array in a Loop Question I have a form that gets repeated depending on number of members in a group(1 form surrounds all members). I separate the entries by assigning a count value to the names of the inputs (Ex. input type=text name=address$count value=). Does anyone know how I can pull the values back out of the $_POST[]? Example of ideal scenario that does not work: case process1: for ($i=0;$i$_POST[count];$i++) { $_POST[address$i] } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: which php book 2 buy ?
I didn't think Programming PHP was out yet? On Tue, 26 Mar 2002, Rasmus Lerdorf wrote: Or, of course, if you want to be cool like Carl: http://lerdorf.com/buy/ ;) -Rasmus On Tue, 26 Mar 2002, Ralph Friedman wrote: In article [EMAIL PROTECTED], Septic Flesh wrote: I wanna buy a book from amazon . . .but don't know which one.. Do you know where I will find examples of shopping carts ? (which book ?) Creating Dynamic Web Pages Using PHP and MySQL by David Tansley. -- Rgds Ralph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: which php book 2 buy ?
Amazon says it's not published yet. So when -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 12:52 PM To: Ralph Friedman Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Re: which php book 2 buy ? Or, of course, if you want to be cool like Carl: http://lerdorf.com/buy/ ;) -Rasmus On Tue, 26 Mar 2002, Ralph Friedman wrote: In article [EMAIL PROTECTED], Septic Flesh wrote: I wanna buy a book from amazon . . .but don't know which one.. Do you know where I will find examples of shopping carts ? (which book ?) Creating Dynamic Web Pages Using PHP and MySQL by David Tansley. -- Rgds Ralph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array in a Loop Question
Brilliant thanks ! I've got three of these in my form ! lol I think to get the results you are wanting, you might try this. input type='text' name='address[]' value='' the address[] tells the form that this element is an array and when submitted, will be converted into an indexed array on the process page. so you take this new array on the process page and do something like this. foreach($address AS $k = $v) { echo $k : $v; } Jim Lucas www.bend.com - Original Message - From: Jeff Hatcher [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, March 26, 2002 10:18 AM Subject: [PHP] Array in a Loop Question I have a form that gets repeated depending on number of members in a group(1 form surrounds all members). I separate the entries by assigning a count value to the names of the inputs (Ex. input type=text name=address$count value=). Does anyone know how I can pull the values back out of the $_POST[]? Example of ideal scenario that does not work: case process1: for ($i=0;$i$_POST[count];$i++) { $_POST[address$i] } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Array in a Loop Question
for ($i=0;$i$_POST[count];$i++) { echo $_POST['address' . $i] . 'br'; } Concanate array key 'address' with $i This works fine and I also can do the address[] but my ultimate result is to put this in the database. So address='$_POST['address' . $i]' fails and address='$_POST[address][$i]' fails. I can reassign the values to new variables i.e. $address = $_POST['address' . $i]; DB Update address='$address' Or $address $_POST[address][$i]; DB Update address='$address' So my question is how can I put this in the database without having to reassign my variable name? Current Solution: case process1: for ($i=0;$i$_POST[count];$i++) { $postal=$_POST[postal1][$i] . . $_POST[postal2][$i]; $state=$_POST[state][$i]; $address=$_POST[address][$i]; $email=$_POST[email][$i]; $city=$_POST[city][$i]; $customerid=$_POST[customerid][$i]; mssql_query(UPDATE customer SET postal='$postal',state='$state',address='$address',email=$_POST['email' . $i],city='$city' WHERE id='$customerid') or die(DATABASE ERROR: updating customer, residentchange process 1); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] [Session]
Hi !! I can't make this work: PAGE 1: ? $HTTP_SESSION_VARS[v_s]=500; ? html head titleSESSION 1/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body bgcolor=#FF text=#00 pVariabile settata? -- ? if (isset($HTTP_SESSION_VARS[v_s])){ echo si; }else{ echo no; } ?/p pa href=sess_2.phplink to next/a /p/body /html In page 1 I create the session var and I check if it exists. The if stat returns YES so it seems everything's ok. PAGE 2: html head titleSESSION 2/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body bgcolor=#FF text=#00 ? echo $HTTP_SESSION_VARS[s_v]; ? /body /html In page 2 I simply read the session var but it doesn't return anything. I must leave register_globals = Off ! What's wrong? Thanks, Evan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] [Session]
Try using the same session variable. Right now it looks like the first one is v_s and the second is s_v. HTH. Brian -Original Message- From: Evan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 2:15 PM To: [EMAIL PROTECTED] Subject: [PHP] [Session] Hi !! I can't make this work: PAGE 1: ? $HTTP_SESSION_VARS[v_s]=500; ? html head titleSESSION 1/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body bgcolor=#FF text=#00 pVariabile settata? -- ? if (isset($HTTP_SESSION_VARS[v_s])){ echo si; }else{ echo no; } ?/p pa href=sess_2.phplink to next/a /p/body /html In page 1 I create the session var and I check if it exists. The if stat returns YES so it seems everything's ok. PAGE 2: html head titleSESSION 2/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body bgcolor=#FF text=#00 ? echo $HTTP_SESSION_VARS[s_v]; ? /body /html In page 2 I simply read the session var but it doesn't return anything. I must leave register_globals = Off ! What's wrong? Thanks, Evan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OT Re: [PHP] Re: which php book 2 buy ?
Totally off topic -- I thought that O'Reilly had switched to using a white binding with black text on all of their newly-[re]printed books. The picture of the sleeping babe with the book shows an older style, with a colored field (green) and white text. Maybe this is a localization thing. On Tuesday, March 26, 2002, at 01:51 PM, Rasmus Lerdorf wrote: Or, of course, if you want to be cool like Carl: http://lerdorf.com/buy/ ;) Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Array in a Loop Question
On Tuesday, March 26, 2002, at 02:12 PM, Jeff Hatcher wrote: So my question is how can I put this in the database without having to reassign my variable name? You have to jump out of the quoted string that represents your SQL query when you echo the value of the $_POST variable. Like this: $sql = SELECT a FROM b WHERE c=' . $_POST['d'] . '; Note that I 'jumped out' immediately after the singlequote mark (which you need if your value is going into a string field) by closing the double-quoted string, using the dot to append the value of the variable $_POST['d'], and then using a dot to append another double-quoted string (which contains nothing but a single quote in it). Sometimes, depending on what your variable names look like, you can just escape your variable by using braces ('{' and '}'), but I think it's just easier to use the dot do appending from string to variable value to string again. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Session]
On Tuesday, March 26, 2002, at 02:14 PM, Evan wrote: Hi !! I can't make this work: PAGE 1: ? $HTTP_SESSION_VARS[v_s]=500; ? I am probably wrong about this, but I thought that you could register session variables using this technique only if you are using PHP 4.1.x and you use the format: $_SESSION['v_s'] = 500; Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Session]
Try using the same session variable. Right now it looks like the first one is v_s and the second is s_v. HTH. Ops I changed it butit doesn't work! :-(( :_( Evan Brian Drexler [EMAIL PROTECTED] ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Try using the same session variable. Right now it looks like the first one is v_s and the second is s_v. HTH. Brian -Original Message- From: Evan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 2:15 PM To: [EMAIL PROTECTED] Subject: [PHP] [Session] Hi !! I can't make this work: PAGE 1: ? $HTTP_SESSION_VARS[v_s]=500; ? html head titleSESSION 1/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body bgcolor=#FF text=#00 pVariabile settata? -- ? if (isset($HTTP_SESSION_VARS[v_s])){ echo si; }else{ echo no; } ?/p pa href=sess_2.phplink to next/a /p/body /html In page 1 I create the session var and I check if it exists. The if stat returns YES so it seems everything's ok. PAGE 2: html head titleSESSION 2/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head body bgcolor=#FF text=#00 ? echo $HTTP_SESSION_VARS[s_v]; ? /body /html In page 2 I simply read the session var but it doesn't return anything. I must leave register_globals = Off ! What's wrong? Thanks, Evan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Session]
I have PHP 4.1.2 (the latest, I downloaded it a week ago). The manual says that: * If track_vars is enabled and register_globals is disabled, only members of the global associative array $HTTP_SESSION_VARS can be registered as session variables. The restored session variables will only be available in the array $HTTP_SESSION_VARS. * I won't use $_SESSION cause it seems that is a bit buggy have a search with google-user group $_SESSION. Anyway thanks for your interest, Evan Erik Price [EMAIL PROTECTED] ha scritto nel messaggio [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Tuesday, March 26, 2002, at 02:14 PM, Evan wrote: Hi !! I can't make this work: PAGE 1: ? $HTTP_SESSION_VARS[v_s]=500; ? I am probably wrong about this, but I thought that you could register session variables using this technique only if you are using PHP 4.1.x and you use the format: $_SESSION['v_s'] = 500; Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] apache in win32 !
I know that this is 4 php questions but I bet most of you came across something similar. well I am running an apache server both in a linux and a win2k . .to support my php code.. does the .htaccess .htpasswd work in both OSs? In linux works just fine, while in windows it prompts for the user/passwd but nothing after that. - Directory C:/nusphere/apache/htdocs/myphpmysqldirectory AuthUserFile C:/nusphere/apache/htdocs/myphpmysqldirectory/.htpasswd AuthGroupFile /dev/null AuthName Admin AuthType Basic AllowOverride Limit Limit GET require user nrasid /Limit /Directory - same piece of code works with linux (of cource different dirs) Apache/1.3.20 Thanks.. -- Sapilas/dev/pinkeye -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] FTP RAW
OK. I don't know how I can be more specific, but I will try. I have used fopen(ftp://url) to upload files to the FTP server from a web form, however this fails on files over 5k in size. I do not have the FTP functions installed on the server I will be using. I simply want to know how I would use the raw FTP commands with an fsockopen() function. I know how to use this to connect to the file server, change directories, etc.. The question is how do I use the fsocket() with raw FTP commands to upload a file? Is that not specific? Analysis Solutions [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi Chris: Yes. Your solutions fails for any file over 5k about 99% of the time. The server I use does not have the FTP functions installed so I cannot use I wouldn't really call it your solution, since it's really the solution. FTP stands for File Transfer Protocol. If you don't have a file, you don't have FTP. Your initial post didn't say you didn't have the FTP functions available. that is why I am looking to this solution. Uh, care to share which solution you're talking about? The only way we can help you is if you start geting specific. Clearly and thoroughly explain the methods you're using. Even better, include the code that's not working. Another option is to forget the files and FTP alltogether, switching to sockets instead. PHP has some new functions for this, but, again, your server may not have them up. If that's the case, can you use Perl? Enjoy, --Dan -- PHP scripts that make your job easier http://www.analysisandsolutions.com/code/ SQL Solution | Layout Solution | Form Solution T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Loading Images
I don't have any code for this, but I'm hoping someone can point me in the right direction. I want to load images or navigation menus dynamically. Is it possible to build a database of images and then use php to display them? Or something along these lines. I know this must be possible, becuase I see sites that do something like this, and I cant seem to right click the image and save it. Does this make any sense? Thanks. -Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php