[PHP] Control Point of Access for certain pages.
On a site that uses a popup window to display images, I want to prevent people from hotlinking directly to the popup page because it just looks like crap if not sized properly with controls removed. But I'm not sure how I can prevent someone from doing this. It appears the HTTP_REFERER isn't always a reliable way to see if they are entering the page from another page on your own site. And I'm not using sessions for this site (it's not necessary). So, I'm a little stuck on how I can allow access to a page only from certain other pages. Has anyone done this with PHP? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP]-How to do Mapping ?
On Friday 01 November 2002 18:57, N.Paramaguru wrote: > Hi, > > I'm currently developing clubs and groups...the individual group pages are > displayed based on the group id like login.php?id=1...etc,during Creation > of the group the user is allowed to enter their subdomain and to select a > domain from the available list and all this details are stored in mysql > database. The main requirement is that whenever the user types > domain.subdomain.com they must be able to go to the home page of the group It is not possible to have something like domain.subdomain.com, but you can have subdomain.domain.com. There are two things you need: 1) Setup your DNS records properly 2) If you're using Apache, read up on the Rewrite features. Both are OT and beyond the scope of this list. > which will be in a separate server...i.e it must be able to map it to the > page login.php?id="required Id" for the particular group... > > How can this be doneis there any way to do this in PHP... Nothing to do with PHP. > I still have a doubt whether its related to PHP :-) Try the apache mailing list. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* If you don't care where you are, then you ain't lost. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with 4.2.3?
On Saturday 02 November 2002 06:16, Adam Humphrey wrote: > I just upgraded my PHP from 4.2.2 to 4.2.3 and now I have a problem. Right > now I have some HTML with included PHP. When the client opens a page with > PHP and HTML it used to (under 4.2.2) display all the HTML before the PHP > and then process the PHP and finally (when processing completed) finish the > rest of the HTML. > > This allowed my to do some DHTML to let the user know that the PHP was > processing. Now with the new version of PHP (4.2.3) when I hit these pages > it will process the PHP before it sends any HTML to the client. > > This is really frustrating. Is there some setting in php.ini that I can > modify to allow the browser to get the HTML before the PHP code? Or any > other way to get the old behavior? Try disabling output buffering (php.ini). -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* You can fool some of the people some of the time, and some of the people all of the time, and that is sufficient. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Installation prob: I can't see libphp4.so
On Saturday 02 November 2002 14:10, Daniele Baroncelli wrote: > I am not sure if I have been clear. > > I can't actually find out where the libphp4.so has been placed. Assuming you have done 'make', 'make install', use 'find / -name libphp4.so' to find where it is. Or just do 'make install' again and watch carefully to see where libphp4.so is copied to. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* It is better to live rich than to die rich. -- Samuel Johnson */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Installation prob: I can't see libphp4.so
I am not sure if I have been clear. I can't actually find out where the libphp4.so has been placed. Daniele "Daniele Baroncelli" <[EMAIL PROTECTED]> wrote in message news:20021102060742.99705.qmail@;pb1.pair.com... > Dear all, > > I have been trying to install php 4.2.3 on my virtual server, where Apache > 1.3.27 is installed > > The installation procedure seems to be right, but I can't find the > "libphp4.so" file > > My configuration parameters where: > ./configure --enable-inline-optimization --with-apxs=/usr/local/apache/1.3/b > in/apxs --with-config-file-path=/usr/home/myaccount/usr/local --disable-debu > g --enable-memory-limit --enable-sigchild --without-pear --with-regex=system > --enable-mbstring --enable-mbstr-enc-trans --with-iconv=/usr/home/myaccou nt > /usr/local --with-gdbm=/usr/local > '--enable-sockets --enable-versioning --with-ttf=/usr/local --enable-ftp --w > ith-gd=/usr/local --with-zlib --enable-gd-native-ttf --wuth-xml --enable-xsl > t --with-xslt-sablot --with-mysql > > On the systems it was previously installed php version 4.0.6 > > > Cheers > > Daniele > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Installation prob: I can't see libphp4.so
Dear all, I have been trying to install php 4.2.3 on my virtual server, where Apache 1.3.27 is installed The installation procedure seems to be right, but I can't find the "libphp4.so" file My configuration parameters where: ./configure --enable-inline-optimization --with-apxs=/usr/local/apache/1.3/b in/apxs --with-config-file-path=/usr/home/myaccount/usr/local --disable-debu g --enable-memory-limit --enable-sigchild --without-pear --with-regex=system --enable-mbstring --enable-mbstr-enc-trans --with-iconv=/usr/home/myaccount /usr/local --with-gdbm=/usr/local '--enable-sockets --enable-versioning --with-ttf=/usr/local --enable-ftp --w ith-gd=/usr/local --with-zlib --enable-gd-native-ttf --wuth-xml --enable-xsl t --with-xslt-sablot --with-mysql On the systems it was previously installed php version 4.0.6 Cheers Daniele -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: confirm subscribe to php-general@lists.php.net
[EMAIL PROTECTED] --- E-Mail: Bryan Cassidy <[EMAIL PROTECTED]> Operating System: FreeBSD 4.6.2 Gaim: bsdsys Yahoo Messenger: bsdsys Please do not simply Reply-To: Bryan Cassidy <[EMAIL PROTECTED]> It is OK to Cc: me as long as you send the Reply back To: the original mailing lists. I have put alot of time in setting up filters so please don't simply reply to me unless I tell you to or send you one directly. _ | ___| __ ___ ___| __ ) ___|| _ \ | |_ | '__/ _ \/ _ \ _ \___ \| | | | | _|| | | __/ __/ |_) |__) | |_| | |_| |_| \___|\___|//|/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: confirm subscribe to php-general@lists.php.net
On 2 Nov 2002 03:26:36 - [EMAIL PROTECTED] wrote: > Hi! This is the ezmlm program. I'm managing the > [EMAIL PROTECTED] mailing list. > > I'm working for my owner, who can be reached > at [EMAIL PROTECTED] > > To confirm that you would like > >[EMAIL PROTECTED] > > added to the php-general mailing list, please send > an empty reply to this address: > > >[EMAIL PROTECTED] > > Usually, this happens when you just hit the "reply" button. > If this does not work, simply copy the address and paste it into > the "To:" field of a new message. > > or click here: > >mailto:php-general-sc.1036207596.kehogdkeclpnffkcijba-bryanc2000=insightbb.com@;lists.php.net > > This confirmation serves two purposes. First, it verifies that I am able > to get mail through to you. Second, it protects you in case someone > forges a subscription request in your name. > > Some mail programs are broken and cannot handle long addresses. If you > cannot reply to this request, instead send a message to > <[EMAIL PROTECTED]> and put the > entire address listed above into the "Subject:" line. > > > --- Administrative commands for the php-general list --- > > I can handle administrative requests automatically. Please > do not send them to the list address! Instead, send > your message to the correct command address: > > For help and a description of available commands, send a message to: ><[EMAIL PROTECTED]> > > To subscribe to the list, send a message to: ><[EMAIL PROTECTED]> > > To remove your address from the list, just send a message to > the address in the ``List-Unsubscribe'' header of any list > message. If you haven't changed addresses since subscribing, > you can also send a message to: ><[EMAIL PROTECTED]> > > or for the digest to: ><[EMAIL PROTECTED]> > > For addition or removal of addresses, I'll send a confirmation > message to that address. When you receive it, simply reply to it > to complete the transaction. > > If you need to get in touch with the human owner of this list, > please send a message to: > > <[EMAIL PROTECTED]> > > Please include a FORWARDED list message with ALL HEADERS intact > to make it easier to help you. > > --- Enclosed is a copy of the request I received. > > Return-Path: <[EMAIL PROTECTED]> > Received: (qmail 26001 invoked from network); 2 Nov 2002 03:26:36 - > Received: from unknown (HELO php.net) (64.246.30.37) > by pb1.pair.com with SMTP; 2 Nov 2002 03:26:36 - > Received: (qmail 19905 invoked by uid 99); 2 Nov 2002 03:23:02 - > Date: 2 Nov 2002 03:23:02 - > Message-ID: <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Website Subscription > From: [EMAIL PROTECTED] > > > This was a request generated from the form at http://php.net/mailing-lists.php by >12.222.162.255. --- E-Mail: Bryan Cassidy <[EMAIL PROTECTED]> Operating System: FreeBSD 4.6.2 Gaim: bsdsys Yahoo Messenger: bsdsys Please do not simply Reply-To: Bryan Cassidy <[EMAIL PROTECTED]> It is OK to Cc: me as long as you send the Reply back To: the original mailing lists. I have put alot of time in setting up filters so please don't simply reply to me unless I tell you to or send you one directly. _ | ___| __ ___ ___| __ ) ___|| _ \ | |_ | '__/ _ \/ _ \ _ \___ \| | | | | _|| | | __/ __/ |_) |__) | |_| | |_| |_| \___|\___|//|/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session Management
I'm looking for some well thought out advice on session management. I've created a class for handling session management across an unlimited number of domains (without using cookies) however it has some inherent problems. In order to differentiate between users, it is using the IP Address. I realize this is completely inefficient, and I was hoping that someone could give me some pointers on how exactly PHP handles session management from the backend. When not using cookies, PHP propagates the Session ID in the URL and a hidden variable in forms. However, is this even safe? Or is this completely blind faith that the Session belongs to that person? Basically, I want to know if PHP *knows for sure* the right user is using the right session. In other words, can it detect hijacked sessions? My guess is a resounding no. I'm wondering if there is some way to determine the real IP Address of a user, even if that user is behind a proxy farm, etc., and if this is, in fact, what PHP does. If not, I'm stuck with figuring out how best to accomplish my goals using cookies. The problem: a cookie can only bet set for a single domain; therefore, the session will not be carried with the person if they browse to another domain which also uses the same eNetwizard Content Management Server. A possibility is to always propagate a State Id with the URL and forms, however even this would not prevent the exact same problem: Is this blind faith? If you can point me to any excellent resources on the state of session management on the web and how to do this securely, please let me know. -Samuel | http://enetwizard.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP]-How to do Mapping ?
Hi, I'm currently developing clubs and groups...the individual group pages are displayed based on the group id like login.php?id=1...etc,during Creation of the group the user is allowed to enter their subdomain and to select a domain from the available list and all this details are stored in mysql database. The main requirement is that whenever the user types domain.subdomain.com they must be able to go to the home page of the group which will be in a separate server...i.e it must be able to map it to the page login.php?id="required Id" for the particular group... How can this be doneis there any way to do this in PHP... I still have a doubt whether its related to PHP :-) Thanks in advance Param
Re: [PHP] Security - Maybe a silly question
SED wrote: When I use sessions in PHP or just plain login/password in $_POST, can 3rd parties or hackers monitor the transmission, between me and user, and somehow decode the transmission and use the variables to login other time or overtake the current session? If so, how likely is for someone to manage it (get the username/password)? I've read some of the responses to your question, and I think I can possibly help to clarify some things ... To answer your question directly, yes it is possible for people (hacker != computer criminal, by the way) to observe the transmission, but it is not very likely. Also, if someone successfully observes a user's HTTP request, they will have access to the user's data whether it is being sent via get, post, or cookies. There is no "decoding" necessary. However, though this is not too terribly difficult to accomplish, it is a lot harder than some people will lead you to believe. If you are worried about the security of your users, here are some things to consider in that regard: 1. For anyone to observe a specific transaction, they must have access to a machine that is between you (the Web server) and them (the Web client). For someone to reliably do this, they would need to have access to a machine along the path that is either very near the Web client (for targetting a specific user) or very near your Web site (for targetting a specific site, yours). Anything in between would likely have too much traffic. Needless to say, this scenario is unlikely. An example of such a thing would be perhaps if a curious systems administrator were observing outgoing traffic on a gateway that served a small office. If someone who worked in that office interacted with your Web site, it would be quite easy for the administrator to observe the transaction. 2. There are much easier ways to impersonate a user. PHP, by default, uses a single cookie to identify the Web client. Imagine if someone were to steal a cookie belonging to one of your users and then visit your site presenting the same cookie. You would mistake them for your user, right? Most attacks focus on the application itself, just like this example, because this is the usually the easiest thing to do. All versions of Internet Explorer from 4.0 to 6.0 have cookie vulnerabilities that allow any Web site to view any other Web site's cookies. So, if some of your users are IE users (very likely) and have not patched their browsers (also very likely), that cookie you use to identify them is in danger. In general, security is a balance. There is always going to be a risk. The harder you make it for the bad guys, the less risk you have, but also (usually) the less accomodating you are to your legitimate users - shorter timeouts, requiring frequent reauthentication, extra data validation, etc. The easier it is for the bad guys, the higher the risk, but the more accomodating you can be to your users - longer timeouts, automatic features, storing payment information for easier checkouts, etc. The appropriate balance here is really best decided by you, but this can be difficult when you first get started. Also, as others have said, SSL is the only way to reliably protect the communication from observation (it also verifies the identify of you and the user, which can be crucial), but if this is not an option, you can provide some decent security by observing the golden rule of Web development: NTDFTC - Never trust data from the client. This doesn't mean that you can't believe anything; it just means that your logic should be suspicious of everything you receive from the client (in PHP, this means $_REQUEST[] or all get, post, and cookie data) and validate it. Unfortunately, many people do not follow this rule (or even know about it), and this lead to many of the perceived security problems of register_globals. Anyway, let me know if you have any other questions or would like to see some specific examples. Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Get shipping problem continued!
Hi, Friday, November 1, 2002, 11:11:52 PM, you wrote: SJ> Sorry to keep on at you guys but this is really getting to me now! SJ> I want to pull a shipping quantity (the very last record in the Db) into SJ> a page and am still having problems. Tried looping through the records SJ> and I can't seem to get it to return anything: SJ> function get_shipping($shippingvar) SJ> { SJ> $conn = db_connect(); SJ> $query = mysql_query("SELECT MAX(receipt_id) from receipts"); SJ> $myrow = mysql_fetch_row($query); SJ> $shippingvar = $myrow["shipping"]; SJ> return $shippingvar; SJ> } SJ> Surely it can't be much more complicated than that? SJ> Help please. Smoked 10 fags already! You need something like this (untested :) function get_shipping($shippingvar){ $shippingvar = 0; $conn = db_connect(); if(!$query = mysql_query("SELECT MAX(receipt_id) from receipts");){ echo 'Error: '.mysql_error().''; }else{ $shippingvar = mysql_result($query,0,0); } return $shippingvar; } -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ftp_rawlist problems
I'm writing a script which crawls through ftp servers, retrieving file listings and saving them to a DB so they may be searched. What happens, is the script connects to the ftp server, and asks for a listing of a directory. The ftp server apparentally sends the script the file listing, but then the script hangs. I have absolutely no idea what causes the problem. To combat this problem, I have a loop which keeps looping until ftp_rawlist actually returns something valid. $files = false; while (! is_array($files)) { $files = ftp_rawlist($conn, $dir); } That, along with ftp_set_option($conn, FTP_TIMEOUT_SEC, 3); Seems to fix the problem for now, but I would still like to know what's going on. Please note... I'm running PHP 4.2.1 as a module with apache 1.3.x on a win2k machine. The server I am using for testing, if it should make any difference, is Filezilla 0.7.2. Also, this problem does not occur every time a directory listing is requested, but perhaps every 15-20 directories. In any case, which directory php stalls on is random. If anyone else has ever encountered this problem, or has any idea what is going on, I would be very interested in hearing what you have to say :). - Alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problem with 4.2.3?
I just upgraded my PHP from 4.2.2 to 4.2.3 and now I have a problem. Right now I have some HTML with included PHP. When the client opens a page with PHP and HTML it used to (under 4.2.2) display all the HTML before the PHP and then process the PHP and finally (when processing completed) finish the rest of the HTML. This allowed my to do some DHTML to let the user know that the PHP was processing. Now with the new version of PHP (4.2.3) when I hit these pages it will process the PHP before it sends any HTML to the client. This is really frustrating. Is there some setting in php.ini that I can modify to allow the browser to get the HTML before the PHP code? Or any other way to get the old behavior? Any input would be helpful. Thanks, Adam [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: getting HTML header from URL [solved]
yeah i just noticed that myself too, and unfortunatly people do code their html like that.. J On Friday, Nov 1, 2002, at 21:44 US/Eastern, David U. wrote: Jule Slootbeek wrote: oops didn't catch two little bugs Jule function getTitle($url) { $file = @fopen($url, 'r'); if(!$file) { $rline = "Error, contact webmaster"; } else { while (!feof ($file)) { $line = fgets($file); if (substr_count(strtoupper("$line"), "") >= 1) { $rline = strip_tags("$line"); //return $rline; //fclose($file); break; } } return $rline; } fclose($file); } 1) What if this line looks like: foobar Wont' $rline == "foobar" ? 2) Can't you use a socket and read until the first start saving until the and close the socket? -davidu -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Jule Slootbeek [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: getting HTML header from URL [solved]
Jule Slootbeek wrote: > oops didn't catch two little bugs > > Jule > > function getTitle($url) > { > $file = @fopen($url, 'r'); > > if(!$file) { > $rline = "Error, contact webmaster"; > } else { > while (!feof ($file)) { > $line = fgets($file); > if (substr_count(strtoupper("$line"), "") >= 1) { > $rline = strip_tags("$line"); > //return $rline; > //fclose($file); > break; > } > } > return $rline; > } > fclose($file); > } 1) What if this line looks like: foobar Wont' $rline == "foobar" ? 2) Can't you use a socket and read until the first start saving until the and close the socket? -davidu -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Security - Maybe a silly question
"SED" <[EMAIL PROTECTED]> wrote: > I'm not very familiar to this stuff, but if I wanna use https:// do > don't I need a key from Verisign (or similar) to make it work? Yes and no. If you're going to use it on a production server, yes. If it's on a test server but you still want to be somehow "protected", then, no--no you don't need a key from Verisign or others. > If so, who control who is what on the internet? That's a tricky question. Perhaps, you need to be more specific. But, I'm afraid the question would be a bit OT... - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Security - Maybe a silly question
Hello SED, "SED" <[EMAIL PROTECTED]> wrote: > Thank you for the reply, what do you mean by "sniffing", do you mean > everbody can monitor our browsing? I'm not really sure how I can answer your question but let me just put it this way. Everybody CAN monitor our browsing but: 1. That doesn't mean everybody WILL. 2. That doesn't mean they'll use "sniffing". Regarding "sniffing", I think it'd be better if your research it yourself. Google for it and use "sniffing" as your keyword--you'll be surprised with the results. I'm sure you can find more info there than if I try to explain it here. - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting HTML header from URL [solved]
oops didn't catch two little bugs Jule function getTitle($url) { $file = @fopen($url, 'r'); if(!$file) { $rline = "Error, contact webmaster"; } else { while (!feof ($file)) { $line = fgets($file); if (substr_count(strtoupper("$line"), "") >= 1) { $rline = strip_tags("$line"); //return $rline; //fclose($file); break; } } return $rline; } fclose($file); } On Friday, Nov 1, 2002, at 20:35 US/Eastern, Jule Slootbeek wrote: hmm, figured it out...all of a sudden it did work: here's the code, it loads a URL and returns the title... dunno what it would be used for, but it aught we some more about php.. i'll probbly implement it on a link page ir something Jule function getTitle($url) { $file = @fopen($url, 'r'); if(!$file) { $rline = "Error, contact webmaster"; } else { while (!feof ($file)) { $line = fgets($file); if (substr_count(strtoupper("$line"), "") >= 1) { $rline = strip_tags("$line"); return $rline; fclose($file); break; } } fclose($file); } On Friday, Nov 1, 2002, at 20:26 US/Eastern, Jule Slootbeek wrote: well, i got it to read a html file, but the problem is that it reads it after it loads it, so it doesn't read the tags, and i'm looking for the string in between and is there a way using fopen() or something similar to read an html/php file before it's loaded? Jule On Friday, Nov 1, 2002, at 17:45 US/Eastern, Jule Slootbeek wrote: i thought fopen() was only for local files, didn't even bother looking, but now i think about it..it makes perfect sence to open url's as well, thanks a lot! Jule On Friday, Nov 1, 2002, at 17:42 US/Eastern, John Nichel wrote: Docs -> Function Reference -> Filesystem Functions -> fopen() It was hidden. Jule Slootbeek wrote: hey is there a way to get the URL header? the tags etc? i couldn't find any function in the docs, but maybe i just don't know where to look. if there's a function that pulls in an entire page that;s fine too i can work with that.. any help appreciated TIA Jule Jule Slootbeek [EMAIL PROTECTED] Jule Slootbeek [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Jule Slootbeek [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Jule Slootbeek [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Jule Slootbeek [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] getting HTML header from URL
Can't you just call the contents of the page into a variable and extract what you need with regular expressions? Php / Html makes no difference its all text to fopen.. ~ > is there a way using fopen() or something similar to read an html/php > file before it's loaded? ~~ I'm not sure what you mean here. How can you read anything with out opening it first?. Cheers Brendon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting HTML header from URL [solved]
hmm, figured it out...all of a sudden it did work: here's the code, it loads a URL and returns the title... dunno what it would be used for, but it aught we some more about php.. i'll probbly implement it on a link page ir something Jule function getTitle($url) { $file = @fopen($url, 'r'); if(!$file) { $rline = "Error, contact webmaster"; } else { while (!feof ($file)) { $line = fgets($file); if (substr_count(strtoupper("$line"), "") >= 1) { $rline = strip_tags("$line"); return $rline; fclose($file); break; } } fclose($file); } On Friday, Nov 1, 2002, at 20:26 US/Eastern, Jule Slootbeek wrote: well, i got it to read a html file, but the problem is that it reads it after it loads it, so it doesn't read the tags, and i'm looking for the string in between and is there a way using fopen() or something similar to read an html/php file before it's loaded? Jule On Friday, Nov 1, 2002, at 17:45 US/Eastern, Jule Slootbeek wrote: i thought fopen() was only for local files, didn't even bother looking, but now i think about it..it makes perfect sence to open url's as well, thanks a lot! Jule On Friday, Nov 1, 2002, at 17:42 US/Eastern, John Nichel wrote: Docs -> Function Reference -> Filesystem Functions -> fopen() It was hidden. Jule Slootbeek wrote: hey is there a way to get the URL header? the tags etc? i couldn't find any function in the docs, but maybe i just don't know where to look. if there's a function that pulls in an entire page that;s fine too i can work with that.. any help appreciated TIA Jule Jule Slootbeek [EMAIL PROTECTED] Jule Slootbeek [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Jule Slootbeek [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Jule Slootbeek [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting HTML header from URL
well, i got it to read a html file, but the problem is that it reads it after it loads it, so it doesn't read the tags, and i'm looking for the string in between and is there a way using fopen() or something similar to read an html/php file before it's loaded? Jule On Friday, Nov 1, 2002, at 17:45 US/Eastern, Jule Slootbeek wrote: i thought fopen() was only for local files, didn't even bother looking, but now i think about it..it makes perfect sence to open url's as well, thanks a lot! Jule On Friday, Nov 1, 2002, at 17:42 US/Eastern, John Nichel wrote: Docs -> Function Reference -> Filesystem Functions -> fopen() It was hidden. Jule Slootbeek wrote: hey is there a way to get the URL header? the tags etc? i couldn't find any function in the docs, but maybe i just don't know where to look. if there's a function that pulls in an entire page that;s fine too i can work with that.. any help appreciated TIA Jule Jule Slootbeek [EMAIL PROTECTED] Jule Slootbeek [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Jule Slootbeek [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] My 2cents on xml/php
This is not meant to put down the php/xml combo. Just putting down my 2 cents from my experience thus far, into the archive for anyone else looking for info. I just started getting deep into parsing xml yesterday, and the dust has just begun to settle. Im parsing rss files versions 0.91 - 2.0 just for content. Before, I was using a class from phpheaven.net, phpsyndication, which basically is using regex to scan/grab content from an rss file. On my PIII 450 dev box running FBSD 4.7, there is a noticeable hit using php's xml functions to parse the rss file. Using siege, http://www.joedog.org/siege/index.shtml, I did some before and after tests. Im experiencing on average a 9-14% drop in number of requests my script can handle. And for some reason, the percentage drop is a bit larger when parsing rss 2.0 files. (Maybe my code). But I going to accept this, and Im going to keep my new code. I have plans to use caching in my script at a later date, so its not going to be too bad. So xml may have some advantages, but in my opinion, if you're going to use it extensively in your scripts, consider caching its final destination, because, using php xml functions to parse xml is going to add overhead to your script. Thats my 2 cents... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uping to plaese help
I bit you are doing something like this: copy("$file", "file") ; - Original Message - From: "marcelo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, November 02, 2002 11:19 AM Subject: [PHP] uping to plaese help > Hi need some help please > > What is wrong with my code? > > it is supposed to upload 2 files but instead gives me this error > > > > > > > > Warning: Unable to open 'Array' for reading > > > > > > The code > > > > > > > > > > > > O Leme upload > > > > > > > > > $PHP_SELF = $_SERVER['PHP_SELF']; > $page = $_REQUEST['page']; > $origem = $_FILES['origem']; > $origem2 = $_FILES['origem2']; > > > > switch($page) > { > case "um": > um($origem ,$origem2); > break; > case "dois": > dois($origem, $origem2); > break; > > default: > um($origem ,$origem2); > break; > } > > function um($origem ,$origem2) > > > { > > ?> > > > > Jornal O Leme > > > > > > > > width="600" height="120"> > > > > >enctype="multipart/form-data"> > > > > > > > > > > > > > > > > Imagem pequena > value=102400> > > > > Imagem grande > value=102400> > > > > > > > > > > > > > > > > > > > > > > > include ('menu.php'); > > ?> > > > > > > > > > > } > > > > > function dois($origem, $origem2) > > > { > set_time_limit(60); > $path=(dirname($PATH_TRANSLATED))."../primeirapagina/"; > $origem_name="pppv2.jpg"; > $dest= $path.$origem_name; > > if (($origem <> "none") && ($origem <> "")){ >if (copy($origem,$dest)){; > > } else { > echo "directoria sem direitos de escrita "; > } > unlink ($origem); > } > > set_time_limit(60); > $path2=(dirname($PATH_TRANSLATED))."../primeirapagina/"; > $origem2_name="ppv2.jpg"; > $dest2= $path2.$origem2_name; > > if (($origem2 <> "none") && ($origem2 <> "")){ >if (copy($origem2,$dest2)){; > > } else { > echo "directoria sem direitos de escrita "; > } > unlink ($origem2); > } > > > > > } > > > > > > ?> > > > > > > > and yes i am new to php > > tk > > > > > > Marcelo Salvador > > www.sinesdigital.pt > > > > > > -- > 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] Can't store info on a mysql database...
$sql="INSERT INTO `users` (login,passwd) VALUES ('$logintxt', 'password($passwdtxt)')" ; mysql_db_query("mysite",$sql); - Original Message - From: "Mr. BuNgL3" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, November 02, 2002 10:32 AM Subject: [PHP] Can't store info on a mysql database... > Hi... > My problem is that i can't store info in a mysql database... ex: > > I want to store this info in my database: login/passwd and i have the php > code... > > $logintxt = $HTTP_POST_VARS['logintxt']; > $passwdtxt= $HTTP_POST_VARS['passwdtxt']; > > if (!$logintxt || !$passwdtxt) > { > include('registo.htm'); > } > else > { > $ligacao=mysql_connect("localhost","",""); > if (!$ligacao) > { > print("Problemas na ligação á base de dados!"); > } > else > { > //Procurar se user já existente > > //$sql="INSERT into users SET login='$logintxt', > passwd=MD5('$passwdtxt')"; > > $sql="INSERT INTO users (login,passwd) VALUES ('$logintxt', > 'passwd=MD5($passwdtxt))'"; > mysql_db_query("mysite",$sql); > } > mysql_close(); > } > ?> > > what i'm doing wrong? : | > > thanks... > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] uping to plaese help
Hi need some help please What is wrong with my code? it is supposed to upload 2 files but instead gives me this error Warning: Unable to open 'Array' for reading The code O Leme upload Jornal O Leme Imagem pequena Imagem grande "none") && ($origem <> "")){ if (copy($origem,$dest)){; } else { echo "directoria sem direitos de escrita "; } unlink ($origem); } set_time_limit(60); $path2=(dirname($PATH_TRANSLATED))."../primeirapagina/"; $origem2_name="ppv2.jpg"; $dest2= $path2.$origem2_name; if (($origem2 <> "none") && ($origem2 <> "")){ if (copy($origem2,$dest2)){; } else { echo "directoria sem direitos de escrita "; } unlink ($origem2); } } ?> and yes i am new to php tk Marcelo Salvador www.sinesdigital.pt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] Can't store info on a mysql database...
$md = MD5($passwdtxt); $sql="INSERT INTO users (login,passwd) VALUES (\"$logintxt\", \"$md\")"; mysql_query($sql) or die(mysql_error()); next time, show the error messages you got. Also, ALWAYS USE mysql_error() when executing mysql_query() -- see above = "Mr. BuNgL3" <[EMAIL PROTECTED]> wrote in message news:20021101233214.19457.qmail@;pb1.pair.com... > Hi... > My problem is that i can't store info in a mysql database... ex: > > I want to store this info in my database: login/passwd and i have the php > code... > > $logintxt = $HTTP_POST_VARS['logintxt']; > $passwdtxt= $HTTP_POST_VARS['passwdtxt']; > > if (!$logintxt || !$passwdtxt) > { > include('registo.htm'); > } > else > { > $ligacao=mysql_connect("localhost","",""); > if (!$ligacao) > { > print("Problemas na ligação á base de dados!"); > } > else > { > //Procurar se user já existente > > //$sql="INSERT into users SET login='$logintxt', > passwd=MD5('$passwdtxt')"; > > $sql="INSERT INTO users (login,passwd) VALUES ('$logintxt', > 'passwd=MD5($passwdtxt))'"; > mysql_db_query("mysite",$sql); > } > mysql_close(); > } > ?> > > what i'm doing wrong? : | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can't store info on a mysql database...
Hi... My problem is that i can't store info in a mysql database... ex: I want to store this info in my database: login/passwd and i have the php code... what i'm doing wrong? : | thanks... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Security - Maybe a silly question
I'm not very familiar to this stuff, but if I wanna use https:// do don't I need a key from Verisign (or similar) to make it work? If so, who control who is what on the internet? Regards, Sumarlidi E. Dadason SED - Graphic Design _ Tel: 896-0376, 461-5501 E-mail: [EMAIL PROTECTED] website: www.sed.is -Original Message- From: rija [mailto:rija@;vatu.com] Sent: 1. nóvember 2002 22:33 To: php; SED Subject: Re: [PHP] Security - Maybe a silly question Yes, Between user and server, everydata pass through DNS, routeur, etc... So if you don't want someone (hackers or FBI of CIA) to decode your data, use SSL server (https://) with certificate- - Original Message - From: "SED" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, November 02, 2002 8:37 AM Subject: [PHP] Security - Maybe a silly question > When I use sessions in PHP or just plain login/password in $_POST, can > 3rd parties or hackers monitor the transmission, between me and user, > and somehow decode the transmission and use the variables to login > other time or overtake the current session? > > If so, how likely is for someone to manage it (get the > username/password)? > > > Regards, > Sumarlidi E. Dadason > > SED - Graphic Design > _ > Tel: +354-896-0376, +354-461-5501 > E-mail: [EMAIL PROTECTED] > website: www.sed.is > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] regular expression question
It might, you should test it to find out. John Meyer wrote: I've got a regexp: (EV[0-9]{2})!([0-9]{4}-[0-9]{2}-[0-9]{2})!(GR[0-9]{2}).txt My question is, will it match this: EV01!2002-11-09!VR01!GR01.txt And anything formatted like this: (EV02, and so forth). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] regular expression question
I've got a regexp: (EV[0-9]{2})!([0-9]{4}-[0-9]{2}-[0-9]{2})!(GR[0-9]{2}).txt My question is, will it match this: EV01!2002-11-09!VR01!GR01.txt And anything formatted like this: (EV02, and so forth). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Security - Maybe a silly question
Thank you for the reply, what do you mean by "sniffing", do you mean everbody can monitor our browsing? -Original Message- From: @ Edwin [mailto:copperwalls@;hotmail.com] Sent: 1. nóvember 2002 21:47 To: SED Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Security - Maybe a silly question Hello, "SED" <[EMAIL PROTECTED]> wrote: > When I use sessions in PHP or just plain login/password in $_POST, can > 3rd parties or hackers monitor the transmission, between me and user, > and somehow decode the transmission and use the variables to login > other time or overtake the current session? Yes. (But, I'm not really sure what you meant by "between me and user"...) > If so, how likely is for someone to manage it (get the > username/password)? By "sniffing". - E -- 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] Number of files in a dir
cope with readdir() or dir(). I always use one of these functions and I'm wondered if there are more efficient solution to do it ! - Original Message - From: "Shaun Thornburgh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, November 02, 2002 9:00 AM Subject: [PHP] Number of files in a dir > How can i find out how many files exist in a dir? > > > > -- > 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] getting HTML header from URL
i thought fopen() was only for local files, didn't even bother looking, but now i think about it..it makes perfect sence to open url's as well, thanks a lot! Jule On Friday, Nov 1, 2002, at 17:42 US/Eastern, John Nichel wrote: Docs -> Function Reference -> Filesystem Functions -> fopen() It was hidden. Jule Slootbeek wrote: hey is there a way to get the URL header? the tags etc? i couldn't find any function in the docs, but maybe i just don't know where to look. if there's a function that pulls in an entire page that;s fine too i can work with that.. any help appreciated TIA Jule Jule Slootbeek [EMAIL PROTECTED] Jule Slootbeek [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] number_format question
What you need to do with the input number is to do an ereg_replace() and eliminate the commas from the string, then use the string variable where needed. Then, when you want to display the variable, use the number_format() function. Hope this helps, Hugh - Original Message - From: <[EMAIL PROTECTED]> To: "Jay Blanchard" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, October 31, 2002 2:36 PM Subject: RE: [PHP] number_format question > > Tried it. It works but crops everything after the first "," in the number > if you enter a number with commas. Works great if you don't enter any > commas. > > What I need to be able to do: > > IN OUT > 123456789 > 123,456,789 > 123456789.00 > 123,456,789 > 123,456,789.00 > 123,456,789 > > Ed > > > On Thu, 31 Oct 2002, Jay Blanchard wrote: > > > [snip] > > If I try that I get a wrong parameter count error. > > > > [/snip] > > > > number_format ( float number [, int decimals [, string dec_point [, string > > thousands_sep]]]) > > > > number_format($number, 0, '', ','); > > > > Try that ... > > > > Jay > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] getting HTML header from URL
Docs -> Function Reference -> Filesystem Functions -> fopen() It was hidden. Jule Slootbeek wrote: hey is there a way to get the URL header? the tags etc? i couldn't find any function in the docs, but maybe i just don't know where to look. if there's a function that pulls in an entire page that;s fine too i can work with that.. any help appreciated TIA Jule Jule Slootbeek [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Security - Maybe a silly question
Yes, Between user and server, everydata pass through DNS, routeur, etc... So if you don't want someone (hackers or FBI of CIA) to decode your data, use SSL server (https://) with certificate- - Original Message - From: "SED" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, November 02, 2002 8:37 AM Subject: [PHP] Security - Maybe a silly question > When I use sessions in PHP or just plain login/password in $_POST, can > 3rd parties or hackers monitor the transmission, between me and user, > and somehow decode the transmission and use the variables to login other > time or overtake the current session? > > If so, how likely is for someone to manage it (get the > username/password)? > > > Regards, > Sumarlidi E. Dadason > > SED - Graphic Design > _ > Tel: +354-896-0376, +354-461-5501 > E-mail: [EMAIL PROTECTED] > website: www.sed.is > > > -- > 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] search
Perhaps the table name 'desc' is reserved word for 'order by' so MySQL cannot use it as table name- So why don't you print out the mysql_error() using for example die- like this: $inquiry = mysql_query("select id,link,heading,desc from links where heading like '%$entry%' or desc like '%$entry%' or keyword like '%$entry%'",$connection)) or die (mysql_error()) ; - Original Message - From: "samug" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, November 02, 2002 3:39 AM Subject: [PHP] search > There's no php.sql, so I'll put it here. > > I'm trying to do a search from mysql database like this: > > if (!$inquiry = mysql_query("select id,link,heading,desc from links where > heading like '%$entry%' or desc like '%$entry%' > or keyword like '%$entry%'",$connection)){ > print "Search was unsuccesful!"; > } > else{ > while ($link = mysql_fetch_row($inquiry)){ > print " print "\">" . $link[2]; > print " " . $link[3] . "" ; > } > > } > > But everytime I get all the possible entries, even though I'm sure it > doesn't match. > > Thanks for your answers. > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] getting HTML header from URL
hey is there a way to get the URL header? the tags etc? i couldn't find any function in the docs, but maybe i just don't know where to look. if there's a function that pulls in an entire page that;s fine too i can work with that.. any help appreciated TIA Jule Jule Slootbeek [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Check box with same name
Add square brackets to the end of the name of each check box, ie... And on the page you submit the form too, you will be able to access this as an array... $_POST['searchStr'] or $_GET['searchStr'], depending on the method the form was posted by. ppf wrote: Hi all: I am having a problem in accessing form data from multiple check box of same name with different values, like this value="Where"> Where name="searchStr" value="would"> would name="searchStr" value="Luluk,"> Luluk, width="40%"> name="searchStr" value="Indonesian"> Indonesian ons, How can i access these multiple selected value in same name? I am trying to move my asp code to PHP, Thanks in advance Prad __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Check box with same name
Hello, Use an array: Note: Only checked checkboxes are passed. Access: print $_REQUEST['foo'][0]; // the first one print $_REQUEST['foo'][1]; // the second You can use named indices too: print $_REQUEST['foo']['bar']; Mix and match, have fun. Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Number of files in a dir
How can i find out how many files exist in a dir? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Theory question
Well, what you could do is write one function that gets all the values that you need and fills the variables up with them, AND write a bunch of functions that get one value at a time. Then depending on the conditions or parameters/values needed or recieved and such, you can call the function best suited for the situation. If all the values are needed, call the function to get them all, if only a few are need, call only the functions that get the needed values, or some combination of this. You could argue that what if you need all of the values but one, well then just call the function that gets all the vars and just ignore that the last var is set. You could also do this by even having one function that it something like this: I would prolly do something like this (maybe ;) depending on the situation... where 0 is false (or don't get this var), and 1 is true (or get this var) function get_somevars( getvar1 = 0, getvar2 = 0, getvar3 = 0) { ... } we don't get any by default, and the ones that we do want we pass the function 1 values like so... get_somevers(1, 0, 1); // or get var1 and var3 but don't get var2 HTH, Matt At 04:42 PM 11/1/2002 -0500, you wrote: Hi every1 This is a theorical question about the best way to use classes. I have a class named anything, and also theres a table named ahything .. The class attributes are the same fields of the table like this Class anything { var $something1; var $something2; var $something3; } And the table 'anything' has 3 fields they are something1 , something2, something3, my question: I have a method in the class that retrieves the values for the 3 attributes from the table, there are many scripts that use this method to get the data, but not all the scripts uses the 3 attributes, for example a script calls the method just because only needs the attribute something1. should i write one method to retrieve each attribute ? Or is just fine that one method gets all data, and the scripts only uses what it needs ?? Of course, the real class has more than 3 attributes it has 10 attributes Thanks Any help would be very useful. Daniel. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Capitalizing names etc. part II - found a solution
Hi Richard Archer, On Thu, 31 Oct 2002 12:24:15 -, you wrote about "RE: Capitalizing names etc. part II - found a solution" something that looked like this: >You should consider the fact that, even as surnames, names like >Mackintosh and Mackenzie (and as someone else suggested here 'Macon') >generally should NOT have a capital letter. Mackintosh is an English >name, not Scottish, and people who spell it with a capital K have gotten >their ancestry mixed up somewhere! I've been made aware of this by a few others in private mail. When writing this scripple I was doing something I don't usually do: I was blindingly stearing at getting it to handle the few names I have to deal with, and not considering that it may have to handle other names sometime in the future. Normally when I program things like this, I try to make it take into account every exception to the rule (not error-exception) I can come up with. Atleast my Excel macros are made that way ... >Anyway, perhaps a way around this would be to have a known exceptions >list? You could just stick all your Mc/Mac code inside: > if (in_array($lastname, $mcExceptions)) { > ... > } I considered that after the responses I got ... but it will be a kludge in the end ... but a necessary one until I come up with a better solution. >At the end of the day, it's really up to the person how they capitalise >their own name, but I guess mind reading is (currently) a bit beyond >PHP. My own idea for the perfect solution to this, would be to have it take the incoming contracted name, compare it to a list, and then find the real name in the list that corresponds to that name. My problem is, how'd you do that ??? I've got no access to MySQL, so I can't use that. The incoming name string is the first part of the file name that holds the biography for that person (if you take a peek at my site at metalbunny.net/girlz/bios.php you'll know what I mean, haven't uploaded the revised capper yet), so it will still need that string to find the correct include for the body of the page. I haven't even sniffed at the File I/O functions yet... Rene -- Rene Brehmer System developer in the making... This message was written on 100% recycled spam. Come see! My brand new site is now online! http://www.metalbunny.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Security - Maybe a silly question
Hello, "SED" <[EMAIL PROTECTED]> wrote: > When I use sessions in PHP or just plain login/password in $_POST, can > 3rd parties or hackers monitor the transmission, between me and user, > and somehow decode the transmission and use the variables to login other > time or overtake the current session? Yes. (But, I'm not really sure what you meant by "between me and user"...) > If so, how likely is for someone to manage it (get the > username/password)? By "sniffing". - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Theory question
Hi every1 This is a theorical question about the best way to use classes. I have a class named anything, and also theres a table named ahything .. The class attributes are the same fields of the table like this Class anything { var $something1; var $something2; var $something3; } And the table 'anything' has 3 fields they are something1 , something2, something3, my question: I have a method in the class that retrieves the values for the 3 attributes from the table, there are many scripts that use this method to get the data, but not all the scripts uses the 3 attributes, for example a script calls the method just because only needs the attribute something1. should i write one method to retrieve each attribute ? Or is just fine that one method gets all data, and the scripts only uses what it needs ?? Of course, the real class has more than 3 attributes it has 10 attributes Thanks Any help would be very useful. Daniel. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Extracting email addresses
Hello Everyone, Does anyone have an regular expression or other way to extract an email address out of a string. I have been using: if (ereg ("^" . "[a-z0-9]+([_\\.-][a-z0-9]+)*" .//user "@" . "([a-z0-9]+([\.-][a-z0-9]+)*)+" . //domain "\\.[a-z]{2,}" .//sld, tld "$" , $body[$line], $regs)) It will match an email address by itself for example; [EMAIL PROTECTED] What it won't do is extract [EMAIL PROTECTED] from; mailto:jr@;johnrudnick.com">[EMAIL PROTECTED]. Any help would be appreciated. Thanks in Advance! JR - SallyJo, Inc., offers Top Notch Dedicated & Virtual Hosting. Visit: http://www.SallyJoInc.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Security - Maybe a silly question
When I use sessions in PHP or just plain login/password in $_POST, can 3rd parties or hackers monitor the transmission, between me and user, and somehow decode the transmission and use the variables to login other time or overtake the current session? If so, how likely is for someone to manage it (get the username/password)? Regards, Sumarlidi E. Dadason SED - Graphic Design _ Tel: +354-896-0376, +354-461-5501 E-mail: [EMAIL PROTECTED] website: www.sed.is -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Check box with same name
Hi all: I am having a problem in accessing form data from multiple check box of same name with different values, like this Where would Luluk, Indonesian ons, How can i access these multiple selected value in same name? I am trying to move my asp code to PHP, Thanks in advance Prad __ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: uploading files
Thats all fine Here is my form header "Kevin Stone" <[EMAIL PROTECTED]> wrote in message news:020201c281ec$04515820$6601a8c0@;kevin... > Confirm that you're using the proper header information in your HTML > tag.. > > -Kevin > > - Original Message - > From: "Shaun Thornburgh" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, November 01, 2002 1:51 PM > Subject: [PHP] Re: uploading files > > > > My apologies, here is the code! > > > > //copy image to server > > if ($image != "none") { > > if (copy ($image, $dir.$image_name)){ > > echo "File upload successful!"; > > } else { > >echo "File upload unsuccessful!"; > > } > > > > //new name of image > > $new_name = "$property_id-$category_id-$sub_category_id.jpg"; > > > > //rename the file > > rename($dir.$image_name, $dir.$new_name); > > } > > > > > > "Shaun Thornburgh" <[EMAIL PROTECTED]> wrote in message > > news:20021101205003.11053.qmail@;pb1.pair.com... > > > I am attempting to upload image files to the server from a users browser > > > using the following code, however, the images seem to get corrupted, > they > > > look completely different and the file sizes are generally smaller, also > > it > > > sometimes says file upload unsuccessful, even when it does upload the > > file? > > > > > > Any ideas? > > > > > > Thank you > > > > > > > > > > > > > > -- > > 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
Fw: [PHP] Re: uploading files
Confirm that you're using the proper header information in your HTML tag.. -Kevin - Original Message - From: "Shaun Thornburgh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 01, 2002 1:51 PM Subject: [PHP] Re: uploading files > My apologies, here is the code! > > //copy image to server > if ($image != "none") { > if (copy ($image, $dir.$image_name)){ > echo "File upload successful!"; > } else { >echo "File upload unsuccessful!"; > } > > //new name of image > $new_name = "$property_id-$category_id-$sub_category_id.jpg"; > > //rename the file > rename($dir.$image_name, $dir.$new_name); > } > > > "Shaun Thornburgh" <[EMAIL PROTECTED]> wrote in message > news:20021101205003.11053.qmail@;pb1.pair.com... > > I am attempting to upload image files to the server from a users browser > > using the following code, however, the images seem to get corrupted, they > > look completely different and the file sizes are generally smaller, also > it > > sometimes says file upload unsuccessful, even when it does upload the > file? > > > > Any ideas? > > > > Thank you > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Login Sessions
Hello, "Jay Fitzgerald" <[EMAIL PROTECTED]> wrote: [snip] > === > session_start(); > > if (isset("valid_id")) > { > echo "$_SESSION[valid_id]"; > } > else [/snip] Perhaps, it's because you need to ask if (isset($_SESSION['valid_id'])) ? - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: uploading files
My apologies, here is the code! //copy image to server if ($image != "none") { if (copy ($image, $dir.$image_name)){ echo "File upload successful!"; } else { echo "File upload unsuccessful!"; } //new name of image $new_name = "$property_id-$category_id-$sub_category_id.jpg"; //rename the file rename($dir.$image_name, $dir.$new_name); } "Shaun Thornburgh" <[EMAIL PROTECTED]> wrote in message news:20021101205003.11053.qmail@;pb1.pair.com... > I am attempting to upload image files to the server from a users browser > using the following code, however, the images seem to get corrupted, they > look completely different and the file sizes are generally smaller, also it > sometimes says file upload unsuccessful, even when it does upload the file? > > Any ideas? > > Thank you > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] phpinfo
Restart apache... that should be it on XP use the Restart Script in you apache program group on unix do a /usr/local/apache/bin/apachectl graceful or just apachectl graceful if it is in your path HTH, Matt At 05:50 AM 11/2/2002 +0900, you wrote: <[EMAIL PROTECTED]> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] uploading files
I am attempting to upload image files to the server from a users browser using the following code, however, the images seem to get corrupted, they look completely different and the file sizes are generally smaller, also it sometimes says file upload unsuccessful, even when it does upload the file? Any ideas? Thank you -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] search
Hello, "samug" <[EMAIL PROTECTED]> wrote in message news:20021101163718.65263.qmail@;pb1.pair.com... > There's no php.sql, so I'll put it here. > There's php.db, however... :) - E -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] phpinfo
Hello, (B (B"David Russell" <[EMAIL PROTECTED]> wrote: (B> Hi all, (B> (B> I upgraded php and apache on my development machine (Windows XP). I am (B> now running apache 1.3.27 and php 4.2.3. (B> (B> When I run a phpinfo(), I get my full list of stuff as expected, except (B> that the apache version reported is 1.3.24. (B> (B> Has anyone else seen this. Have I done something wrong? (B> (B (BNot sure. Perhaps, a simple restart would fix the problem. (B (BJust guessing... (B (B- E (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] String Expression for aplpahnumeric password
Hello, (B (B"Adam" <[EMAIL PROTECTED]> wrote in message (B[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... (B> I need a string expression to verify an alpha numeric password. This is (Bwhat (B> i've come up with , however it does not work: (B> (B> elseif ( (!ereg ("^[a-zA-Z]+$", $password)) || (!ereg ("^[0-9]+$", (B> $password))) (B> (B (BHow about this? (B (B elseif (!eregi("^[[:alnum:]]+$", $password)) (B (BHTH, (B (B- E (B (B-- (BPHP General Mailing List (http://www.php.net/) (BTo unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Login Sessions
What am I doing wrong here? I have a login form that visitors enter their "use"name and "use_psswrd" in to log in...the form action is this code: == session_start(); if ($_REQUEST[use_name] && $_REQUEST[use_psswrd]) { $connection = mysql_connect("SERVER","USER","PASS") or die ("Couldn't make connection."); $db = mysql_select_db("DB", $connection) or die ("Couldn't select the database."); $sql = "select * from TABLE where use_name = '$_REQUEST[use_name]' and use_psswrd = '$_REQUEST[use_psswrd]'"; $sql_result = mysql_query($sql) or die ("Couldn't execute query."); if (mysql_num_rows($sql_result) >0 ) { list($valid_id, $valid_user) = mysql_fetch_row($sql_result); session_register("valid_id", "valid_user"); // echo "$valid_id, $valid_user"; header("Location: modify_profile.php?uid=$valid_id&un=$valid_user"); } else { header("Location: profile_login.php"); exit; } } mysql_free_result($sql_result); mysql_close($connection); ?> = That page is supposed to register a session that holds both the "valid_id" and "valid_user" variables and continue on the the next page (which it does) - BUT once the user gets to the next page: === session_start(); if (isset("valid_id")) { echo "$_SESSION[valid_id]"; } else { echo "DUMBASS!"; } ?> = Nothing gets displayed.Am I not setting or requesting them correctly?? The one thing I cant understand is why the URI now reflects the user is logged in: (modify_profile.php?uid=1&un=jerry) TIA, Jay
Re: [PHP] Who can tell me where I can get the cracked Zend Encoder3.0 ?
<[EMAIL PROTECTED]> wrote: > > > Asking for something illegal is *wrong*. > > But just stealing it without asking is OK? > Tell me. if (that was a joke){ I need to rephrase myself... > Let's get busy coding--jokes and laughs (and ...whatever) > can be found somewhere else... should read: > Let's get busy coding--_unwholesome_ jokes and laughs (and > "immature namecalling and fingerpointing" <- from Liam) can be > found somewhere else... because I thought there's some sort of "sense of humor" in your question... } else { $alertmessage = "ERROR -> Stupid Question!" } - E PS BTW, stealing even *after* asking is NOT ok... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Who can tell me where I can get the cracked Zend Encoder3.0?
> Asking for something illegal is *wrong*. But just stealing it without asking is OK? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Who can tell me where I can get the cracked Zend Encoder3.0 ?
Asking for something illegal is *wrong*. But, there's always a better/proper way of dealing with this kind of person/situation. Let's get busy coding--jokes and laughs (and ...whatever) can be found somewhere else... - E -- "Do not answer anyone stupid according to his foolishness, that you yourself also may not become equal to him." - Proverbs 26:4 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Regular expression problem
I just moved some *working* code from a Win2k server running PHP 4.2.1 to a FreeBSD server running 4.2.3 and the following code no longer works... $templatetext = preg_replace("//e", "g_includecallback(\"\\1\")", $templatetext); if (!preg_match("/([[:ascii:]]+?)([[:ascii:]]+?)([[:ascii:]]+?)$/i", $templatetext, $matches)) { // Report the error and stop processing the page g_Halt("Could not find set definition in set list template: $g_setlisttemplate"); } The first line that processes includes works and after that line $templatetext contains the full template with the include statements replaced with the contents of the file. After the preg_match statement has run (and succeeded), $matches[0] should contain the same as $templatetext did after the previous line. However, this is not the case. A sizable chunk of the text at the start of the variable has been lost and I cannot figure out why. Can anyone give me any pointers? Thanks. -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Who can tell me where I can get the cracked Zend Encoder3.0 ?
Easy Liam, the guy posted to the list asking for something illegal. It is not like he had posted something like we have all seen before where a broad question is asked and a broader answer given. Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Who can tell me where I can get the cracked Zend Encode r3.0 ?
<> Disrespect or not, anyone ever copy a game? Or a CD or tape? Or a movie? Anyone ever download anything off the Internet? It's all the same, and I doubt any of the people on the list showing the same disrespect this person may have showed have never done that. Again, cut this poster some slack and let him or her move on. Maybe if the poster is still on the list, that same person can save someone a lot of headache with the solution to a coding problem. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Who can tell me where I can get the cracked Zend Encode r3.0 ?
Okay enough now. -- M.CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com Hébergement de sites internets. "John Nichel" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED] > I for one think that poster didn't enough grief. I mean, you go on and > on about making a 'mistake', but it's not like his mistake was to ask a > JavaScript or MySQL question in a php mailing list. He asked for an > illegal version of software from those who make / contribute to the > software. That's not a mistake, that's disrespect. Regardless, I > didn't post anything to him, nor will I say anything else about it. > > [EMAIL PROTECTED] wrote: > >>>Who can tell me where I can get the cracked Zend Encoder 3.0 ? > >> > > > >>Are you a muppet? > >> > >>This list is run by the people who make Zend Encoder! > >> > >>FOOL > > > > > >>Ah, my first laugh of the day. > > > > > > Okay, that's enough. I'm incredibly disappointed in this list. It's very > > helpful at times, but at other times can degenerate into immature > > namecalling and fingerpointing like the above and other examples. So this > > poster made a mistake. Cut him or her some slack. But I guess since none of > > the fingerpointers here have ever made a mistake, then I guess you all have > > the right to go ahead and make fun. This person made a post that he or she > > shouldn't have made, and since then has been ridiculed on a public forum by > > about four or five of us. If we all can look past this mistake and get back > > to posting constructive comments, this poster can get back to feeling a > > little sense of community here when needing legitimate help. So can we give > > this poster a break, or should we continue and then respond to every > > fingerpointer with the same lack of respect next time a mistake is made? > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Who can tell me where I can get the cracked Zend Encoder3.0 ?
I for one think that poster didn't enough grief. I mean, you go on and on about making a 'mistake', but it's not like his mistake was to ask a JavaScript or MySQL question in a php mailing list. He asked for an illegal version of software from those who make / contribute to the software. That's not a mistake, that's disrespect. Regardless, I didn't post anything to him, nor will I say anything else about it. [EMAIL PROTECTED] wrote: Who can tell me where I can get the cracked Zend Encoder 3.0 ? Are you a muppet? This list is run by the people who make Zend Encoder! FOOL Ah, my first laugh of the day. Okay, that's enough. I'm incredibly disappointed in this list. It's very helpful at times, but at other times can degenerate into immature namecalling and fingerpointing like the above and other examples. So this poster made a mistake. Cut him or her some slack. But I guess since none of the fingerpointers here have ever made a mistake, then I guess you all have the right to go ahead and make fun. This person made a post that he or she shouldn't have made, and since then has been ridiculed on a public forum by about four or five of us. If we all can look past this mistake and get back to posting constructive comments, this poster can get back to feeling a little sense of community here when needing legitimate help. So can we give this poster a break, or should we continue and then respond to every fingerpointer with the same lack of respect next time a mistake is made? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 1 Nov 2002 18:19:05 -0000 Issue 1679
php-general Digest 1 Nov 2002 18:19:05 - Issue 1679 Topics (messages 122384 through 122438): PHP-GTK 0.5.2 released 122384 by: Andrei Zmievski Re: Displaying Data of a MySQL Table in PHP 122385 by: Jason Wong php development environment 122386 by: Simon Taylor 122392 by: Jason Wong 122400 by: . Edwin 122403 by: . Darwin client-side zip of POST or GET data, auto unzip on server. 122387 by: Petre Agenbag 122398 by: . Edwin 122401 by: Petre Agenbag Re: counting clicks on a flash ad 122388 by: James Redfern New Server advice 122389 by: David Russell 122391 by: John Nichel 122396 by: . Edwin Require_once problem 122390 by: Kerry Kobashi 122399 by: Kerry Kobashi 122404 by: . Darwin 122424 by: Ford, Mike [LSS] Simple Problems taking me hours to solve! 122393 by: Steve Jackson 122395 by: Petre Agenbag 122408 by: Petre Agenbag Re: ^M at the end of each line when I use php to write file 122394 by: Gerard Samuel xml parser breaking on legal xml chars 122397 by: Gerard Samuel Re: why does eregi match for whitespace when there is none? 122402 by: Erwin Apache Installation Problem 122405 by: Ramesh Pillai 122409 by: Jason Wong Array solution... 122406 by: Davíð Örn Jóhannsson 122407 by: Jason Wong Need help with regexp for preg_split 122410 by: David Brannlund Serverside script 122411 by: Davíð Örn Jóhannsson 122412 by: Petre Agenbag 122413 by: John W. Holmes Get shipping problem continued! 122414 by: Steve Jackson 122420 by: Michael T. Babcock php4 Mac OSX 122415 by: Pierre Vaudrey 122425 by: Matt T. Galvin 122431 by: Pierre Vaudrey 122434 by: Matt T. Galvin Cookies 122416 by: Shaun 122417 by: Shaun how to avoid security thread when user able to press back button? 122418 by: James Ting Help please. 122419 by: Steve Jackson 122421 by: Jason Wong String Expression for aplpahnumeric password 122422 by: Adam PHP & WebDAV 122423 by: GC OT - mysql question... 122426 by: Kelly Meeks 122428 by: John Nichel phpinfo 122427 by: David Russell How do I check if a checkbox has been checked? 122429 by: DonPro 122430 by: John Nichel 122432 by: Tom Woody search 122433 by: samug 122435 by: Robert Cummings 122436 by: John Nichel Re: Who can tell me where I can get the cracked Zend Encoder3.0 ? 122437 by: Steve Keller 122438 by: Liam.Gibbs.dfait-maeci.gc.ca 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] -- --- Begin Message --- To all crazy users of PHP-GTK, Version 0.5.2 has been released (after a half a year hiatus). This release has some bug fixes and also some minor feature enhancements, mostly in the graphics area. Download the releaes from; http://gtk.php.net/download.php Version 0.5.2 "Bass does a body good" 01-Nov-2002 ~ - simplified GdkPixbuf constructor parameters. (Andrei) - fixed setting of tile/stipple/clip_mask/bg_pixmap properties of GdkGC. (Andrei) - implemented GdkPixbuf::fill(). (Andrei) - changed failure to allocate color to output only a notice instead of a warning. (Andrei) - made depth parameter of GdkPixmap constructor optional. (Andrei) - added copy_area() method for drawables. (Andrei) - added group() and set_group() methods for GtkRadioButton/GtkRadioMenuItem. (Andrei) - added GDK functions pointer_grab(), pointer_ungrab(), keyboard_grab(), keyboard_ungrab(). (Andrei) - added utf8 support to GtkRadioButton, GtkToggleButton, GtkCheckMenuItem, and GtkCheckButton. (Frank) - fixed a crash bug when using non-string variables to access overloaded object's properties. (Andrei) - fixed a crash bug in GtkCheckButton constructor. (Andrei) Enjoy, -Andrei http://www.gravitonic.com/ * Reality isn't all it's cracked up to be. * --- End Message --- --- Begin Message --- On Friday 01 November 2002 14:14, Ben C. wrote: > I want to create a table in PHP with data from a MySQL database table. Can > someone please help with a sample script. I know this is probably easy but > I need quick help. I searched the archives and couldn't find something > this simple. google -> "mysql php tutorial" -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Deve
RE: [PHP] Who can tell me where I can get the cracked Zend Encoder3.0 ?
> > Who can tell me where I can get the cracked Zend Encoder 3.0 ? >Are you a muppet? > >This list is run by the people who make Zend Encoder! > >FOOL >Ah, my first laugh of the day. Okay, that's enough. I'm incredibly disappointed in this list. It's very helpful at times, but at other times can degenerate into immature namecalling and fingerpointing like the above and other examples. So this poster made a mistake. Cut him or her some slack. But I guess since none of the fingerpointers here have ever made a mistake, then I guess you all have the right to go ahead and make fun. This person made a post that he or she shouldn't have made, and since then has been ridiculed on a public forum by about four or five of us. If we all can look past this mistake and get back to posting constructive comments, this poster can get back to feeling a little sense of community here when needing legitimate help. So can we give this poster a break, or should we continue and then respond to every fingerpointer with the same lack of respect next time a mistake is made? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Who can tell me where I can get the cracked Zend Encoder3.0 ?
At 10/31/2002 03:00 PM, John Wards wrote: On Thursday 31 Oct 2002 3:00 pm, jianking wrote: > Who can tell me where I can get the cracked Zend Encoder 3.0 ? Are you a muppet? This list is run by the people who make Zend Encoder! FOOL Ah, my first laugh of the day. -- S. Keller UI Engineer The Health TV Channel, Inc. (a non - profit organization) 3820 Lake Otis Pkwy. Anchorage, AK 99508 907.770.6200 ext.220 907.336.6205 (fax) Email: [EMAIL PROTECTED] Web: www.healthtvchannel.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] search
And you may want to try $query = "select `id`, `link`, `heading`, `desc` from `links` where `heading` like '%" . $entry . "%' or `desc` like '%" . $entry% . "' or `keyword` like '" . %$entry% . "'"; if ( ! $inquiry = @mysql_query ( $query, $connection ) ) Robert Cummings wrote: Echo your query and ensure that $entry has data in it, otherwise matching '%%' will match everything as you are getting. Cheers, Rob. samug wrote: There's no php.sql, so I'll put it here. I'm trying to do a search from mysql database like this: if (!$inquiry = mysql_query("select id,link,heading,desc from links where heading like '%$entry%' or desc like '%$entry%' or keyword like '%$entry%'",$connection)){ print "Search was unsuccesful!"; } else{ while ($link = mysql_fetch_row($inquiry)){ print "" . $link[2]; print " " . $link[3] . "" ; } } But everytime I get all the possible entries, even though I'm sure it doesn't match. Thanks for your answers. -- 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] search
Echo your query and ensure that $entry has data in it, otherwise matching '%%' will match everything as you are getting. Cheers, Rob. samug wrote: > > There's no php.sql, so I'll put it here. > > I'm trying to do a search from mysql database like this: > > if (!$inquiry = mysql_query("select id,link,heading,desc from links where > heading like '%$entry%' or desc like '%$entry%' > or keyword like '%$entry%'",$connection)){ > print "Search was unsuccesful!"; > } > else{ > while ($link = mysql_fetch_row($inquiry)){ > print " print "\">" . $link[2]; > print " " . $link[3] . "" ; > } > > } > > But everytime I get all the possible entries, even though I'm sure it > doesn't match. > > Thanks for your answers. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- .-. | Robert Cummings | :-`. | Webdeployer - Chief PHP and Java Programmer | :--: | Mail : mailto:robert.cummings@;webmotion.com | | Phone : (613) 731-4046 x.109 | :--: | Website : http://www.webmotion.com | | Fax : (613) 260-9545 | `--' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php4 Mac OSX
uncompress eXtremePHP. It may get have a weird directory name. Change the directory name to xpl. copy xpl to /Users/pierreva/Sites/xpl either from the CLI or just drag the xpl dir into your Site dir cd /usr/local/lib sudo vi php.ini while in vi type /auto_prepend (this is to search to the auto_prepend line in the php.ini file) move to the end of the auto_prepend line then type: "a" to append to the file then "/Users/pierreva/Sites/xpl/common/common.inc.php" then type :wq to save the changes then type sudo apachectl graceful to restart apache, just in case ;) That should be all that you have to do. Now try using the libraries and other xpl stuff. Good Luck, Matt At 05:00 PM 11/1/2002 +0100, you wrote: Did you install from the source code or a pre-compiled bin? (from Marc Liyanage.?) I installed PHP from Marc Liyanage pre-compiled bin If so there is usually no php.ini file with it. If you are using Marc's binary package then create a blank php.ini file: sudo mkdir -p /usr/local/lib sudo touch /usr/local/lib/php.ini Done ! Then you will have to add the appropriate configuration options to it. You can find an example php.ini file in the php source code file php4.2.3.tar.gz or whatever it is called. There will be a file called php.ini-recommended, you can copy the options in this file and use it, or the php.ini-dist file. I would like to install eXtremePHP - Installation document says : 1. Uncompress the contents of the archive to the document root of your web server. 2. You will have to auto prepend the xpl/common/common.inc.php file. This can be done of one of two ways. a) In the PHP.INI, find the field that says "auto_prepend_file" and change it to look like below on Unix auto_prepend_file = "/www/xpl/common/common.inc.php" where "www" is the document root of the webserver. b) If you are running Apache, create an .htaccess file under your document root directory and enter the following line and save the file. php_value auto_prepend_file /www/xpl/common/common.inc.php My document root is : /Users/pierreva/Sites Could you tell me what I have to change in php.ini-recommmended ? Thanks for your help. Pierre Vaudrey email [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] search
There's no php.sql, so I'll put it here. I'm trying to do a search from mysql database like this: if (!$inquiry = mysql_query("select id,link,heading,desc from links where heading like '%$entry%' or desc like '%$entry%' or keyword like '%$entry%'",$connection)){ print "Search was unsuccesful!"; } else{ while ($link = mysql_fetch_row($inquiry)){ print "" . $link[2]; print " " . $link[3] . "" ; } } But everytime I get all the possible entries, even though I'm sure it doesn't match. Thanks for your answers. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How do I check if a checkbox has been checked?
The syntax as I have used it is (not the cleanest or best way to do it by a long run - but it works): > this will have the checkbox be checked by default, also you can do what ever other things you need to do based on the on/off conditions. On Fri, 1 Nov 2002 10:47:43 -0500 "DonPro" <[EMAIL PROTECTED]> wrote: > Hi, > > I have a form with a checkbox like so: > > > When I submit, the value is always shown as "ON" regardless of whether > I've checked the checkbox or not. So this begets the question, How > can I code my PHP form processing script to determine whether the > checkbox was checked? > > Thanks, > Don > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Tom Woody Systems Administrator NationWide Flood Research, Inc. phone: 214-631-0400 x209 fax: 214-631-0800 Don't throw your computer out the window, throw the Windows out of your computer! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php4 Mac OSX
Did you install from the source code or a pre-compiled bin? (from Marc Liyanage.?) I installed PHP from Marc Liyanage pre-compiled bin If so there is usually no php.ini file with it. If you are using Marc's binary package then create a blank php.ini file: sudo mkdir -p /usr/local/lib sudo touch /usr/local/lib/php.ini Done ! Then you will have to add the appropriate configuration options to it. You can find an example php.ini file in the php source code file php4.2.3.tar.gz or whatever it is called. There will be a file called php.ini-recommended, you can copy the options in this file and use it, or the php.ini-dist file. I would like to install eXtremePHP - Installation document says : 1. Uncompress the contents of the archive to the document root of your web server. 2. You will have to auto prepend the xpl/common/common.inc.php file. This can be done of one of two ways. a) In the PHP.INI, find the field that says "auto_prepend_file" and change it to look like below on Unix auto_prepend_file = "/www/xpl/common/common.inc.php" where "www" is the document root of the webserver. b) If you are running Apache, create an .htaccess file under your document root directory and enter the following line and save the file. php_value auto_prepend_file /www/xpl/common/common.inc.php My document root is : /Users/pierreva/Sites Could you tell me what I have to change in php.ini-recommmended ? Thanks for your help. Pierre Vaudrey email [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How do I check if a checkbox has been checked?
if ( isset ( $_POST['shipper_save'] ) ) { echo ( "It's Checked" ); } Or use $_GET['shipper_save'] depending on your forum method. DonPro wrote: Hi, I have a form with a checkbox like so: When I submit, the value is always shown as "ON" regardless of whether I've checked the checkbox or not. So this begets the question, How can I code my PHP form processing script to determine whether the checkbox was checked? Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How do I check if a checkbox has been checked?
Hi, I have a form with a checkbox like so: When I submit, the value is always shown as "ON" regardless of whether I've checked the checkbox or not. So this begets the question, How can I code my PHP form processing script to determine whether the checkbox was checked? Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT - mysql question...
http://www.mysql.com/doc/en/Adding_users.html http://www.mysql.com/documentation/lists.html Kelly Meeks wrote: Sorry for the OT post, quick mysql question... I've found a couple of cool utilites that will create basic forms from a mysql table (add/edit/delete/search), which look they could save some time coding. However, I can't connect with them because my server is setup as localhost. I How do you create a user/host configuration that will allow you to connect to mysql other than via localhost? Thanks in advance, Kelly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] phpinfo
Hi all, I upgraded php and apache on my development machine (Windows XP). I am now running apache 1.3.27 and php 4.2.3. When I run a phpinfo(), I get my full list of stuff as expected, except that the apache version reported is 1.3.24. Has anyone else seen this. Have I done something wrong? Thanks David Russell IT Support Manager Barloworld Optimus (Pty) Ltd Tel: +2711 444-7250 Fax: +2711 444-7256 e-mail: [EMAIL PROTECTED] web: www.BarloworldOptimus.com smime.p7s Description: application/pkcs7-signature
[PHP] OT - mysql question...
Sorry for the OT post, quick mysql question... I've found a couple of cool utilites that will create basic forms from a mysql table (add/edit/delete/search), which look they could save some time coding. However, I can't connect with them because my server is setup as localhost. I How do you create a user/host configuration that will allow you to connect to mysql other than via localhost? Thanks in advance, Kelly
Re: [PHP] php4 Mac OSX
Did you install from the source code or a pre-compiled bin? (from Marc Liyanage.?) If so there is usually no php.ini file with it. If you are using Marc's binary package then create a blank php.ini file: sudo mkdir -p /usr/local/lib sudo touch /usr/local/lib/php.ini Then you will have to add the appropriate configuration options to it. You can find an example php.ini file in the php source code file php4.2.3.tar.gz or whatever it is called. There will be a file called php.ini-recommended, you can copy the options in this file and use it, or the php.ini-dist file. -- At 02:10 PM 11/1/2002 +0100, you wrote: I installed PHP 4.2.3 on Mac OS 10.2.1 , activating the PHP Module with the following commands on terminal window cd /etc/httpd" sudo apxs -e -a -n php4 libexec/httpd/libphp4.so" echo 'echo "AddType application/x-httpd-php .php" >> /etc/httpd/httpd.conf' | sudo sh -s It works fine and I would like install xpl library but I don't have a php.ini file . Could you help me to configure that ? Thanks for your help Pierre Vaudrey email [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Require_once problem
> -Original Message- > From: @ Darwin [mailto:superbus22@;attbi.com] > Sent: 01 November 2002 10:17 > > Well, the way I've read it is that if you use require within control > structures then all files are included, regardless of whether > the script > exits before it reaches its next if...elseif...else or case > statement. With > include that does not happen. So the general rule of thumb > would be to use > require() if you are not using it within these control > structures, and use > include() if you actually do need to use include statements > in your control > structures. That's how it *used* to work (somewhere back around 4.0.3, if memory serves). Now, the only difference is that the require versions will produce a fatal error if the file is not present, whereas the include versions will only generate a warning. Cheers! Mike Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Beckett Park Tel: extn 4730Fax: extn 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP & WebDAV
I'm using WebDAV in Apache 2, whenever I try to get an html file it works fine, but when I try to get a PHP file I get an error saying it cannot get filename.php. How come I can only get html files through WebDAV? Is there a way to change this? Thanks!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] String Expression for aplpahnumeric password
I need a string expression to verify an alpha numeric password. This is what i've come up with , however it does not work: elseif ( (!ereg ("^[a-zA-Z]+$", $password)) || (!ereg ("^[0-9]+$", $password))) can anybody help? Thanks in advance ADAM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help please.
On Friday 01 November 2002 22:04, Steve Jackson wrote: Please use a descriptive subject! > I have called it in another page by doing > get_shipping($shipping) > > And then > > Echo "test $shipping"; $returned_variable = get_shipping($shipping); echo $returned_variable; Or you can use the returned value directly: echo get_shipping($shipping); -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* The computing field is always in need of new cliches. -- Alan Perlis */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Get shipping problem continued!
Steve Jackson wrote: function get_shipping($shippingvar) { $conn = db_connect(); $query = mysql_query("SELECT MAX(receipt_id) from receipts"); $myrow = mysql_fetch_row($query); $shippingvar = $myrow["shipping"]; return $shippingvar; Check http://php.net/mysql_fetch_row ... specifically, mysql_fetch_row specifically is not mysql_fetch_array and the latter is probably what you want. You may also want some error checking in that function if you don't already have any. -- Michael T. Babcock C.T.O., FibreSpeed Ltd. http://www.fibrespeed.net/~mbabcock -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help please.
Hi, I have been trying for most of the day to pull a variable from a db. Finally managed that. Now I need to pass the result of a function to another function. How do you do this? I assume the following if called in another page can be used? function get_shipping($shipping) { $conn = db_connect(); $query = "SELECT * FROM receipts ORDER BY receipt_id DESC LIMIT 1"; $result = mysql_query($query); //$shippingvar = $myrow["shipping"]; if(mysql_numrows($result)>0) $shipping = mysql_result($result, 0, "shipping"); return $shipping; } If I return $shipping how can I display that? I have called it in another page by doing get_shipping($shipping) And then Echo "test $shipping"; But that doesn't work. Ideas where I'm going wrong this time? Steve Jackson Web Developer Viola Systems Ltd. http://www.violasystems.com [EMAIL PROTECTED] Mobile +358 50 343 5159 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how to avoid security thread when user able to press back button?
hi.. a newbie here a user fill up a form with username and password passing the form through 'POST' a session was created, a user login, a user logout + session destroy, but after that if the user press back button on the browser seems like the browser will repost the username and password back through the form so the user need not to reenter his/hers username/password how to avoid this problem? thx __ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Cookies
Hi, When the user logs in , i create a session with session varialbles, the session cookie is saved on clients computer. When i log off i say session_unset(); session_destroy(); setcookie(session_name()); The session in the tmp is deleted , but the cookie is still there , i know this because when i login , the same session id is used ! Why is that ? Thanks Shaun -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Cookies
Hi, When the user logs in , i create a session with session varialbles, the session cookie is saved on clients computer. When i log off i say session_unset(); session_destroy(); setcookie(session_name()); The session in the tmp is deleted , but the cookie is still there , i know this because when i login , the same session id is used ! Why is that ? Thanks Shaun -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php4 Mac OSX
I installed PHP 4.2.3 on Mac OS 10.2.1 , activating the PHP Module with the following commands on terminal window cd /etc/httpd" sudo apxs -e -a -n php4 libexec/httpd/libphp4.so" echo 'echo "AddType application/x-httpd-php .php" >> /etc/httpd/httpd.conf' | sudo sh -s It works fine and I would like install xpl library but I don't have a php.ini file . Could you help me to configure that ? Thanks for your help Pierre Vaudrey email [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Get shipping problem continued!
Sorry to keep on at you guys but this is really getting to me now! I want to pull a shipping quantity (the very last record in the Db) into a page and am still having problems. Tried looping through the records and I can't seem to get it to return anything: function get_shipping($shippingvar) { $conn = db_connect(); $query = mysql_query("SELECT MAX(receipt_id) from receipts"); $myrow = mysql_fetch_row($query); $shippingvar = $myrow["shipping"]; return $shippingvar; } Surely it can't be much more complicated than that? Help please. Smoked 10 fags already! Steve Jackson Web Developer Viola Systems Ltd. http://www.violasystems.com [EMAIL PROTECTED] Mobile +358 50 343 5159 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Serverside script
> I need to write a stand alone script runing on a server that checks and > updates a database every week, is this posable and if so > could some one direct me to a tutorial or to any info on doing this. Yes, it's possible. Look into cron to run your script on a schedule. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Serverside script
Are you familiar with PHP, or are you more worried about how to "call" and execute the script from the server itself on a weekly basis ( cron job) ? On Fri, 2002-11-01 at 14:41, DavÃð Ãrn Jóhannsson wrote: > I need to write a stand alone script runing on a server that checks and > updates a database every week, is this posable and if so > could some one direct me to a tutorial or to any info on doing this. > > Regards, David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Serverside script
I need to write a stand alone script runing on a server that checks and updates a database every week, is this posable and if so could some one direct me to a tutorial or to any info on doing this. Regards, David
[PHP] Need help with regexp for preg_split
Hi, I need some help with a regexp for preg_split. I want the string str = "this is 'a string that' contains phrases"; to be split into: arr[] = "this"; arr[] = "is"; arr[] = "a string that"; arr[] = "contains"; arr[] = "phrases"; but I'm having some trouble coming up a good regexp that would do the job. Any regexp gurus out there who can point me in the right direction? Thanks, David Brännlund -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apache Installation Problem
On Friday 01 November 2002 19:11, Ramesh Pillai wrote: > Hai! > I had downloaded Apache2.0.43 from apache site and > installed on my linux7.1 box, the configure/make .make > install went smooth, after that I started Apache > server. > > Now my problem is when I tried to access localhost > through any browser(ie http://localhost) its saying > host not found(or unknownhost), Why is it so? > and when try to restart Apache it shrows follwing > error > [ address already in use make_sock:coudnt bind to > address 127.0.0.1:80 no listening sockets available, > shutting down, Unable to open logs] Probably something is already using 127.0.0.1:80. As root, run 'netstat -lp' to find out what process it is. > Any one please help me out. Since I didnt find any > general mailing list for Apache installation I am > asking in this mailing Please excuse me. How hard did you look? Going to www.apache.org or httpd.apache.org will display a link to "mailing lists". -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* He is the MELBA-BEING ... the ANGEL CAKE ... XEROX him ... XEROX him -- */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Simple Problems taking me hours to solve!
Well, OK I think your problem is here: You sql *could* and probably does return more than one row. Yet, your code as it is now will only return the first row. You need to cycle through the result rows with a while statement, like this: while ($myrow = mysql_fetch_assoc($result)) { $my_id = $myrow["shipping"]; echo $my_id; echo ; } Now, this will probably be a bit difficult to incorporate "as is" into your function, as you will have multiple "returns", and each will override the previous value, so you'll end up with only the last row's id.. Some pointers: Use something like $result = mysql_query($sql) instead of saying $shipping = mysql_query() It will work the same, but it is easier to read throuhgh your code and see where you actually invoke a result, and where you are simply assigning a value to a variable ( which you are NOT doing with this command, $result only contains the result set identifier of the query, not the actual result, that's why you pass the $result to a mysql_fetch_assoc(), only then do you have any kind of "workable" data) Next, use mysql_fetch_assoc(), instead of ...fetch_array() Difference is: array => [0,pointer1,value1,1,pointer2,value2,2,pointer3,value3.] associative array => [pointer1,value1,pointer2,value2,pointer3,value3 ] So, they hold the same data, but assoc's are "smaller" as they don't have the numerical pointer, which you don't use anyway. When you do the $my_id = $myrow["shipping"]; what you are doing is retrieving the "shipping-th" value from the array, and you would never do a $my_id = $myrow[2]; for instance... So, assoc's are generally better to use. You can safely change it in your code, the previous errors you got was not because of this, it was simply because your result set was empty, and mysql_fetch_array OR mysql_fetch_assoc would have given the error... I would suggest you try to accomplish your goal without a function at this point as to allow you to understand what you are trying to do better. You will have to either build a loop into your function, or call your function from within a loop, and both can be quite difficult to grasp initially... On Fri, 2002-11-01 at 12:24, Steve Jackson wrote: > Ok thanks. > Still having problems though. > This is the function now: > function get_shipping_cost() > { > //Get order ID from DB to pass to receipt. > $conn = db_connect(); > //$query = "select * from receipts order by receipt_id DESC > LIMIT 0,1"; > $query = "select shipping from receipts order by receipt_id DESC > LIMIT 0,1"; > $shipping = mysql_query($query); > $myrow = mysql_fetch_array($shipping); > $my_id = $myrow["shipping"]; > $shipping_cost = $my_id; > return $shipping_cost; > } > Still zero DB results. There is definitely a connection as DB_connect() > works. > > > No!!! > > Why are you doing this? > > $my_id = $myrow["shipping"]; > > > $my_id = $shipping_cost;< > > > return $shipping_cost; > > > > $my_id already contains the value you want, just return > > $my_id, the reason it doesn't work now, is because > > $shipping_cost has no value. If you really want to have the > > value stored in $shipping_cost, you must > > do: > > $shipping_cost = $my_id. > > > > You see, $my_id has a value in it the moment you say: > > $my_id = $my_row["shipping"]; > > but when you do $my_id = $shipping_cost, you are overwriting > > the value inside $my_id with $shipping_cost, which is like > > saying $my_id = 0; > > > > > > > > > > On Fri, 2002-11-01 at 11:07, Steve Jackson wrote: > > > Okay. Now I have this and it still returns nothing. > > > > > > function get_shipping_cost($shipping_cost) > > > { > > > //Get order ID from DB to pass to receipt. > > > $conn = db_connect(); > > > $query = "select shipping from receipts order by > > receipt_id DESC > > > LIMIT 0,1"; > > > $shipping = mysql_query($query); > > > $myrow = mysql_fetch_array($shipping); > > > $my_id = $myrow["shipping"]; > > > $my_id = $shipping_cost; > > > return $shipping_cost; > > > } > > > > > > And I still get one added to the variable in this function > > which pulls > > > orderid from the same table. > > > > > > function get_order_id_receipt($orderid) > > > { > > > //Get order ID from DB to pass to receipt. > > > $conn = db_connect(); > > > $query = "select orderid from receipts order by > > receipt_id DESC LIMIT > > > 0,1"; > > > $order = mysql_query($query); > > > $myrow = mysql_fetch_array($order); > > > $my_id = $myrow["orderid"]; > > > $my_id = $orderid; > > > return $orderid; > > > } > > > > > > Well and truly confused! > > > > > > Steve Jackson > > > Web Developer > > > Viola Systems Ltd. > > > http://www.violasystems.com > > > [EMAIL PROTECTED] > > > Mobile +358 50 343 5159 > > > > > > > > > > > > > -Original Message- > > > > From: Petre Agenbag [mailto:internet@;vsa.co.za] > > > > Sent:
Re: [PHP] Array solution...
On Friday 01 November 2002 19:22, Davíð Örn Jóhannsson wrote: > I have two arrays and I have complete list of numbers in one of them, > lets call it $complete[] > and another that has some values of the complete one, lets call that one > $part[], now if I want to > return an array with all the values that are in $complete[] but not in > $part[], how would I do that? array_diff() -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* "scanf is tough" -- programmer Barbie... - Al Viro on #kernelnewbies */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php