[PHP] Can't pass query string from HTML to PHP
Hi, I've got a problem passing a query string from a HTML file to a PHP file. I created a HTML file called welcome.html with the following link: a href=welcome.php?name=Andy Hi, I'm Andy /a I am trying to pass the query string Andy to a PHP file called welcome.php with the following command: ?php echo (Welcome, $name!); ? After i load welcome.html in my browser, i try linking it to welcome.php through the hyperlink i created. But the result i got was Welcome, ! Where is Andy? If the code has got no problem, could it be the Web server (IIS) or the browser (IE) im using? Or the configuration of the Web server is not correct? Pls help! Thank You Beginner, Robbie - Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month!
RE: [PHP] Can't pass query string from HTML to PHP
check your php.ini file to see if you have register_globals set to on or off (probably off) You can either turn it on or use $_GET[name] -Original Message- From: Robby Ku [mailto:[EMAIL PROTECTED] Sent: Friday, 20 June 2003 4:06 PM To: [EMAIL PROTECTED] Subject: [PHP] Can't pass query string from HTML to PHP Hi, I've got a problem passing a query string from a HTML file to a PHP file. I created a HTML file called welcome.html with the following link: a href=welcome.php?name=Andy Hi, I'm Andy /a I am trying to pass the query string Andy to a PHP file called welcome.php with the following command: ?php echo (Welcome, $name!); ? After i load welcome.html in my browser, i try linking it to welcome.php through the hyperlink i created. But the result i got was Welcome, ! Where is Andy? If the code has got no problem, could it be the Web server (IIS) or the browser (IE) im using? Or the configuration of the Web server is not correct? Pls help! Thank You Beginner, Robbie - Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! __ Information from NOD32 1.436 (20030612) __ This message was checked by NOD32 for Exchange e-mail monitor. http://www.nod32.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to secure site?
Hello! I have an Apache web-server with PHP-4.3.2 installed. Directory structure of my DocRoot is as follows: www/ docs/ tm/ tts/ cache/ lib/ index.html docs, tm, tts are directories of projects, published through ftp by different people, lib - common directory, containing php-scripts, cache - common directory, where scripts of all projects must be able to create temporary files. I want my projects not to be able to read scripts of each other, BUT use common dirs. open_base_dir in each directory of docs, tm, tts seems to be be a good idea. BUT, in this case projects scripts won't be able to use cache and lib. Other way - I can turn on safe_mode and include www/lib in safe_mode_include_dir. In this case projects will be able to include scripts from lib, BUT won't be able to create files in cache because scripts and cache have different owners. So, can you tell me some decision to solve my problem? -- Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Can't pass query string from HTML to PHP
Hi Robby, try to add this line to your php-file: $name=$_GET['name'] ; change to: ?php $name=$_GET['name'] ; echo Welcome, . $name.!; ? Good luck! Jan Robby Ku [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] Hi, I've got a problem passing a query string from a HTML file to a PHP file. I created a HTML file called welcome.html with the following link: a href=welcome.php?name=Andy Hi, I'm Andy /a I am trying to pass the query string Andy to a PHP file called welcome.php with the following command: ?php echo (Welcome, $name!); ? After i load welcome.html in my browser, i try linking it to welcome.php through the hyperlink i created. But the result i got was Welcome, ! Where is Andy? If the code has got no problem, could it be the Web server (IIS) or the browser (IE) im using? Or the configuration of the Web server is not correct? Pls help! Thank You Beginner, Robbie - Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Configuring PHP5 in IIS 6.0
Hello I am trying to configure one snap shot of PHP5 in IIS 6.0 to test some stuff, but somehow i can't make it work correctly. This is what i get: CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. I dont know what it is... I have configured PHP4.3.2 and it works correcly... The installation procedure i followed to install PHP5 is... assume C:\phpx\ as the php root folder. 1. Copy php4ts.dll to C:\WINDOWS\SYSTEM32\ (DLL version 5.0.0) 2. Add extension to IIS6 as .phpx with the following cgi-handler: C:\phpx\php.exe-c php.ini 3. Set IIS6 to allow All Uknown CGI extensions in the Web Service Extension 4. Edit C:\phpx\php.ini cgi.force_redirect = 0; fastcgi.impersonate = 1; cgi.rfc2616_headers = 1; and no extensions loaded 5. Test it with... http://localhost/index.phpx where index.phpx has the following contents: ?php echo Hello World; ? I really dunno why it happens, if someone have already configured a snapshot of PHP5 on a win2003 box please tell me how to do it. Any help would be appreciated. Roberto Ramírez -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] file problem
I have this script named test.php: ?php // Get a file into an array. In this example we'll go through HTTP to get // the HTML source of a URL. $lines = file('http://www.google.fr/search?q=beautifulhl=frlr=ie=UTF-8oe=UTF-8start=10sa=N'); // Loop through our array, show html source as html source; and line numbers too. foreach ($lines as $line_num = $line) { echo Line #b{$line_num}/b : . htmlspecialchars($line) . br\n; } ? This script dosen't work. I receive the following warning: Warning: file(http://www.google.fr/search?q=beautifulhl=frlr=ie=UTF-8oe=UTF-8start=10sa=N;) - No such file or directory in test.php on line 4 With this script I want to get the HTML source of a search result on google. I tried with another search engines and it works, only with google dosen't work. For examle I have the script: ?php // Get a file into an array. In this example we'll go through HTTP to get // the HTML source of a URL. $lines = file('http://search.yahoo.com/search?p=sexeei=UTF-8b=1'); // Loop through our array, show html source as html source; and line numbers too. foreach ($lines as $line_num = $line) { echo Line #b{$line_num}/b : . htmlspecialchars($line) . br\n; } ? and I have no problem with it. Can you help me? Maybe you have a suggestion what shall I do to make it work? This is pretty stragne because I tested the code at home and it works. I also tested it at one of my friends and it dosen't work, at my work also it dosen't work. Thanks for your support! Adina P.S. I tried to change the user agent header and it dosen't work.
Re: [PHP] Re: Can't pass query string from HTML to PHP
Hi again, Thanks for the fast response given. I tried both Jan's and Martin's method but it won't solve the problem. I've tried to change register_globals = On in php.ini and i got the same result. I've tried using $_Get['name'] instead of $name but i got the following error: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in c:\inetpub\wwwroot\Welcome.php on line 5 and I've tried Jan's method and was still unable to pass the query string Pls help! Beginner, Robbie - Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month!
[PHP] Authentication: Addressing the user variable
I'm using LDAP to authenticate my users. login.php and any script that requires authentication start off with the following code: -- session_start(); if (session_is_registered(valid_user)) { header( Location: admin.php ); -- The ldap binds as such: ldap_bind($ds, uid=$uid,ou=people,dc=server,dc=domain,dc=dom, $passw); What I want is to be able to display AND use the $uid throughout the other scripts. How can I do this? thanks, Jay __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file problem
On Friday 20 June 2003 16:23, Adina wrote: I have this script named test.php: [snip] This script dosen't work. I receive the following warning: Warning: file(http://www.google.fr/search?q=beautifulhl=frlr=ie=UTF-8oe=UTF-8s tart=10sa=N) - No such file or directory in test.php on line 4 With this script I want to get the HTML source of a search result on google. I tried with another search engines and it works, only with google dosen't work. You're not supposed to use Google like that. Use their API. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* A prisoner of war is a man who tries to kill you and fails, and then asks you not to kill him. -- Sir Winston Churchill, 1952 */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] When to escape slashes, and when not to???
Gerard Samuel wrote: I have a class method that does one thing and one thing only. Escape characters before going to the DB. Part of it is - if (!get_magic_quotes_gpc()) { $string = pg_escape_string( $string ); } return ' . $string . '; In everyday get/post operation it seems to work flawlessly. I've come across a situation where Im parsing an XML file to insert into the DB. The content needed to be escaped, so I modified the above to - if (!get_magic_quotes_gpc() || !get_magic_quotes_runtime()) { $string = pg_escape_string( $string ); } return ' . $string . '; And the XML data is escaped correctly for DB insertion. Now going back to my everyday get/post operation, the code is broken somehow, as content, that is not normally escaped is escaped, and breaking stuff, like serialized data in the DB. Is the above code valid for escaping characters in get/post/cookie and external data operation? Not really. You check if either one is false, and then you escape. But you don't know where the data come from. The data might be from POST and are already escaped by magic quotes, but magic_quotes_runtime is off, so it's escaped once more. So you need to make two class methods, one for escaping gpc variables, another one for escaping runtime variables. Then you only need to check get_magic_quotes_gpc() or get_magic_quotes_runtime() respectively. Can they be safetly used together as in my example above. (Where if one condition doesn't meet, and the other does, escape characters). Or there may be something else in my code that is messing things up. Any pointers/experience would be greatly appreciated. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 20 Jun 2003 08:31:10 -0000 Issue 2128
php-general Digest 20 Jun 2003 08:31:10 - Issue 2128 Topics (messages 152226 through 152283): Re: Month loop 152226 by: CPT John W. Holmes 152228 by: David Nicholson 152229 by: Dan Joseph 152230 by: drparker 152236 by: Tyler Lane SNMP v2 152227 by: Russell Handorf OOT Payflow Urgent 152231 by: Haseeb Iqbal Re: header(); Issue 152232 by: Chris Shiflett Cookies- peanut butter or chocolate?? 152233 by: Sparky Kopetzky 152234 by: David Nicholson 152237 by: Henning Sittler 152238 by: Brent Baisley 152239 by: CPT John W. Holmes 152240 by: Dan Joseph 152241 by: Milan Reznicek 152242 by: Steve Keller 152259 by: Joseph Szobody Re: exec() and passthru() 152235 by: Mignon Hunter securing a graphic 152243 by: Ryan Holowaychuk 152244 by: Haseeb Iqbal 152248 by: Steve Keller 152266 by: Hugh Bothwell Problem while retrieving data from cookie with unserialize 152245 by: Sævar Öfjörð strange crypt() problem 152246 by: Huzz 152247 by: Sævar Öfjörð 152250 by: Huzz 152253 by: Sævar Öfjörð 152254 by: Jeff Harris 152258 by: Huzz explode, split, or what? 152249 by: Kyle Babich 152251 by: Sævar Öfjörð 152252 by: Steve Keller How to UPDATE only certain fields 152255 by: Matt Hedges 152256 by: Thorsten Körner 152257 by: Sævar Öfjörð Pre-4.1 / register_globals=off 152260 by: Lee Herron QCS 152261 by: Sævar Öfjörð safe mode and mail 152262 by: Senih Ö. email pipe - attachment problem (zip files) 152263 by: Duncan When to escape slashes, and when not to??? 152264 by: Gerard Samuel 152283 by: Marek Kilimajer Re: CRM for website 152265 by: YC Nyon Re: [Newman] Passing an image through a php file. 152267 by: Mark Tehara Multiple Submission of the Same Form 152268 by: Miranda, Joel Louie M 152269 by: CPT John W. Holmes 152270 by: Leif K-Brooks 152271 by: Miranda, Joel Louie M Image Border Help 152272 by: Nilaab Y. preg_match 152273 by: Aaron Axelsen Can't pass query string from HTML to PHP 152274 by: Robby Ku 152275 by: Martin Towell 152277 by: Jan Grafström 152280 by: Robby Ku How to secure site? 152276 by: Andrew Afliatunov Configuring PHP5 in IIS 6.0 152278 by: Roberto Ramírez file problem 152279 by: Adina 152282 by: Jason Wong Authentication: Addressing the user variable 152281 by: Jason End 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--- Is there any way I could loop thru and print all the month names (i.e. January, February)? Just make an array and loop through the array. You know the rest of the names, right? :) ---John Holmes... ---End Message--- ---BeginMessage--- Hello, This is a reply to an e-mail that you wrote on Thu, 19 Jun 2003 at 20:58, lines prefixed by '' were originally written by you. Is there any way I could loop thru and print all the month names (i.e. January, February)? for($i=1;$i13;$i++){ echo date(F,mktime(0,0,0,$i,1,1)); } For more info: http://uk.php.net/manual/en/function.mktime.php http://uk.php.net/date HTH David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) ---End Message--- ---BeginMessage--- Hi, Is there any way I could loop thru and print all the month names (i.e. January, February)? I suppose you could do something like: for ($i = 1; $1 = 12; $i++) { echo date(F, mktime(0, 0, 0, $i, 1, 2003)) . br; } Unless you just want to manually create an array with the month's names in it. -Dan Joseph ---End Message--- ---BeginMessage--- that's what I'm looking for - thanks. David Nicholson wrote: Hello, This is a reply to an e-mail that you wrote on Thu, 19 Jun 2003 at 20:58, lines prefixed by '' were originally written by you. Is there any way I could loop thru and print all the month names (i.e. January, February)? for($i=1;$i13;$i++){ echo date(F,mktime(0,0,0,$i,1,1)); } For more info: http://uk.php.net/manual/en/function.mktime.php http://uk.php.net/date HTH David. -- phpmachine :: The quick and easy to use service providing
Re: [PHP] strange crypt() problem
If I use MD5 based encryption...would i have similar problem in the future when i move the codes around to different server? - Original Message - From: Jeff Harris [EMAIL PROTECTED] To: Sævar Öfjörð [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, June 20, 2003 12:06 AM Subject: RE: [PHP] strange crypt() problem It looks like Some operating systems support more than one type of encryption. In fact, sometimes the standard DES-based encryption is replaced by an MD5-based encryption algorithm. The encryption type is triggered by the salt argument. At install time, PHP determines the capabilities of the crypt function and will accept salts for other encryption types. If no salt is provided, PHP will auto-generate a standard two character salt by default, unless the default encryption type on the system is MD5, in which case a random MD5-compatible salt is generated. PHP sets a constant named CRYPT_SALT_LENGTH which tells you whether a regular two character salt applies to your system or the longer twelve character salt is applicable. The first server you were using was using DES, this new server is using MD5. Since hashes are one-way algorithms, you appear to be SOL. However, you might be able to work something with mcrypt and someone who knows anything about it. http://www.php.net/manual/en/ref.mcrypt.php Jeff On Jun 19, 2003, Sævar Öfjörð claimed that: | |Well, if you don't find another solution for this, you could generate |random passwords for each member and mail them to them. Then you would |md5() them and update the DB with new md5()'ed passwords... This is not |the easy way out so I hope someone finds out why the crypt() is behaving |strangely. | |Sævar - ICELAND | |-Original Message- |From: Huzz [mailto:[EMAIL PROTECTED] |Sent: 19. júní 2003 22:43 |To: [EMAIL PROTECTED] |Subject: Re: [PHP] strange crypt() problem | |I already have about 1000 members their password crypted using crypt(); |would they able to login using their password or they have to change it |again?? | |Thanks | | |SævË Ölêöyp [EMAIL PROTECTED] wrote in message |news:[EMAIL PROTECTED] |Try using md5() instead because it is more widely supported than crypt() |and it leaves no room for errors. | |Hope it helps, |Sævar ICELAND | | |-Original Message- |From: Huzz [mailto:[EMAIL PROTECTED] |Sent: 19. júní 2003 21:43 |To: [EMAIL PROTECTED] |Subject: [PHP] strange crypt() problem | |I have this bit of code to crypt user password in user registration as |shown |below. | | $cryptpass=crypt($makepass); |which generated crypted password like eg 37Q9fppLHc4fQ with php 4.0 | |And am using the codes below to check for valid login.. |// $pass - from login page |// $dbpass - from the database | $pass=crypt($pass,substr($dbpass,0,2)); |} |if (strcmp($dbpass,$pass)) { |return(0); |} | | |Recently i have moved the same file to a new server with php 4.3.1 the |problem is the same piece of codes above generates completely differen |crypted value eg.$1$RjZHv7qx$h/L9ZUNT48rilHB6fGoMP/ .. hence the login |codes above does not work... :( | |Please someone tell me that i am not going mad | |please help |huzz | -- Registered Linux user #304026. lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED -- 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] Convert KB to MB?
on Thu, Jun 19, 2003, Brent Baisley wrote: Ahhh, but then marketing gets involved and changes the 1024 to 1000 and ta da, you now have more MegaBytes. 1024 is the right number to use, but don't be surprised if it doesn't match with some numbers you might compare it to. Not necessarily, in data storage 1mb = 1024kb but in data transfer 1mb = 1000kb. Ian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to secure site?
Andrew Afliatunov wrote: Other way - I can turn on safe_mode and include www/lib in safe_mode_include_dir. In this case projects will be able to include scripts from lib, BUT won't be able to create files in cache because scripts and cache have different owners. Go this way, but create a separate cache dir for each project in its own directory. Probably even you would have problems telling which cache file belongs to which project, so how would a stupid computer know the difference. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Migrating pre-4.1 code to a post-4.1 server with register_globals on
-Original Message- From: Johnson, Kirk [mailto:[EMAIL PROTECTED] Sent: 19 June 2003 20:31 To: [EMAIL PROTECTED] Subject: [PHP] Migrating pre-4.1 code to a post-4.1 server with register_globals on A heads-up to those who are moving old code with register_globals on to a server with a newer PHP version and register_globals still on: In the old days, the rule was simple. For a session variable, whatever value was in the global variable at the end of the script was what was saved to the session, and that value was restored on the next page. Under a newer version of PHP, e.g., 4.3.2, this is no longer true in one case. Assume we have a session variable, 'a', that has been assigned some value: $a = 'someValue'; session_register('a'); Then unset($a); will unset the global variable, $a, but NOT the corresponding element in the two session arrays, $HTTP_SESSION_VARS and $_SESSION. Actually, this should only be true for versions 4.1.0 to 4.2.3 -- the manual page at http://uk.php.net/manual/en/ref.session.php (admittedly a *long* way down it and hidden under the Examples heading!) contains this warning: There is a defect in PHP 4.2.3 and earlier. If you register a new session variable by using session_register(), the entry in the global scope and the $_SESSION entry will not reference the same value until the next session_start(). I.e. a modification to the newly registered global variable will not be reflected by the $_SESSION entry. This has been corrected in PHP 4.3. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Can't pass query string from HTML to PHP
-Original Message- From: Robby Ku [mailto:[EMAIL PROTECTED] Sent: 20 June 2003 08:25 Thanks for the fast response given. I tried both Jan's and Martin's method but it won't solve the problem. I've tried to change register_globals = On in php.ini and i got the same result. Did you restart your Web server after making the change? I've tried using $_Get['name'] instead of $name but i got the following error: That's $_GET -- PHP variable names are case-sensitive, so $_Get is not the same thing. Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in c:\inetpub\wwwroot\Welcome.php on line 5 I'm guessing here since you didn't post your revised code, but are you trying to interpolate it in a double-quoted string? Then you also need to use braces, like: echo Welcome, {$_GET['name']}; If it's not that, post your code as it is now for people to look at. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: preg_match
preg_matchtry without backslashes. $pattern = /$search/i; if (preg_match ($pattern, $date[$i])) { echo $date[$i]br /; } you don't need the .*? in your regex (either * or ? multiplier) as preg_match searches for any occurance (not from begin ^ or to end $). ciao SVEN Aaron Axelsen [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am trying to code a search, and i need to get my matching expression to work right. The user can enter a value swhich is stored in the vraible $search. What the below loop needs to do, is search each entry of the array for any occurance of the $search string. If i hard code in the string it works, but not when passed as a varaible. Is there something I am missing? Do i need to convert the $search variable to soetmhing? if (preg_match (/.*?\\\$search.*?/i,$date[$i])) { print $date[$i]br; } - --- Aaron Axelsen AIM: AAAK2 Email: [EMAIL PROTECTED] Want reliable web hosting at affordable prices? www.modevia.com Web Dev/Design Community/Zine www.developercube.com -BEGIN PGP SIGNATURE- Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com iQA/AwUBPvKWA7rnDjSLw9ADEQIfGQCgwAO5ikh/RIN5OXoVkC8F4FH/YAoAoJE5 zMxHkRssHbU2Vm4svv2hId8O =DJOi -END PGP SIGNATURE-
Re: [PHP] Help me compose myself... I'm about to kill Microsoft....
On Thu, 19 Jun 2003 13:21:07 +0200, Daniel wrote: Okay, I think I'll have to kill myself... I can't believe I am this stupid, but it turned out I was working on a copy of the file, not the real one. D'OH!!! Sorry, guys! Daniel That's no reason not to kill M$... +a Steve -- Steve Mansfield-Devine Aéro-club d'Andaines - LFAO - Bagnoles de l'Orne (Couterne) http://www.webvivant.com/aero-andaines -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't pass query string from HTML to PHP
Am Freitag, 20. Juni 2003 08:06 schrieb Robby Ku: Hi, I've got a problem passing a query string from a HTML file to a PHP file. I created a HTML file called welcome.html with the following link: a href=welcome.php?name=Andy Hi, I'm Andy /a I am trying to pass the query string Andy to a PHP file called welcome.php with the following command: ?php echo (Welcome, $name!); ? Change this line to: ?php echoWelcome, . $_GET['name']; ? and that's it. If this doesn't work, because your PHP-Version is =4.0.6 than try this, if you can't update: ?php echoWelcome, . $HTTP_GET_VARS['name']; ? For security-reasons leave your php.ini with: register_globals=off After i load welcome.html in my browser, i try linking it to welcome.php through the hyperlink i created. But the result i got was Welcome, ! Welcome, Andy! ;-) CU Thorsten -- Thorsten Körner http://www.123tkShop.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't pass query string from HTML to PHP
Hi again Am Freitag, 20. Juni 2003 11:47 schrieb Thorsten Körner: Am Freitag, 20. Juni 2003 08:06 schrieb Robby Ku: Hi, I've got a problem passing a query string from a HTML file to a PHP file. I created a HTML file called welcome.html with the following link: a href=welcome.php?name=Andy Hi, I'm Andy /a I am trying to pass the query string Andy to a PHP file called welcome.php with the following command: ?php echo (Welcome, $name!); ? Change this line to: ?php echoWelcome, . $_GET['name']; ? and that's it. If this doesn't work, because your PHP-Version is =4.0.6 than try this, if you can't update: ?php echoWelcome, . $HTTP_GET_VARS['name']; ? Sorry I forgot the !-Char. So do it this way: echoWelcome, . $_GET['name'] . !; or echoWelcome, . $HTTP_GET_VARS['name'] . !; depending onyour PHP-Version. For security-reasons leave your php.ini with: register_globals=off After i load welcome.html in my browser, i try linking it to welcome.php through the hyperlink i created. But the result i got was Welcome, ! Welcome, Andy! ;-) Now it appears as wanted. CU Thorsten -- Thorsten Körner http://www.123tkShop.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] safe mode and mail
Hello, This is a reply to an e-mail that you wrote on Fri, 20 Jun 2003 at 01:40, lines prefixed by '' were originally written by you. Hi, safe mode on and mass mailing wished. I know that it's not possible to set the time limit, when safe mode is on. Sure mass mailing using mail function takes longer than default execution time of the script. My codes should be portable, that why modification of php.ini is not an option. The users shouldn't be experinced and authorized to do this. In brief, I have to find a solution without a need to work in shell. So, due to my theoratical knowledge it seems to be a solution, to queue the mails to sendmail by using popen. Is it true? Or what could be your suggestion for this issue. Thanks in advance, Senih You could only send a certain amount of e-mails on each execution and use a meta-refresh to continually call the script. I do this on one site and also display a progress bar that updates on each refresh which is a bit better for the end user rather than have them staring at nothing until eventually all the mails have sent. All the best, David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Newman] Passing an image through a php file.
On Thu, 2003-06-19 at 20:19, Mark Tehara wrote: ?php $myimage=..//..//site//images//2.jpg; header(Content-type: image/jpeg); fopen ($myimage, r); readfile($myimage) ; fclose($myimage); ? This seemed to do the trick for me. Thank you. / Mark Even better, you don't even need the fopen() and fclose() calls; readfile() is doing this with just the filename. http://www.php.net/readfile -- Torben Wilson [EMAIL PROTECTED]+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Synchronize MYSQL
Dear Members How to Synchronize two MYSQL databases in php Thanks khuram noman __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ie issue: when I do a forced redirect with the header()
Slkigh Ammendment to below ?php header(Location: https://www.google.com;) ; die; ? Jake Johnson wrote: Have you tried... ?php header(Location: https://www.google.com;) ; ? Regards, Jake Johnson [EMAIL PROTECTED] -- Plutoid - http://www.plutoid.com Shop Plutoid for the best prices on Rims and Car Audio Products On Tue, 17 Jun 2003, Jeff Means wrote: How do I force IE to update the location bar when I do a forced redirect?? -- 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] Synchronize MYSQL
khuram noman wrote: Dear Members How to Synchronize two MYSQL databases in php Thanks khuram noman Don't use PHP, just use the replication that's already built into MySQL. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] open_basedir
hi folks, I just realised that open_basedir also prevents the access to /tmp. Thus, file uploads aren't possible. One solution would be, to use a tmp directory within open_basedir, to give PHP the required write access. But assume you're using a server with multiple VirtualHosts and www-dirs. You use open_basedir to limit the access of every script running in a specific VirtualHost/www-dir to its proper www-dir. Now you would have to create a .../tmp directory for each single www-dir, which is not very pretty. Would it be possible to limit access to open_basedir without the exception of /tmp, to allow the uploads? /dorgon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need Instruction on how to compile PHP in Win32...
Hi! I have been looking around on the website and haven't found what I'm looking for. What I am looking for is instruction on what software do I need on the machine, environment variables, etc. and the instruction on the compiling of the php as cgi executable for win32. Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Cannot modify header information - headers already sent
I am having a problem when i use an include file to include database connectivity, however if i cut and paste the code out of the include and place it directly into the .php file it works. I am not sure how to figure this problem out. === error: Warning: Cannot modify header information - headers already sent by (output started at c:\inetpub\wwwroot\PHP\includes\db_conn.inc:1) in c:\inetpub\wwwroot\PHP\login_action.php on line 29 === main page ? session_start(); include(includes\db_conn.inc); if(!isset($HTTP_POST_VARS['login'])) echo end in if 1; else if(empty($HTTP_POST_VARS['login'])) echo end in if 2; else $login = $HTTP_POST_VARS['login']; if(!isset($HTTP_POST_VARS['pw'])) echo end in if 3; else if(empty($HTTP_POST_VARS['pw'])) echo end in if 4; else $pw = $HTTP_POST_VARS['pw']; $strSQL = SELECT * FROM [Login] WHERE [Login] = '.$login.' AND pw = '.$pw.'; $rs = $conn-execute($strSQL); if(!$rs-EOF) { $_SESSION = TRUE; $out = admin_menu.php; } else $out = login.php?err=error; header(Location: .$out); ? === include ? $conn = new COM(ADODB.Connection); $strConn = DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\Inetpub\wwwroot\PHP\data\Registration.mdb; $conn-open($strConn); ? === include Thanks in advance, ~Logan begin 666 db_conn.inc M( \/PT*( D8V]N;B ](YE=R!#3TTH(D%$3T1+D-O;FYE8W1I;VXB*3L- MB @)'-TD-O;FX@/2 B1%))5D52/7M-:6-R;[EMAIL PROTECTED]($1R:79E MB H*BYM9([EMAIL PROTECTED])1/4,Z7$EN971P=6)=W=WF]O=%Q02%!9%T85Q2 M96=IW1R871I;VXN;61B([EMAIL PROTECTED]@(1C;VYN+3YO5N*1S=')#;VYN*3L- %B @/SX` ` end begin 666 login_action.php M/#\-G-EW-I;VY?W1AG0H*3L-FEN8VQU94H(FEN8VQU95S71B7V-O M;FXN:6YC([EMAIL PROTECTED]:7-S970H)$A45%!?4$]35%]605)36R=L;V=I;B== M*2D-@EE8VAO()E;F0@:6X@:68@,2([#0IE;'-E(EF*5M'1Y*1(5%10 M7U!/4U1?5D%24ULG;]G:6XG72DI#0H)96-H;R B96YD(EN(EF(#(B.PT* M96QS90T*21L;V=I;B ](1(5%107U!/4U1?5D%24ULG;]G:6XG73L-@T* M:68H(6ESV5T*1(5%107U!/4U1?5D%24ULG'G72DI#0H)96-H;R B96YD M(EN(EF(#,B.PT*96QS92!I9BAE;7!T[EMAIL PROTECTED];)W!W M)UTI*0T*65C:\@(F5N9!I;B!I9B T(CL-F5LV4-@DD'@/2 D2%14 M4%]03U-47U9!4E-;)W!W)UT[#0HDW1R4U%,(#T@(E-%3$5#5 J($923TT@ M6TQO9VEN72!72$5212!;3]G:6Y=(#T@)R(N)QO9VEN+B(G($%.1!P=R ] M(B+B1P=RXB)R([#0HDG,@/2 D8V]N;[EMAIL PROTECTED]W1R4U%,*3L- MFEF*$DG,M/D5/1BD-GL-@DD7U-%4U-)3TX@/2 B5%)512([#0H))]U M= ]()A9UI;E]M96YU+G!H([#0I]#0IE;'-E#0H))]U= ]()L;V=I M;BYP:' _97)R/65RF]R(CL-FAE861E[EMAIL PROTECTED]]C871I;VXZ((N)]U=D[ $#0H_/@`` ` end -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Cannot modify header information - headers already sent
The problem does not appear to be database related, it appears to header related. You are trying to send header information after sending regular output. You can't do this: ?php echo 'blah blah'; header(Location: .$out); ? BUT you can do this: ?php $some_text = my_function(); if ($some_text) echo $some_text; else header(Location: .$out); function my_function() { // some code goes here if ($something) return $some_text; return; } // end my_function() ? Try looking at line 29. that's the line where you are trying to output a header after outputing some text. Henning Sittler www.inscriber.com -Original Message- From: Logan McKinley [mailto:[EMAIL PROTECTED] Sent: Friday, June 20, 2003 10:04 AM To: [EMAIL PROTECTED] Subject: [PHP] Cannot modify header information - headers already sent I am having a problem when i use an include file to include database connectivity, however if i cut and paste the code out of the include and place it directly into the .php file it works. I am not sure how to figure this problem out. === error: Warning: Cannot modify header information - headers already sent by (output started at c:\inetpub\wwwroot\PHP\includes\db_conn.inc:1) in c:\inetpub\wwwroot\PHP\login_action.php on line 29 === main page ? session_start(); include(includes\db_conn.inc); if(!isset($HTTP_POST_VARS['login'])) echo end in if 1; else if(empty($HTTP_POST_VARS['login'])) echo end in if 2; else $login = $HTTP_POST_VARS['login']; if(!isset($HTTP_POST_VARS['pw'])) echo end in if 3; else if(empty($HTTP_POST_VARS['pw'])) echo end in if 4; else $pw = $HTTP_POST_VARS['pw']; $strSQL = SELECT * FROM [Login] WHERE [Login] = '.$login.' AND pw = '.$pw.'; $rs = $conn-execute($strSQL); if(!$rs-EOF) { $_SESSION = TRUE; $out = admin_menu.php; } else $out = login.php?err=error; header(Location: .$out); ? === include ? $conn = new COM(ADODB.Connection); $strConn = DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\Inetpub\wwwroot\PHP\data\Registration.mdb; $conn-open($strConn); ? === include Thanks in advance, ~Logan -- 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] Help me compose myself... I'm about to kill Microsoft....
LOL =) Steve M [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Thu, 19 Jun 2003 13:21:07 +0200, Daniel wrote: Okay, I think I'll have to kill myself... I can't believe I am this stupid, but it turned out I was working on a copy of the file, not the real one. D'OH!!! Sorry, guys! Daniel That's no reason not to kill M$... +a Steve -- Steve Mansfield-Devine Aéro-club d'Andaines - LFAO - Bagnoles de l'Orne (Couterne) http://www.webvivant.com/aero-andaines -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Convert KB to MB?
Again I say Ahhh. Are you mixing your bits and bytes then? 1MB =1024KB 1mb=1000kb Although upper and lower case seem to have becoming interchangeable, even though technically they have different meaning. The simple formula is suddenly getting more complicated. On Friday, June 20, 2003, at 04:41 AM, Ian Mantripp wrote: Ahhh, but then marketing gets involved and changes the 1024 to 1000 and ta da, you now have more MegaBytes. 1024 is the right number to use, but don't be surprised if it doesn't match with some numbers you might compare it to. Not necessarily, in data storage 1mb = 1024kb but in data transfer 1mb = 1000kb. -- Brent Baisley Systems Architect Landover Associates, Inc. Search Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Call Servlet Java from PHP
Hi Peolpe! I'm trying to call a Servlet Java from PHP and it doesn't works.. I tried CURL, but no works, I tried put code Java inside PHP, but no works too. Does Somebody can give a light? Thanks Max -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Call Servlet Java from PHP
[snip] I'm trying to call a Servlet Java from PHP and it doesn't works.. I tried CURL, but no works, I tried put code Java inside PHP, but no works too. Does Somebody can give a light? [/snip] Can you show us the code? Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] clearing cache
I am building a two page search feature. The user fills out page one, that takes them to page two. Then from page two they get the results page from the search. If the user hits the back button in their browser I want them to go back to page one, NOT page two. Is the some way I can make page two cache clear, so when the user hits the back up button the page has to be reload from the server at which point I can forward them back to page one. Thanks, Mark. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] open_basedir
At 15:03 20.06.2003, dorgon said: [snip] Would it be possible to limit access to open_basedir without the exception of /tmp, to allow the uploads? [snip] You (or your server admin) should add /tmp to the allowed directories: open_basedir = /tmp:/www/yourvirtualhost This should give you access to both trees. -- O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Migrating pre-4.1 code to a post-4.1 server with regist er_globals on
-Original Message- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED] Sent: Friday, June 20, 2003 2:57 AM To: Johnson, Kirk; [EMAIL PROTECTED] Subject: RE: [PHP] Migrating pre-4.1 code to a post-4.1 server with regist er_globals on -Original Message- From: Johnson, Kirk [mailto:[EMAIL PROTECTED] Sent: 19 June 2003 20:31 To: [EMAIL PROTECTED] Subject: [PHP] Migrating pre-4.1 code to a post-4.1 server with register_globals on A heads-up to those who are moving old code with register_globals on to a server with a newer PHP version and register_globals still on: In the old days, the rule was simple. For a session variable, whatever value was in the global variable at the end of the script was what was saved to the session, and that value was restored on the next page. Under a newer version of PHP, e.g., 4.3.2, this is no longer true in one case. Assume we have a session variable, 'a', that has been assigned some value: $a = 'someValue'; session_register('a'); Then unset($a); will unset the global variable, $a, but NOT the corresponding element in the two session arrays, $HTTP_SESSION_VARS and $_SESSION. Actually, this should only be true for versions 4.1.0 to 4.2.3 -- the manual page at http://uk.php.net/manual/en/ref.session.php (admittedly a *long* way down it and hidden under the Examples heading!) contains this warning: There is a defect in PHP 4.2.3 and earlier. If you register a new session variable by using session_register(), the entry in the global scope and the $_SESSION entry will not reference the same value until the next session_start(). I.e. a modification to the newly registered global variable will not be reflected by the $_SESSION entry. This has been corrected in PHP 4.3. Please let me clarify what I am saying. The manual reference above is correct, *to a point*. In 4.3.2, when you *assign* to any one of the session variable $a, $HTTP_SESSION_VARS['a'], or $_SESSION['a'], you simultaneously *assign* to the other two. For example, $HTTP_SESSION_VARS['a'] = 'iguana'; simultaneously *assigns* 'iguana' to $a and $_SESSION['a']. However, unset($a) does NOT unset $HTTP_SESSION_VARS['a'] or $_SESSION['a'], with two results. One, the value of the session variable, $a, is no longer in sync with $HTTP_SESSION_VARS['a'] and $_SESSION['a']. Two, $a will have the value 'iguana' restored on the next session_start(). This is unexpected behavior and not explained in the manual, AFAIK. Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Synchronize MYSQL
Khuram Noman wrote: Dear Members How to Synchronize two MYSQL databases in php Thanks khuram noman __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com Hello as usual there are a few ways to do tackle this job. My preference is to stop mysql and use rsync to transfer the data , then restart it. Mysql4+ supports clustering also. If you do not stop mysql while u do the sync you risk a corruption of copied data. See man rsync and mysql.com for details of each way. The clustering seems like allot of work to me , it depends how up to date you need to keep Cheers Neil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ErrorDocument doesn't work for PHP scripts
I'm having a problem configuring my web server to redirect 404 errors to a custom error page. It almost looks like the PHP parser is getting hold of the request before apache has checked to see if the file exists. It works fine if you request an unknown page on the server that isn't a PHP script, but fails if it is. Examples: http://www.jeamland.org/blah.htm Displays the custom error page Logs: [Fri Jun 20 14:25:51 2003] [error] [client X.X.X.X] File does not exist: /spool/web/www.jeamland.org/html/blah.htm http://www.jeamland.org/blah.html (or blah.php) Displays a browser generated 404 error page Logs: [client 194.72.110.12] script not found or unable to stat Here's most of my virtualhost configuration, any thoughts appreciated! Thanks, Andy VirtualHost *:80 ServerName www.jeamland.org DocumentRoot /spool/web/www.jeamland.org/html php_value include_path .:/opt/php/lib/php php_value auto_prepend_file none php_value auto_append_file none ErrorDocument 404 /_error.html Directory /spool/web/www.jeamland.org/html AddType application/x-httpd-php .html php_value include_path .:/spool/web/www.jeamland.org/lib php_value auto_prepend_file header.php php_value auto_append_file footer.php /Directory /VirtualHost -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ErrorDocument doesn't work for PHP scripts
On Fri, 20 Jun 2003 15:08:39 GMT, [EMAIL PROTECTED] wrote: Directory /spool/web/www.jeamland.org/html AddType application/x-httpd-php .html php_value include_path .:/spool/web/www.jeamland.org/lib php_value auto_prepend_file header.php php_value auto_append_file footer.php /Directory Just a guess, but... you always have a file in that directory. It looks somehting like this: ?PHP include header.php; ? ...FILE_NOT_FOUND ?PHP include footer.php; ? Try it without the: php_value auto_prepend_file header.php php_value auto_append_file footer.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Uploading/retrieving PDFs to and from Oracle BLOB
Can anyone point me to some sample code for uploading and later retrieving PDFs or other binary files into an Oracle BLOB field? I've been searching for some time and haven't been able to come up with anything. It looks like there's new LOB functions for OCI but they aren't documented at all on the PHP site. Does anyone have a good tutorial or sample code on doing something like this. Thanks in advance for any assistance. Mike Champagne [EMAIL PROTECTED] ** This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction, unless specifically agreed otherwise. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect the views or opinions of Capital Institutional Services, Inc. Capital Institutional Services, Inc. accepts no liability for any errors or omissions arising as a result of transmission. Use of this communication by other than intended recipients is prohibited. ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ErrorDocument doesn't work for PHP scripts
On Fri, 20 Jun 2003 10:15:43 -0500, Wendell Brown wrote: Try it without the: php_value auto_prepend_file header.php php_value auto_append_file footer.php Or check for the existence of the requested file in the header and if not found, send the 302 header with a forward to your custom page. If you don't know what the header is supposed to look like, grab a copy of SamSpade (http://www.samspade.org/ssw/) and use it to view the headers of a page that is forwarding correctly. BTW, it's FREE -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() without subjects and froms
Hi there! I have a weired problem with a 4.12 php version on win2k. When i mail more then one email i often have the problem that the mail reaches their recipient but the subject and from does not work properly, instead this is on top of the email. but strangely sometimes it just works normal. does someone know the reason for such empty subject mails? - Johannes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() without subjects and froms
Hello, This is a reply to an e-mail that you wrote on Fri, 20 Jun 2003 at 16:40, lines prefixed by '' were originally written by you. Hi there! I have a weired problem with a 4.12 php version on win2k. When i mail more then one email i often have the problem that the mail reaches their recipient but the subject and from does not work properly, instead this is on top of the email. but strangely sometimes it just works normal. does someone know the reason for such empty subject mails? - Johannes When you call the mail() function are you using the headers parameter, if so have you accidentally put a double newline in your headers, if so this would cause all of the headers below the double newline to appear in the body. David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Synchronize MYSQL
From Paul Dubois's MySQL book: If you are dumping a database so that you can transfer the database to another server: (on the unix command line or in a shell script) % mysqladmin -h boa.snake.net create samp_db % mysqldump samp_db | mysql -h boa.snake.net samp_db the first command obviously creates the db, the second dumps the data to it. You can also take the update log which records deletes, inserts, updates, etc. as SQL statements, and pipe those to another MySQL server in a similar manner. HTH Jim McNeely Envision Data Custom, intuitive, practical software for your business. [EMAIL PROTECTED] http://www.envisiondata.com On Friday, June 20, 2003, at 07:00 AM, John W. Holmes wrote: khuram noman wrote: Dear Members How to Synchronize two MYSQL databases in php Thanks khuram noman Don't use PHP, just use the replication that's already built into MySQL. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals www.phparch.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] ErrorDocument doesn't work for PHP scripts
On Fri, 20 Jun 2003 10:34:04 -0500, Wendell Brown wrote: php_value auto_prepend_file header.php php_value auto_append_file footer.php Andy, I've tried the following (with my server info, of course) in one of my directories and it works like a champ! It doesn't matter if it's php, htm or html! - .htaccess -- AddType application/x-httpd-php .html php_value auto_prepend_file /spool/web/www.jeamland.org/html/header.php php_value auto_append_file /spool/web/www.jeamland.org/html/footer.php ErrorDocument 404 http://www.jeamland.org/_error.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] clearing cache
On Jun 20, 2003, Mark McCulligh claimed that: |I am building a two page search feature. The user fills out page one, that |takes them to page two. Then from page two they get the results page from |the search. If the user hits the back button in their browser I want them |to go back to page one, NOT page two. | |Is the some way I can make page two cache clear, so when the user hits the |back up button the page has to be reload from the server at which point I |can forward them back to page one. | |Thanks, |Mark. The problem isn't how do I clear the cache for page 2, it's really how do I allow for people to press the back button on the results page and go back to page 1. So, why not create a link a href='page1.php'Change search criteria/a? Or, you can also insert a session variable on the results page. Page 2 will check for the existance of it. If it exists, clear it and bounce the user to page 1. Jeff -- Registered Linux user #304026. lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED Responses to this message should conform to RFC 1855. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: preg_match
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks, I weas reading on the php website under the preg_match functino and people were saying that you had to excape the $ so that iw ould be evaluated right. That's what got me confused. - --- Aaron Axelsen AIM: AAAK2 Email: [EMAIL PROTECTED] Want reliable web hosting at affordable prices? www.modevia.com Web Dev/Design Community/Zine www.developercube.com - -Original Message- From: sven [mailto:[EMAIL PROTECTED] Sent: Friday, June 20, 2003 4:31 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: preg_match preg_matchtry without backslashes. $pattern = /$search/i; if (preg_match ($pattern, $date[$i])) { echo $date[$i]br /; } you don't need the .*? in your regex (either * or ? multiplier) as preg_match searches for any occurance (not from begin ^ or to end $). ciao SVEN Aaron Axelsen [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am trying to code a search, and i need to get my matching expression to work right. The user can enter a value swhich is stored in the vraible $search. What the below loop needs to do, is search each entry of the array for any occurance of the $search string. If i hard code in the string it works, but not when passed as a varaible. Is there something I am missing? Do i need to convert the $search variable to soetmhing? if (preg_match (/.*?\\\$search.*?/i,$date[$i])) { print $date[$i]br; } - --- Aaron Axelsen AIM: AAAK2 Email: [EMAIL PROTECTED] Want reliable web hosting at affordable prices? www.modevia.com Web Dev/Design Community/Zine www.developercube.com -BEGIN PGP SIGNATURE- Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com iQA/AwUBPvKWA7rnDjSLw9ADEQIfGQCgwAO5ikh/RIN5OXoVkC8F4FH/YAoAoJE5 zMxHkRssHbU2Vm4svv2hId8O =DJOi -END PGP SIGNATURE- -BEGIN PGP SIGNATURE- Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com iQA/AwUBPvM3FrrnDjSLw9ADEQLSSQCgp9Fmuoyn1LEkAA2vhcAsbXdsoKMAnjXd VSnoMXvBNIzW4BmJdk7Ki8rt =aWuk -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] strange crypt() problem
On 19-Jun-2003 Huzz wrote: I have this bit of code to crypt user password in user registration as shown below. $cryptpass=crypt($makepass); which generated crypted password like eg 37Q9fppLHc4fQ with php 4.0 And am using the codes below to check for valid login.. // $pass - from login page // $dbpass - from the database $pass=crypt($pass,substr($dbpass,0,2)); } if (strcmp($dbpass,$pass)) { return(0); } Recently i have moved the same file to a new server with php 4.3.1 the problem is the same piece of codes above generates completely differen crypted value eg.$1$RjZHv7qx$h/L9ZUNT48rilHB6fGoMP/ .. hence the login codes above does not work... :( The '$1$' means it's a md5 password. Don't chop-up the encryped passwd. Use the whole string for the seed and let crypt() handle it: $epass=crypt($pass, $dbpass); if (strcmp($dbpass,$epass)) { ... Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mail() without subjects and froms
Hello, This is a reply to an e-mail that you wrote on Fri, 20 Jun 2003 at 17:44, lines prefixed by '' were originally written by you. Hi! I guess i do not make any weired things, the configuration looks like this: mail($mail, $message, From: [EMAIL PROTECTED][EMAIL PROTECTED]); Looks like you are passing the parameters in the wrong order, it should be: mail([EMAIL PROTECTED],subject,message,From: Yourname [EMAIL PROTECTED]); Read this for more info: http://uk.php.net/manual/en/function.mail.php HTH David. -- phpmachine :: The quick and easy to use service providing you with professionally developed PHP scripts :: http://www.phpmachine.com/ Professional Web Development by David Nicholson http://www.djnicholson.com/ QuizSender.com - How well do your friends actually know you? http://www.quizsender.com/ (developed entirely in PHP) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Passing Date/Time
I have a input field in a form that is disabled by javascript but is assigned a value in the code that is the RFC 822 formated date. Why is this field not included in the $HTTP_POST_VARS? Here is the page I am talking about: http://babich.us/xlog/post.php When the page is submitted all other values are passed except the date/time value, why? How do I fix it? Thanks, -- Kyle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ErrorDocument doesn't work for PHP scripts
: ErrorDocument 404 http://www.jeamland.org/_error.html Yep, it does seem to work if I put the whole URL in the ErrorDocument directive rather than just /_error.html ! Unfortunately, that makes the web server snd a redirect which isn't exactly what I want (unless you know of a way to get at the originally requested URL ?) : Or check for the existence of the requested file in the header and if : not found, send the 302 header with a forward to your custom page. I'm not entirely sure that the header is actually being run.. If I move the header out of the way, I don't get any errors about it: Browse to www.jeamland.org with header.php removed [client X.X.X.X] PHP Warning: Unknown(header.php): failed to open stream: No such file or directory in Unknown on line 0 [client X.X.X.X] PHP Warning: (null)(): Failed opening 'header.php' for inclusion (include_path='.:/spool/web/www.jeamland.org/lib') in Unknown on line 0 Now browse to www.jeamland.org/bob.html [client X.X.X.X] script not found or unable to stat What seems to be happening is that apache is seeing the request for a .html file and calling PHP which is returning a set of 404 headers.. For some reason, apache isn't testing for the existence of the file first. I've no idea if this is a PHP or apache problem but hopefully there's a way to work around it Thanks for the very rapid response! Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SQL Sanitation in PHP
I'm using PHP's odbc_ functions to access an Access database, and I'm concerned about security. Do you folks have any recommendations on the best ways to sanitize my SQL queries? I've read plenty about what characters I should strip from SQL queries that use user input, namely , / \ * ( ) $ % ^ @ ~ ´ ? Does PHP require anything more? -- Jeff S. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Cookies- peanut butter or chocolate??
On 19-Jun-2003 Steve Keller wrote: At 6/19/2003 02:10 PM, Sparky Kopetzky wrote: 2. How do you put 2 items that you want to save in the cookie and retrieve?? Smuch 'em together into a single variable with a delimiter you're sure won't show up in either value, something like #@@#, between them. Then, when you read the cookie value in, just explode it by your delimiter. setcookie (twovar, serialize(array($var1, $var2)), ...); ... list($var1, $var2) = unserialize($_COOKIE['twovar']); Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. (53kr33t w0rdz: sql table query) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Odd reactions to Globals On/Off
Anyone know why $HTTP_SESSION_VARS['var'] and $HTTP_SESSION_VARS[vararray][var1] both contain values with register_globals ON, but only $HTTP_SESSION_VARS[vararray][var1] contains values if register_globals is OFF? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] updateable database- please help- only displaying first word from field
Hello. I am making an online database of my wines that I want my friends to be able to edit. The page below displays the wines. I want the fields in text boxes so later they can be easily edited. However, the text boxes only display the first word of the field from the database. For example, in the Name text box, let's say the wine's name is Norton Malbec, it only displays Norton. Does anyone know how to fix this? thanks very much Matt Hedges ?php $db = mysql_connect(host, username, pw) or die (The Database is momentarily down. Sorry for the delay.); mysql_select_db(username,$db); $sql = SELECT * FROM wines WHERE id='1'; $result = mysql_query($sql); echo bufont face=verdanaWines in Database/font/b/u:p\n; echo table border=1 bgcolor=white valign=top cellspacing=2 cellpadding=2\n; while ($row = mysql_fetch_array($result)) { extract($row); echo tr bgcolor=3399cc\n tdinput type=text name=US value=$US/td\n tdinput type=text name=Bodega value=$Bodega/td\n tdinput type=text name=Name value=$Name/td\n tdinput type=text name=Grape value=$Grape/td\n tdinput type=text name=Year value=$Year/td\n tdinput type=text name=Region value=$Region/td\n tdinput type=text name=SubRegion value=$SubRegion/td\n /tr\n; } echo /table\n; ? -- ___ | Matt Hedges | http://hedgesinnovations.com | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] updateable database- please help- only displaying firstword from field
Put quote's around name, I would suspect the space is throwing off the value equals, example: tdinput type=text name=Name value=\$name\/td\n On Fri, 2003-06-20 at 13:31, Matt Hedges wrote: Hello. I am making an online database of my wines that I want my friends to be able to edit. The page below displays the wines. I want the fields in text boxes so later they can be easily edited. However, the text boxes only display the first word of the field from the database. For example, in the Name text box, let's say the wine's name is Norton Malbec, it only displays Norton. Does anyone know how to fix this? thanks very much Matt Hedges ?php $db = mysql_connect(host, username, pw) or die (The Database is momentarily down. Sorry for the delay.); mysql_select_db(username,$db); $sql = SELECT * FROM wines WHERE id='1'; $result = mysql_query($sql); echo bufont face=verdanaWines in Database/font/b/u:p\n; echo table border=1 bgcolor=white valign=top cellspacing=2 cellpadding=2\n; while ($row = mysql_fetch_array($result)) { extract($row); echo tr bgcolor=3399cc\n tdinput type=text name=US value=$US/td\n tdinput type=text name=Bodega value=$Bodega/td\n tdinput type=text name=Name value=$Name/td\n tdinput type=text name=Grape value=$Grape/td\n tdinput type=text name=Year value=$Year/td\n tdinput type=text name=Region value=$Region/td\n tdinput type=text name=SubRegion value=$SubRegion/td\n /tr\n; } echo /table\n; ? -- ___ | Matt Hedges | http://hedgesinnovations.com | -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] updateable database- please help- only displaying first word from field
On 20-Jun-2003 Matt Hedges wrote: snip However, the text boxes only display the first word of the field from the database. Quote your values. snipagain tdinput type=text name=Name value=$Name/td\n tdinput type=text name=Name value=$Name/td Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: updateable database- please help- only displaying first word from field
Thanks! Matt Hedges [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello. I am making an online database of my wines that I want my friends to be able to edit. The page below displays the wines. I want the fields in text boxes so later they can be easily edited. However, the text boxes only display the first word of the field from the database. For example, in the Name text box, let's say the wine's name is Norton Malbec, it only displays Norton. Does anyone know how to fix this? thanks very much Matt Hedges ?php $db = mysql_connect(host, username, pw) or die (The Database is momentarily down. Sorry for the delay.); mysql_select_db(username,$db); $sql = SELECT * FROM wines WHERE id='1'; $result = mysql_query($sql); echo bufont face=verdanaWines in Database/font/b/u:p\n; echo table border=1 bgcolor=white valign=top cellspacing=2 cellpadding=2\n; while ($row = mysql_fetch_array($result)) { extract($row); echo tr bgcolor=3399cc\n tdinput type=text name=US value=$US/td\n tdinput type=text name=Bodega value=$Bodega/td\n tdinput type=text name=Name value=$Name/td\n tdinput type=text name=Grape value=$Grape/td\n tdinput type=text name=Year value=$Year/td\n tdinput type=text name=Region value=$Region/td\n tdinput type=text name=SubRegion value=$SubRegion/td\n /tr\n; } echo /table\n; ? -- ___ | Matt Hedges | http://hedgesinnovations.com | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] updateable database- please help- only displaying firstword from field
Actually just putting a around doesn't work because his original echo uses those, so you have to escape them, like: \ On Fri, 2003-06-20 at 13:39, Don Read wrote: On 20-Jun-2003 Matt Hedges wrote: snip However, the text boxes only display the first word of the field from the database. Quote your values. snipagain tdinput type=text name=Name value=$Name/td\n tdinput type=text name=Name value=$Name/td Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- Adam Voigt ([EMAIL PROTECTED]) Linux/Unix Network Administrator The Cryptocomm Group -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Convert KB to MB?
Ahhh, but then marketing gets involved and changes the 1024 to 1000 and ta da, you now have more MegaBytes. 1024 is the right number to use, but don't be surprised if it doesn't match with some numbers you might compare it to. Not necessarily, in data storage 1mb = 1024kb but in data transfer 1mb = 1000kb. Isn't it the case that in data storage the 'b' means 'bytes', while in data transfer the 'b' means 'bits'? It makes a difference: talking about 1000 bytes is awkward, while 1000 bits is not. - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] clearing cache
I can't just create a link on the last page back to the first page. Because if the user hits the back button on the browser they end up on page 2. Which can't happen. Once you are on the last page the user can't by anyway get back to page 2, unless they start over on page 1. What I am planning on doing is passing the variables using the POST method. Then have a hidden variable pass with the pages. If this hidden variable is missing then redirect the user back to page 1. Thus if I can get page 2 to be cleared from the browsers cache after it has been displayed, if the user came back to this page using the back button the page will be reload from the server because it is not in cache, there for my code will not find the hidden variable and redirect the user back to page 1. I think the theory of this will work ok, but I don't know how to clear a page from the browsers cache after it is displayed. Thanks, Mark. Jeff Harris [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Jun 20, 2003, Mark McCulligh claimed that: |I am building a two page search feature. The user fills out page one, that |takes them to page two. Then from page two they get the results page from |the search. If the user hits the back button in their browser I want them |to go back to page one, NOT page two. | |Is the some way I can make page two cache clear, so when the user hits the |back up button the page has to be reload from the server at which point I |can forward them back to page one. | |Thanks, |Mark. The problem isn't how do I clear the cache for page 2, it's really how do I allow for people to press the back button on the results page and go back to page 1. So, why not create a link a href='page1.php'Change search criteria/a? Or, you can also insert a session variable on the results page. Page 2 will check for the existance of it. If it exists, clear it and bounce the user to page 1. Jeff -- Registered Linux user #304026. lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED Responses to this message should conform to RFC 1855. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: mail() without subjects and froms
Hello, On 06/20/2003 12:39 PM, Johannes Reichardt wrote: I have a weired problem with a 4.12 php version on win2k. When i mail more then one email i often have the problem that the mail reaches their recipient but the subject and from does not work properly, instead this is on top of the email. but strangely sometimes it just works normal. does someone know the reason for such empty subject mails? That looks like of one of those bugs of the mail() function. You may want to try this class that comes with work arounds for those bugs: http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Standalone PHP Client?
I work for a small networking company. We're working on a piece of software that will be run server-side with PHP and MySQL. It allows the user to develop an online store and handles all the complex shopping cart stuff with ease. It is a port of an originally client-side application. We would like to be able to hand out demo discs that do not require the internet to try it out - having a standalone try-out version is a big source of customers. Is there any kind of standalone PHP/MySQL engine that could be reasonably installed from a CD and run on most Windows machines? If there was some method to compile the PHP into a binary or otherwise protect it, it would be really good because our company would not be too excited about handing out the near-complete source to our product on all the demo discs. It would be nice if there was support for non-Windows OSes, but Windows is by far the majority in market share and the other OSes could easily just pop into an HTML document that directs them to our online version. Thanks, Galen P. Zink -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Standalone PHP Client?
Well, having a solid product that people can look at offline has been a major selling point in the past. The customers we cater to appreciate a physical product. We could give them HTML that sends them online, but we could just as easily give them a card with an URL on it and not waste CD media for a 1K shortcut file. I can't confess to completely understand these people who really want a local product for something that must be uploaded to the internet in the end and is dependent on our servers to handle checkout and order processing - it's just a psychological thing, I guess. I'm trying to investigate how hard it would be to get a demo product on a CD that basically goes through an installer process and installs some back end PHP/MySQL stuff so a demo can be run locally. What exactly would be involved in compiling a PHP client with the source myself - are there any existing products along these lines? It probably wouldn't be practical to develop a whole project our selves, but if there was something already out there, we might use it. -Galen On Friday, June 20, 2003, at 11:04 AM, Michael A Smith wrote: Why not have them all do that? HTML that re-directs? Other than taking the source, compiling yourself, or taking the pre-compiled windows binaries and including them, that's the only way. -Michael On Fri, 2003-06-20 at 09:57, Galen P. Zink wrote: I work for a small networking company. We're working on a piece of software that will be run server-side with PHP and MySQL. It allows the user to develop an online store and handles all the complex shopping cart stuff with ease. It is a port of an originally client-side application. We would like to be able to hand out demo discs that do not require the internet to try it out - having a standalone try-out version is a big source of customers. Is there any kind of standalone PHP/MySQL engine that could be reasonably installed from a CD and run on most Windows machines? If there was some method to compile the PHP into a binary or otherwise protect it, it would be really good because our company would not be too excited about handing out the near-complete source to our product on all the demo discs. It would be nice if there was support for non-Windows OSes, but Windows is by far the majority in market share and the other OSes could easily just pop into an HTML document that directs them to our online version. Thanks, Galen P. Zink -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Passing Date/Time
Nothing passes when it is disabled via HTML either. just for shits and giggles, why not manually disable the field without using javascript and see what happens. just add the word disabled to the tag. input disabled type='text' name=date value= From: Kyle Babich [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP] Passing Date/Time Date: Fri, 20 Jun 2003 16:55:29 GMT I have a input field in a form that is disabled by javascript but is assigned a value in the code that is the RFC 822 formated date. Why is this field not included in the $HTTP_POST_VARS? Here is the page I am talking about: http://babich.us/xlog/post.php When the page is submitted all other values are passed except the date/time value, why? How do I fix it? Thanks, -- Kyle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Passing Date/Time
That works, thanks. Try setting that date as a type=hidden value instead. Do a print_r($_POST) at the other end to see what comes up! -Michael On Fri, 2003-06-20 at 08:55, Kyle Babich wrote: I have a input field in a form that is disabled by javascript but is assigned a value in the code that is the RFC 822 formated date. Why is this field not included in the $HTTP_POST_VARS? Here is the page I am talking about: http://babich.us/xlog/post.php When the page is submitted all other values are passed except the date/time value, why? How do I fix it? Thanks, -- Kyle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] updateable database 2nd question
Thanks for the help. I now have the wine information displaying in text boxes (below is the code that displays all the wines). Now I want anyone to be able to change the data in text box/s and hit update and it change that field/s. Would it be something like $sql = UPDATE wines SET Bodega='$Bodega',Name='$Name',Grape='$Grape',Year='$Year',Region='$Region',S ubRegion='$SubRegion' WHERE id='$id'; ? How do I set it up with the submit, etc? thanks so much for the help Matt ?php $db = mysql_connect(host, username, pw) or die (The Database is momentarily down. Sorry for the delay.); mysql_select_db(username,$db); $sql = SELECT * FROM wines ORDER BY Bodega, Name; $result = mysql_query($sql); echo bufont face=verdanaWines in Database/font/b/u:p\n; echo table border=1 bgcolor=white valign=top cellspacing=2 cellpadding=2\n; while ($row = mysql_fetch_array($result)) { extract($row); echo tr bgcolor=3399cc\n tdinput type=text name=Bodega value=\$Bodega\/td\n tdinput type=text name=Name value=\$Name\/td\n tdinput type=text name=Grape value=\$Grape\/td\n tdinput type=text name=Year value=$Year/td\n tdinput type=text name=Region value=$Region/td\n tdinput type=text name=SubRegion value=\$SubRegion\/td\n tdinput type=text name=id value=$id/td\n /tr\n; } echo /table\n; ? -- ___ | Matt Hedges | http://hedgesinnovations.com | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Standalone PHP Client?
On Fri, 2003-06-20 at 13:57, Galen P. Zink wrote: I work for a small networking company. We're working on a piece of software that will be run server-side with PHP and MySQL. It allows the user to develop an online store and handles all the complex shopping cart stuff with ease. It is a port of an originally client-side application. We would like to be able to hand out demo discs that do not require the internet to try it out - having a standalone try-out version is a big source of customers. Is there any kind of standalone PHP/MySQL engine that could be reasonably installed from a CD and run on most Windows machines? If there was some method to compile the PHP into a binary or otherwise protect it, it would be really good because our company would not be too excited about handing out the near-complete source to our product on all the demo discs. It would be nice if there was support for non-Windows OSes, but Windows is by far the majority in market share and the other OSes could easily just pop into an HTML document that directs them to our online version. How about demoing the client app and saying there is also an on-line version...?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Standalone PHP Client?
[snip] Is there any kind of standalone PHP/MySQL engine that could be reasonably installed from a CD and run on most Windows machines? [/snip] Check out the PHP-GTK http://gtk.php.net/ . I am not sure if there is a 'portable' data source to go with it, but it sounds like what you'd want Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Standalone PHP Client?
On Friday, June 20, 2003, at 11:42 AM, Brian V Bonini wrote: On Fri, 2003-06-20 at 13:57, Galen P. Zink wrote: I work for a small networking company. We're working on a piece of software that will be run server-side with PHP and MySQL. It allows the user to develop an online store and handles all the complex shopping cart stuff with ease. It is a port of an originally client-side application. We would like to be able to hand out demo discs that do not require the internet to try it out - having a standalone try-out version is a big source of customers. Is there any kind of standalone PHP/MySQL engine that could be reasonably installed from a CD and run on most Windows machines? If there was some method to compile the PHP into a binary or otherwise protect it, it would be really good because our company would not be too excited about handing out the near-complete source to our product on all the demo discs. It would be nice if there was support for non-Windows OSes, but Windows is by far the majority in market share and the other OSes could easily just pop into an HTML document that directs them to our online version. How about demoing the client app and saying there is also an on-line version...?? Well, I wish that it was that easy, but although there are a lot of loyal users to our client version, it has *major* flaws. We're basically taking the existing functionality and wrapping it into a similar but correct GUI and fixing so many bugs and changing the interface at least enough to confuse the user. Also, we plan to eliminate the client side version for new users once the server side version is up. So basically, we can't. -Galen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Search Engine
Hi, I'm trying to find a script (PHP,Perl, Whatever) that will search through a bunch text files, ignore certain keywords, and then generate a text file with the line that each one is on, and what the words were. Thanks, -Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] clearing cache
- Original Message - From: Mark McCulligh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 20, 2003 11:44 AM Subject: Re: [PHP] clearing cache I can't just create a link on the last page back to the first page. Because if the user hits the back button on the browser they end up on page 2. Which can't happen. Once you are on the last page the user can't by anyway get back to page 2, unless they start over on page 1. What I am planning on doing is passing the variables using the POST method. Then have a hidden variable pass with the pages. If this hidden variable is missing then redirect the user back to page 1. Thus if I can get page 2 to be cleared from the browsers cache after it has been displayed, if the user came back to this page using the back button the page will be reload from the server because it is not in cache, there for my code will not find the hidden variable and redirect the user back to page 1. I think the theory of this will work ok, but I don't know how to clear a page from the browsers cache after it is displayed. Thanks, Mark. [SNIP] Mark, this is kind of a lame hack but give it a try... /** PAGE A (first form) **/ ? session_start(); if (isset($_POST['submit'])) { header(Location: test3.php); exit; } ? /** PAGE B (second form) **/ ? session_start(); if ($_SESSION['startover']) { $_SESSION['startover'] = false; header(Location: test2.php); exit; } if (isset($_POST['submit'])) { header(Location: test4.php); exit; } ? /** PAGE C (results page) **/ ? session_start(); $_SESSION['startover'] = true; ? The idea is to keep a startover variable in the session. The variable is set when you reach Page C (the results page). When the user hits the back button the variable is tested on Page B for true or false. If it's true header() redirect back to Page A. Otherwise it prints and/or validates the form on Page B. Why header() redirect between each page? Becuase it overwrites the post data allowing you to use your back button without a repost. This results in a much cleaner more controlable user interface. If you need to pass form data between forms then simply store the post data in the Session and extract it on the next page. If I'm right, what you're going to see in the browser's back button history using this method is a single instance of PAGE A repeated for each cycle. Good luck with this. HTH, Kevin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Newman] Passing an image through a php file.
Ahh, the Docs don't tell you that. They are a little weard wehen it comes to that - Original Message - From: Lars Torben Wilson [EMAIL PROTECTED] To: Mark Tehara [EMAIL PROTECTED] Cc: PHP [EMAIL PROTECTED] Sent: Friday, June 20, 2003 10:53 PM Subject: Re: [PHP] [Newman] Passing an image through a php file. On Thu, 2003-06-19 at 20:19, Mark Tehara wrote: ?php $myimage=..//..//site//images//2.jpg; header(Content-type: image/jpeg); fopen ($myimage, r); readfile($myimage) ; fclose($myimage); ? This seemed to do the trick for me. Thank you. / Mark Even better, you don't even need the fopen() and fclose() calls; readfile() is doing this with just the filename. http://www.php.net/readfile -- Torben Wilson [EMAIL PROTECTED]+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.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] updateable database 2nd question
On 20-Jun-2003 Matt Hedges wrote: Thanks for the help. I now have the wine information displaying in text boxes (below is the code that displays all the wines). Now I want anyone to be able to change the data in text box/s and hit update and it change that field/s. Would it be something like $sql = UPDATE wines SET Bodega='$Bodega',Name='$Name',Grape='$Grape',Year='$Year',Region='$Region' ,S ubRegion='$SubRegion' WHERE id='$id'; ? How do I set it up with the submit, etc? //refetch the old row ... $qry=SELECT * FROM tbl WHERE id=' .$_POST['id'] .'; $r=mysql_query($qry); $row=mysql_fetch_array($r); // build list of just the changes unset($chgflds); foreach($row as $fld = $val) { if (isset($_POST[$fld]) ($_POST[$fld] != $val)) { $chgflds[] = $fld=' .$_POST[$fld] .'; } } // doit. $update='UPDATE tbl SET ' .implode(', ', $chgflds) .WHERE id=' .$_POST['id'] .'; echo '!--Debug :', $update, '--'; mysql_query($update); ... Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Newman] Passing an image through a php file.
On Fri, 2003-06-20 at 12:07, Mark Tehara wrote: Ahh, the Docs don't tell you that. They are a little weard wehen it comes to that How so? int readfile ( string filename [, bool use_include_path [, resource context]]) It does say 'filename', not 'resource'. Seems pretty unequivocal. However, if there is something wrong with the presentation or if you have suggestions for improvements, I can take a look at it for you. -- Torben Wilson [EMAIL PROTECTED]+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Problem regarding updating through text boxes
Please take a look at http://hedges.org/code/wine.php - You'll see what I can't figure out how to do. thanks, Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Problem regarding updating through text boxes
Put the code in a Form tag, modified thevalues, and put a submit button in the Form, so, in the php page you get it the values by name, you can modified with 'update' mysql sentence. Matt Hedges [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] Please take a look at http://hedges.org/code/wine.php - You'll see what I can't figure out how to do. thanks, Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Problem regarding updating through text boxes
Hum,, i don't see the database conecction :P. It's necesary modified the fileds on the fly ?, one by one it's more easy to do... Esteban Fernandez [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] Put the code in a Form tag, modified thevalues, and put a submit button in the Form, so, in the php page you get it the values by name, you can modified with 'update' mysql sentence. Matt Hedges [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] Please take a look at http://hedges.org/code/wine.php - You'll see what I can't figure out how to do. thanks, Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error in php after uprading
[EMAIL PROTECTED] (John W. Holmes) wrote in news:[EMAIL PROTECTED]: Your query failed. Add some error reporting around mssql_query() to find out why. Hi, I recompiled an older version of php with freetds 0.60 instead of 0.61 and everything start to work again. Maybe there is something different in the way the new version of freetds does things. :) Bye! -- *** s2r - public key: (http://leeloo.mine.nu/s2r-gmx.sig) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Chomp, Chomp, Chomp
Does anyone have a piece of code that emulates a Perl 'Chomp' function? I need one. Thanks in advance!! Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net
Re: [PHP] Chomp, Chomp, Chomp
I looked at the documentation on rtrim. It trims ALL whitespace characters from the end, not just the '\n'. I need only the '\n' trimmed. Sparky - Original Message - From: Lars Torben Wilson [EMAIL PROTECTED] To: Sparky Kopetzky [EMAIL PROTECTED] Cc: PHP General [EMAIL PROTECTED] Sent: Friday, June 20, 2003 16:47 Subject: Re: [PHP] Chomp, Chomp, Chomp On Fri, 2003-06-20 at 15:37, Sparky Kopetzky wrote: Does anyone have a piece of code that emulates a Perl 'Chomp' function? I need one. Thanks in advance!! Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net This should do it for you: http://www.php.net/rtrim Good luck! Torben -- Torben Wilson [EMAIL PROTECTED]+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Chomp, Chomp, Chomp
On Fri, 2003-06-20 at 15:37, Sparky Kopetzky wrote: Does anyone have a piece of code that emulates a Perl 'Chomp' function? I need one. Thanks in advance!! Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net This should do it for you: http://www.php.net/rtrim Good luck! Torben -- Torben Wilson [EMAIL PROTECTED]+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: PHP Problem regarding updating through text boxes
hmm name the text fields the field of the database then put a [] in front of them to make them an array then then try maybe foreach ($_POST['id'] as $key=$value) { //sql statement update table set us=$_POST['us'][$key] where id=$_POST['id'][$key]; } -Original Message- From: Esteban Fernandez [mailto:[EMAIL PROTECTED] Sent: Saturday, June 21, 2003 6:24 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: PHP Problem regarding updating through text boxes Hum,, i don't see the database conecction :P. It's necesary modified the fileds on the fly ?, one by one it's more easy to do... Esteban Fernandez [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] Put the code in a Form tag, modified thevalues, and put a submit button in the Form, so, in the php page you get it the values by name, you can modified with 'update' mysql sentence. Matt Hedges [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] Please take a look at http://hedges.org/code/wine.php - You'll see what I can't figure out how to do. thanks, Matt -- 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] Chomp, Chomp, Chomp
On Fri, 2003-06-20 at 15:47, Sparky Kopetzky wrote: I looked at the documentation on rtrim. It trims ALL whitespace characters from the end, not just the '\n'. I need only the '\n' trimmed. Look again, but check out the second argument: ?php error_reporting(E_ALL); ini_set('display_errors', true); $foo = bar \n; $bar = rtrim($foo); $baz = rtrim($foo, \n); echo \$foo == '$foo'; \$bar == '$bar'; \$baz == '$baz'\n; ? Good luck, Torben Sparky - Original Message - From: Lars Torben Wilson [EMAIL PROTECTED] To: Sparky Kopetzky [EMAIL PROTECTED] Cc: PHP General [EMAIL PROTECTED] Sent: Friday, June 20, 2003 16:47 Subject: Re: [PHP] Chomp, Chomp, Chomp On Fri, 2003-06-20 at 15:37, Sparky Kopetzky wrote: Does anyone have a piece of code that emulates a Perl 'Chomp' function? I need one. Thanks in advance!! Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net This should do it for you: http://www.php.net/rtrim Good luck! Torben -- Torben Wilson [EMAIL PROTECTED]+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- Torben Wilson [EMAIL PROTECTED]+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Chomp, Chomp, Chomp
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The php chop function is suppose to act like the perl chomp. - --- Aaron Axelsen AIM: AAAK2 Email: [EMAIL PROTECTED] Want reliable web hosting at affordable prices? www.modevia.com Web Dev/Design Community/Zine www.developercube.com - -Original Message- From: Lars Torben Wilson [mailto:[EMAIL PROTECTED] Sent: Friday, June 20, 2003 6:00 PM To: Sparky Kopetzky Cc: PHP General Subject: Re: [PHP] Chomp, Chomp, Chomp On Fri, 2003-06-20 at 15:47, Sparky Kopetzky wrote: I looked at the documentation on rtrim. It trims ALL whitespace characters from the end, not just the '\n'. I need only the '\n' trimmed. Look again, but check out the second argument: ?php error_reporting(E_ALL); ini_set('display_errors', true); $foo = bar \n; $bar = rtrim($foo); $baz = rtrim($foo, \n); echo \$foo == '$foo'; \$bar == '$bar'; \$baz == '$baz'\n; ? Good luck, Torben Sparky - Original Message - From: Lars Torben Wilson [EMAIL PROTECTED] To: Sparky Kopetzky [EMAIL PROTECTED] Cc: PHP General [EMAIL PROTECTED] Sent: Friday, June 20, 2003 16:47 Subject: Re: [PHP] Chomp, Chomp, Chomp On Fri, 2003-06-20 at 15:37, Sparky Kopetzky wrote: Does anyone have a piece of code that emulates a Perl 'Chomp' function? I need one. Thanks in advance!! Robin E. Kopetzky Black Mesa Computers/Internet Services www.blackmesa-isp.net This should do it for you: http://www.php.net/rtrim Good luck! Torben -- Torben Wilson [EMAIL PROTECTED] +1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - - -- Torben Wilson [EMAIL PROTECTED] +1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -BEGIN PGP SIGNATURE- Version: PGPfreeware 7.0.3 for non-commercial use http://www.pgp.com iQA/AwUBPvOV0brnDjSLw9ADEQLbXACeKGsGbjjW3pGWT91Jd3cQP48wq+oAn1Ev gb2AnVvs5zgRdejT13vmNoJ2 =gg1T -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Chomp, Chomp, Chomp
On Fri, 2003-06-20 at 16:16, Aaron Axelsen wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The php chop function is suppose to act like the perl chomp. No, chop() is an alias for rtrim(), and is identical in every way (save for its name, of course...) http://www.php.net/chop Cheers, Torben -- Torben Wilson [EMAIL PROTECTED]+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Not incrementing?
I have a file, current.txt, that at the start has only the digit 1 in it. Here is my code: $current = readfile('setupData/current.txt'); foreach ($HTTP_POST_VARS as $index = $value) { $index = $HTTP_POST_VARS['$index']; } $info = fopen(postInfo/{$current}-{$dateFile}.txt, 'w'); fwrite($info, $author\n$email\n$dateActual); fclose($info); $entry = fopen(postEntries/{$current}-{$dateFile}.txt, 'w'); fwrite($entry, $body); fclose($entry); $currPost = fopen('setupData/current.txt', 'w'); fwrite($currPost, $current + 1); echo $current; fclose($currPost); Two files are created in seperate folders, each with the same name, the current number in current.txt, a dash, then a series of numbers and letters that represent the current date and time exactly. That happens correctly, but then the number inside of current.txt is supposed to increment. Every pair created should be the next number, a dash, then the date and time. It will increment once to 2, but all created files are 1- and nothing else happens no matter how much I do it. What went wront? Thanks, -- Kyle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Not incrementing?
On Fri, 2003-06-20 at 17:07, Kyle Babich wrote: I have a file, current.txt, that at the start has only the digit 1 in it. Here is my code: Hi there, $current = readfile('setupData/current.txt'); This will cause $current to contain the number of bytes read from the file, not the contents of the file. http://www.php.net/readfile Instead, use fopen()/fread(); or file()/implode(); or if you have PHP 4.3.x or newer, use file_get_contents(). http://www.php.net/file_get_contents http://www.php.net/fopen http://www.php.net/fread http://www.php.net/file http://www.php.net/implode foreach ($HTTP_POST_VARS as $index = $value) { $index = $HTTP_POST_VARS['$index']; } This will do two things you probably don't want: first, it will repeatedly assign values to $index, overwriting it on each iteration; and, it will always use the same value to do so, since $HTTP_POST_VARS['$index'] has the single-quotes, which prevents PHP from interpreting the contents of $index--so it's literally using the string value '$index' instead of the value of the $index variable. You probably want variable variables: $$index = $HTTP_POST_VARS[$index]; ...although even easier would be: $$index = $value; http://www.php.net/manual/en/language.variables.variable.php [snip] Thanks, -- Kyle Hope this helps, Torben -- Torben Wilson [EMAIL PROTECTED]+1.604.709.0506 http://www.thebuttlesschaps.com http://www.inflatableeye.com http://www.hybrid17.com http://www.themainonmain.com - Boycott Starbucks! http://www.haidabuckscafe.com - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Seating chart registration system?
I am writing a php event registration system for lanparties and I believe I have everything written that I need except for a seating selection chart. I dont want to reinvent the wheel if I dont have to and am curious to know if something like this has already been written as public source... If not, I possibly may pay a reasonable fee for one or for someone to write it for me...Here is what I need and maybe you could provide a direction for me to do research or some logic as to how it can be done... As a person goes through the event registration system, they will come to a page that displays 8 rows of 30 seats (240 seats total)...but in the future I would like to have admin capability to increase or decrease this amount. When they get to that page it should display all of the open or available seats in one color and all of the sold or reserved seats in a different color. The registrant will then select an open seat they wish to buy or reserve and then take them to the next step in registration where they enter their attendee information and pay to attend via paypal or mollyguard. Then when the next person decides to register, when they get to that page, one less seat will be available. I would like to have as much control as possible and I do know a minor bit of php and mysql. Any help or guidance is appreciated. Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] stream_wrapper_register
Hello all, I do not know if this is the right place to post a question about this. I am trying to figure out what all I can do using stream_wrapper_register functions. I have looked over http://us2.php.net/manual/en/function.stream-wrapper-register.php and I am trying to write a class that will allow everything that you can do to a system file to be done with content in a database. I think this is the proper function to use for that but would like a little input first. The link above states stream_wrapper_register() allows you to implement your own protocol handlers and streams for use with all the other filesystem functions (such as fopen(), fread() etc.). My question is will this work all of the PHP functions from http://us2.php.net/manual/en/ref.filesystem.php: example: filesize -- Gets file size touch -- Sets access and modification time of file unlink -- Deletes a file and too many more to list first few lines of code sample at http://us2.php.net/manual/en/ref.filesystem.php: class VariableStream { var $position; var $varname; function stream_open($path, $mode, $options, $opened_path) { $url = parse_url($path); $this-varname = $url[host]; $this-position = 0; return true; } If so would they need to be wrote like this? function stream_filesize($path, $mode, $options, $opened_path) { // put sql here return true; } function stream_touch($path, $mode, $options, $opened_path) { // put sql here return true; } function stream_unlink($path, $mode, $options, $opened_path) { // put sql here return true; } and so forth Thanks, Larry E. Masters aka PhpNut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Email Valadation
Hello, On 06/17/2003 06:42 AM, Philip J. Newman wrote: How would i valadate an email string to see if it has invalid charactors? You may want to try this class: http://www.phpclasses.org/emailvalidation -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Password generator
Hello, On 06/17/2003 06:45 AM, Davy Obdam wrote: I have to make a password generator, but i have a little problem. You may also want to try any of these classes: http://www.phpclasses.org/password%20generation -- Regards, Manuel Lemos Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php