|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help_at_lists.php.net
Date: Sat Sep 28 2002 - 10:34:19 CDT
php-general Digest 28 Sep 2002 15:34:19 -0000 Issue 1612
Topics (messages 117916 through 117955):
.htaccess to change browscap setting
117916 by: SpamSucks86
Re: Assigning data to fields
117917 by: Ken
field size for common data
117918 by: Pablo Oliva
117920 by: Justin French
counting words in a string
117919 by: rdkurth.starband.net
117921 by: Justin French
117923 by: rdkurth.starband.net
Re: 4.0.2 => 4.2.3, form vars are empty?
117922 by: Justin French
117929 by: Pekka Saarinen
Solaris8/intel PHP binaries .. PLEASE !!
117924 by: PHPio
117925 by: PHPio
Header Content x-tar
117926 by: Sascha Braun
117928 by: Sascha Braun
Posting a value to one form to another
117927 by: Uma Shankari T.
117932 by: debbie_dyer
Multiple Domains in cookie?
117930 by: Tony Harrison
117931 by: debbie_dyer
117934 by: Julien Bonastre
117942 by: . Saif .
117943 by: . Edwin
117953 by: Chris Shiflett
117954 by: Gareth Hastings
117955 by: Gareth Hastings
regexp help wanted
117933 by: Thomas Seifert
Update identical table
117935 by: Radu Manole
117944 by: Marek Kilimajer
Re: where's waldo
117936 by: Kenneth Love
117940 by: . Edwin
PHP and MSSQL Problem
117937 by: Christopher J. Crane
117939 by: . Edwin
117946 by: Christopher J. Crane
Re: Carriage returns don't display in HTML
117938 by: Christopher J. Crane
AS A MATTER OF INTEREST
117941 by: Georgie Casey
export data to text file
117945 by: Diana Castillo
headers?
117947 by: cleaner
117948 by: debbie_dyer
117949 by: cleaner
unexpected T_STRING error
117950 by: Gary
117951 by: Jonathan Rosenberg
117952 by: Matt
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
AllowOverride is set to All in apache, and when I put this in a
.htaccess file, it changes the value:
<IfModule mod_php4.c>
php_value upload_max_filesize "7500000"
</IfModule>
however, when I put "php_value browscap "/home/user/php/browscap.ini" in
there, it doesn't change the setting.
Is browscap not changeable from .htaccess, or am I doing something
wrong? Thanks for the help!
attached mail follows:
Thanks John! That was it!
"John W. Holmes" <holmes072000
charter.net> wrote in message
news:000001c26698$1abbc290$7c02a8c0
coconut...
> > I used the examples you have lead me to and I get this error? I am
> > stumped?
> >
> > mysql_fetch_array(): supplied argument is not a valid MySQL result
> > resource
> > in /home/pay.php on line 51
>
> You're query probably failed. Look at mysql_error().
>
> www.php.net/mysql_error
>
> ---John Holmes...
>
>
attached mail follows:
What amount of chars is reasonable and should I allow for each of the
following fields in a database:
company name: 30 chars
address/street: 30 chars
city: 30 chars
???? Thanks.
attached mail follows:
I'm no expert on MySQL field types, but I'd be going for a varchar field of
50-ish (maybe more???)... the reason is that (from what I understand)
varchar fields only take up as much room as the content, plus one or two
bytes, so making them 50 vs 30 will offer no advantage, but may become a
disadvantage down the track.
It'd be worth checking the MySQL manual though.
Justin
on 28/09/02 3:24 PM, Pablo Oliva (poliva
cox.net) wrote:
> What amount of chars is reasonable and should I allow for each of the
> following fields in a database:
>
> company name: 30 chars
> address/street: 30 chars
> city: 30 chars
>
> ???? Thanks.
>
attached mail follows:
I need to count how many times the word AVAILABLE appears in a string
like this
$string ="AVAILABLE More Info AVAILABLE More Info";
some time the string looks like this
$string ="UNAVAILABLE More Info AVAILABLE More Info";
or
$string ="AVAILABLE More Info UNAVAILABLE More Info";
when I use
$srch="AVAILABLE";
$count=substr_count(strtolower($string), strtolower($srch));
echo $count;
it puts the count a 2 even when one of the words is UNAVAILABLE
how can I make it only count AVAILABLE and not UNAVAILABLE or visa
verse
-- Best regards, rdkurth mailto:rdkurthstarband.net
attached mail follows:
if this is your SPECIFIC problem, putting a space at the beginning of $srch will help, eliminating XAVAILABLE... but this will cause a problem with the word AVAILABLE appearing at the start of the string, so temporarily put a space at the start of the string:
<? // UNTESTED $count = substr_count(' '.strtolower($string), strtolower(' '.$srch)); echo $count; ?>
this won't help if there are newlines and other white space instead of spaces, and won't help (so far) for a different set of circumstances...
it would be nice to extend substr_count() could be extended to have an option.
Justin
on 28/09/02 3:41 PM, rdkurth
starband.net (rdkurth
starband.net) wrote:
> > I need to count how many times the word AVAILABLE appears in a string > like this > $string ="AVAILABLE More Info AVAILABLE More Info"; > some time the string looks like this > $string ="UNAVAILABLE More Info AVAILABLE More Info"; > or > $string ="AVAILABLE More Info UNAVAILABLE More Info"; > when I use > $srch="AVAILABLE"; > $count=substr_count(strtolower($string), strtolower($srch)); > echo $count; > it puts the count a 2 even when one of the words is UNAVAILABLE > how can I make it only count AVAILABLE and not UNAVAILABLE or visa > verse
attached mail follows:
Hello Justin,
That worked perfect but I have one more problem I need to know if one of the word is UNAVAILABLE I need to know if it is the first one or the second one. I don't know if there is any way to do this. 1st 2nd $string ="UNAVAILABLE AVAILABLE More Info"; 1st 2nd $string ="AVAILABLE More Info UNAVAILABLE "; Friday, September 27, 2002, 11:22:42 PM, you wrote:
JF> if this is your SPECIFIC problem, putting a space at the beginning of $srch JF> will help, eliminating XAVAILABLE... but this will cause a problem with the JF> word AVAILABLE appearing at the start of the string, so temporarily put a JF> space at the start of the string:
JF> <? JF> // UNTESTED JF> $count = substr_count(' '.strtolower($string), strtolower(' '.$srch)); JF> echo $count; ?>>
JF> this won't help if there are newlines and other white space instead of JF> spaces, and won't help (so far) for a different set of circumstances...
JF> it would be nice to extend substr_count() could be extended to have an JF> option.
JF> Justin
JF> on 28/09/02 3:41 PM, rdkurth
starband.net (rdkurth
starband.net) wrote:
>> >> I need to count how many times the word AVAILABLE appears in a string >> like this >> $string ="AVAILABLE More Info AVAILABLE More Info"; >> some time the string looks like this >> $string ="UNAVAILABLE More Info AVAILABLE More Info"; >> or >> $string ="AVAILABLE More Info UNAVAILABLE More Info"; >> when I use >> $srch="AVAILABLE"; >> $count=substr_count(strtolower($string), strtolower($srch)); >> echo $count; >> it puts the count a 2 even when one of the words is UNAVAILABLE >> how can I make it only count AVAILABLE and not UNAVAILABLE or visa >> verse
-- Best regards, rdkurth mailto:rdkurthstarband.net
attached mail follows:
turn register globals ON on php.ini (they now default to off), then read the 1000's of threads about register globals, missing/empty form variables, super global arrays, etc etc in the archives.
post vars are found in $_POST, session in $_SESSION, get in $_GET, etc etc
Justin French
on 28/09/02 12:47 AM, Qmail List (edahnke
earthlink.net) wrote:
> Hello List, > > I'm putting a php app that has been off-line for about 18 months back > on-line. During my absence from php I had heard about some security issues, > so figured I'd try the latest 4.2.3 release. > > Sessions and the DB are fine, but GET/POST vars are continually empty. I > mean a form submission from .html to .php (about the simplest thing > possible) the variables are not getting populated with their form values. > > Actually, phpinfo() does show the variables and their values if I throw it > in the .php file. But tailing the mysql log shows the following: > > SELECT * FROM users WHERE username='' AND password='' > > from this code. > > $query = mysql_query("SELECT * FROM users WHERE username='$username' AND > password='$password'"); > > > Regards, Thx >
attached mail follows:
At 9/27/2002, you wrote:
>Erwin <mailto:erwin
isiz.com> scribbled;
> >
> > Qmail List wrote:
> >> Hello List,
> >>
> >> I'm putting a php app that has been off-line for about 18 months back
> >> on-line. During my absence from php I had heard about some security
> >> issues, so figured I'd try the latest 4.2.3 release.
> >>
> >> Sessions and the DB are fine, but GET/POST vars are continually
> >> empty. I mean a form submission from .html to .php (about the
> >> simplest thing possible) the variables are not getting populated with
> >> their form values.
> >
> > Turn register_globals = On in the php.ini file...
> >
> > HTH
> > Erwin
>
>Or better yet, actually use the new $_GET[] and $_POST[] and leave that
>option off.
If you want to make the script compatible both with register globals=off and work with old AND new PHP versions, use $HTTP_POST_VARS and $HTTP_GET_VARS. Manual says they are deprecated, but there is no reason to presume they are removed from PHP any time soon. And if that day comes it's a few minutes task to search and replace all sources to convert them to $_GET and $_POST.
For commonly used $PHP_SELF I use this:
if (isset($_SERVER)) $PHP_SELF = $_SERVER['PHP_SELF']; $scriptname = basename($PHP_SELF);
This way users don't have to select from two source versions, one > PHP 4.1.0 and one < 4.1.0.
------------------------- Pekka Saarinen http://photography-on-the.net -------------------------
attached mail follows:
hi guys..
i've really seached alot for Soalris8/intel PHP binaries with no result.. i've tried also to do the compiling but every tme thier is a lots of errors.. so my only solution now is to find any pre-made binaries for Solaris8/i386 platforme
my question is : does it exist ?
thanx alot
attached mail follows:
hi guys..
i've really seached alot for Soalris8/intel PHP binaries with no result.. i've tried also to do the compiling but every tme thier is a lots of errors.. so my only solution now is to find any pre-made binaries for Solaris8/i386 platforme
my question is : does it exist ?
thanx alot
attached mail follows:
Hi Erwin,
and anyone else too.
It's me again. Maybe you are able to solve another problem for me.
The last Scriptcode I returned to you is working fine in IE6 and below (I believe), but a friend of mine tried to download a tared file with IE on MacOS. After checking this behaviour (I'm not really able to do a real check, because I'm not really able to understand what really happens with theese mime-types), I thought about to check it in Netscape too, and later Mozilla in Mac and Win, but it worked nowhere else than in IE 6 until now. In Netscape the download starts and a 10 KB file is safed to disk called download.php. In Mozilla the download starts and a file named picture_name.tar.php is safed. Size 10KB. The main picture Size is still 406 KB, packed as a Tar File it's 410 KB.
Thats the problem I need a solvation for.
I read something about theese headers on php.net. There was an workaround for the circumstace that the download would not start in IE but not in the other direction.
So please, if you know some more, please share it with me.
There are only two days left, to finish my project. So I'm really in trouble. After this projekt I will step up and start learning Linux and Apache configuration to the fullest.
So later I maybe will be an helpfull guy too.
Greetz
Sascha
PS.: Just for remembrance, the old working samplecode:
<!-- download.php --> <? Header('Content-Type: application/x-tar'); Header("Content-disposition: filename=".$_REQUEST['name'].".tar"); $dir = explode("/", $_REQUEST['image']); chdir('../images/'.$dir['0']."/".$dir['1']."/".$dir['2']."/"); $command = 'tar -cf - '.$_REQUEST['name'].'.jpg'; passthru($command); // Insert the download into order_db for statistic use include('global.inc.php'); $Query = "INSERT INTO order_db (id, user_id, image_id, date, time) "; $Query .= "VALUES ('','".$_REQUEST['customer_id']."','".$_REQUEST['image_id']."','".date('Y-m-d')."','".date('H:i:s')."')"; mysql_query($Query, $connect); ?>
attached mail follows:
Hi,
I think I could solve the problem on my own.
Thanks anyone for listening, thanks!
Sascha
attached mail follows:
Hello ,
<a href="Delay.php?hid=<?php echo $hid+1; ?>"><img src="Gif/nextque.gif" border="0"></a>
While clicking this link the $hid value get incremented and fetch the value from the database according to that..the same thing is working in linux platform and it is not working for the windows platform..the value is not getting increment..Can anyone please tell me how to go about with this..??
Regards, Uma
attached mail follows:
Must be a register globals problem again - php.ini (register_globals) - on for linux off for windows.
You should keep it switched off (or at least code for it being off) and use the superglobal arrays $_POST, $_GET etc
Debbie
----- Original Message -----
From: "Uma Shankari T." <umashankari
lantana.tenet.res.in>
To: "PHP" <php-general
lists.php.net>
Sent: Saturday, September 28, 2002 9:42 AM
Subject: [PHP] Posting a value to one form to another
> > Hello , > > <a href="Delay.php?hid=<?php echo $hid+1; ?>"><img src="Gif/nextque.gif" > border="0"></a> > > While clicking this link the $hid value get incremented and fetch the value > from the database according to that..the same thing is working in linux > platform and it is not working for the windows platform..the value is not > getting increment..Can anyone please tell me how to go about with this..?? > > Regards, > Uma > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
Is it possible to specify more than 1 domain in a cookie?
-----------------------------
tony
cool-palace.com
http://www.cool-palace.com
attached mail follows:
Is this because you have domain aliases?
Debbie
----- Original Message -----
From: "Tony Harrison" <tonyh21
tharrison21.fsnet.co.uk>
To: <php-general
lists.php.net>
Sent: Saturday, September 28, 2002 10:25 AM
Subject: [PHP] Multiple Domains in cookie?
> Is it possible to specify more than 1 domain in a cookie?
> -----------------------------
> tony
cool-palace.com
> http://www.cool-palace.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
attached mail follows:
GREAT Q!
I have been trying to play with my cookies for a while now for this same reason..
And to no avail..
It seems due to the structure of them and as long as the client (browser) sticks to the specifications you can only access a cookie belonging to that same host..
For example, I am starting up a large "network" site base but I wanted all the sites even though they have their own unique domain to be able to have a global member login system.. Catch is.. The only way for them to be able to login to one site and then be able to freely go to another completely diff. site also on our network they would still be logged in and hence they have this main ONE account that allows them access to all our network sites..
So I studied the workings behind Terra Lycos and found their trick quite easily.. Since they have basically this same concept they too had to find a solution..
And their's is very close to mine :) I had thought.. since it's HOST specific. Not the full domain.. that means that cookies only differentiate between: aaa.com and bbb.com..
But not: one.aaa.com or two.aaa.com
Therefore to create ONE cookie you set it's host for aaa.com and that way all your other site domains can be redirectors to the subdomain..
Ie.. if you have aaa.com as your main site and bbb.com and ccc.com just make those other two point to: bbb.aaa.com and ccc.aaa.com respectively..
Don't think it's "unpro" because that's exactly what Terra Lycos does..
For eg.. Checkout www.webmonkey.com (I'm sure many of you already know it) you soon see you'll be transported to: www.hotwired.lycos.com/webmonkey
This is because not only is webmonkey part of Terra lycos.. It's also under HotWired..
Then I thought.. No way.. that can't be their trick surely??
Yep.. Checkout all their other sites..
More examples: www.angelfire.com goes to angelfire.lycos.com and tripod.com goes to tripod.lycos.com
it seems this is the idea.. that way.. if they login.. just set some details (perhaps the SESSID so you can easily jsut reload the session on the other sites) on for example lycos.com as the domain and then all the subdomains can also use this freely..
Use your domains as redirectors and you get a sweet system.. :)
HIH ------oOo---------------oOo------
Julien Bonastre [The_RadiX]
The-Spectrum Network CEO
the_radix
the-spectrum.org
www.the-spectrum.org
------oOo---------------oOo------
----- Original Message -----
From: "Tony Harrison" <tonyh21
tharrison21.fsnet.co.uk>
To: <php-general
lists.php.net>
Sent: Saturday, September 28, 2002 7:25 PM
Subject: [PHP] Multiple Domains in cookie?
> Is it possible to specify more than 1 domain in a cookie?
> -----------------------------
> tony
cool-palace.com
> http://www.cool-palace.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
Please how can I unsubscribe .....
Regards Saif Yousif
No God except Allah Mohammed is profit of Allah
----- Original Message -----
From: "Julien Bonastre" <the_radix
the-spectrum.org>
To: "php-general
lists.php.n" <php-general
lists.php.net>; "Tony Harrison"
<tonyh21
tharrison21.fsnet.co.uk>
Sent: Saturday, September 28, 2002 3:21 PM
Subject: Re: [PHP] Multiple Domains in cookie?
> GREAT Q!
>
> I have been trying to play with my cookies for a while now for this same
> reason..
>
> And to no avail..
>
> It seems due to the structure of them and as long as the client (browser)
> sticks to the specifications you can only access a cookie belonging to
that
> same host..
>
> For example, I am starting up a large "network" site base but I wanted all
> the sites even though they have their own unique domain to be able to have
a
> global member login system.. Catch is.. The only way for them to be able
to
> login to one site and then be able to freely go to another completely
diff.
> site also on our network they would still be logged in and hence they have
> this main ONE account that allows them access to all our network sites..
>
> So I studied the workings behind Terra Lycos and found their trick quite
> easily.. Since they have basically this same concept they too had to find
a
> solution..
>
>
> And their's is very close to mine :) I had thought.. since it's HOST
> specific. Not the full domain.. that means that cookies only differentiate
> between: aaa.com and bbb.com..
>
> But not: one.aaa.com or two.aaa.com
>
> Therefore to create ONE cookie you set it's host for aaa.com and that way
> all your other site domains can be redirectors to the subdomain..
>
> Ie.. if you have aaa.com as your main site and bbb.com and ccc.com just
make
> those other two point to: bbb.aaa.com and ccc.aaa.com respectively..
>
> Don't think it's "unpro" because that's exactly what Terra Lycos does..
>
> For eg.. Checkout www.webmonkey.com (I'm sure many of you already know it)
> you soon see you'll be transported to: www.hotwired.lycos.com/webmonkey
>
> This is because not only is webmonkey part of Terra lycos.. It's also
under
> HotWired..
>
> Then I thought.. No way.. that can't be their trick surely??
>
> Yep.. Checkout all their other sites..
>
> More examples: www.angelfire.com goes to angelfire.lycos.com and
tripod.com
> goes to tripod.lycos.com
>
> it seems this is the idea.. that way.. if they login.. just set some
details
> (perhaps the SESSID so you can easily jsut reload the session on the other
> sites) on for example lycos.com as the domain and then all the subdomains
> can also use this freely..
>
> Use your domains as redirectors and you get a sweet system.. :)
>
>
> HIH
> ------oOo---------------oOo------
>
> Julien Bonastre [The_RadiX]
> The-Spectrum Network CEO
> the_radix
the-spectrum.org
> www.the-spectrum.org
>
> ------oOo---------------oOo------
> ----- Original Message -----
> From: "Tony Harrison" <tonyh21
tharrison21.fsnet.co.uk>
> To: <php-general
lists.php.net>
> Sent: Saturday, September 28, 2002 7:25 PM
> Subject: [PHP] Multiple Domains in cookie?
>
>
> > Is it possible to specify more than 1 domain in a cookie?
> > -----------------------------
> > tony
cool-palace.com
> > http://www.cool-palace.com
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
attached mail follows:
You mean from this list? Please take a loot at the end of this e-mail...
- E
On Thursday, July 27, 2000 11:36 AM
Saif
wrote:
> Please how can I unsubscribe ..... >
attached mail follows:
Nope, but you can have more than one host per domain (foo.php.net, bar.php.net, etc.).
Tony Harrison wrote:
>Is it possible to specify more than 1 domain in a cookie? >
attached mail follows:
or you just have something like
login.myhost.com
and all your sites use that to authenticate the user. In your php login script you can just see which site they came back from and then on a successful login you just redirect them back to that one. You wouldn't need to use cookies. You could make your own session ID. I thik owning say subdomain.mydomain.com and having it point to www.asite.com/mydomain/subdomain doesn't look as good. The PHP needed to do something like this would be fairly simple too.
-----Original Message-----
From: Julien Bonastre [mailto:the_radix
the-spectrum.org]
Sent: Saturday, September 28, 2002 8:22 AM
To: php-general
lists.php.n; Tony Harrison
Subject: Re: [PHP] Multiple Domains in cookie?
GREAT Q!
I have been trying to play with my cookies for a while now for this same reason..
And to no avail..
It seems due to the structure of them and as long as the client (browser) sticks to the specifications you can only access a cookie belonging to that same host..
For example, I am starting up a large "network" site base but I wanted all the sites even though they have their own unique domain to be able to have a global member login system.. Catch is.. The only way for them to be able to login to one site and then be able to freely go to another completely diff. site also on our network they would still be logged in and hence they have this main ONE account that allows them access to all our network sites..
So I studied the workings behind Terra Lycos and found their trick quite easily.. Since they have basically this same concept they too had to find a solution..
And their's is very close to mine :) I had thought.. since it's HOST specific. Not the full domain.. that means that cookies only differentiate between: aaa.com and bbb.com..
But not: one.aaa.com or two.aaa.com
Therefore to create ONE cookie you set it's host for aaa.com and that way all your other site domains can be redirectors to the subdomain..
Ie.. if you have aaa.com as your main site and bbb.com and ccc.com just make those other two point to: bbb.aaa.com and ccc.aaa.com respectively..
Don't think it's "unpro" because that's exactly what Terra Lycos does..
For eg.. Checkout www.webmonkey.com (I'm sure many of you already know it) you soon see you'll be transported to: www.hotwired.lycos.com/webmonkey
This is because not only is webmonkey part of Terra lycos.. It's also under HotWired..
Then I thought.. No way.. that can't be their trick surely??
Yep.. Checkout all their other sites..
More examples: www.angelfire.com goes to angelfire.lycos.com and tripod.com goes to tripod.lycos.com
it seems this is the idea.. that way.. if they login.. just set some details (perhaps the SESSID so you can easily jsut reload the session on the other sites) on for example lycos.com as the domain and then all the subdomains can also use this freely..
Use your domains as redirectors and you get a sweet system.. :)
HIH ------oOo---------------oOo------
Julien Bonastre [The_RadiX]
The-Spectrum Network CEO
the_radix
the-spectrum.org
www.the-spectrum.org
------oOo---------------oOo------
----- Original Message -----
From: "Tony Harrison" <tonyh21
tharrison21.fsnet.co.uk>
To: <php-general
lists.php.net>
Sent: Saturday, September 28, 2002 7:25 PM
Subject: [PHP] Multiple Domains in cookie?
> Is it possible to specify more than 1 domain in a cookie?
> -----------------------------
> tony
cool-palace.com
> http://www.cool-palace.com
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
Oops, sorry, forgot to turn off read receipt before I posted.
attached mail follows:
Hi folks,
I just got nuts by trying to find a regexp for use with preg_replace to achive the following:
remove all <br /> which are in the text between a <pre> and a </pre> Tag.
So, I want no br between these tags.
Any ideas or quick help?
thanks in advance,
Thomas
attached mail follows:
Hi guys,
I have 2 identical tables called "tmp_data" and "data". (on the same mysql database). What would be the simple and more convenient way to update table "data" with a row from table "tmp_data". (something like select * from tmp_data and than update data ...).
Thanks a lot, Radu
attached mail follows:
INSERT INTO data SELECT * FROM tmp_data WHERE condition_definition
Radu Manole wrote:
>Hi guys, > >I have 2 identical tables called "tmp_data" and "data". (on the same mysql database). >What would be the simple and more convenient way to update table "data" with a row from table "tmp_data". >(something like select * from tmp_data and than update data ...). > >Thanks a lot, >Radu > > >
attached mail follows:
no no, i understand. really, what i was getting at, i guess was that this isn't really meant to be developed for mass distribution. more for a class.
"
Edwin" <copperwalls
hotmail.com> wrote in message
news:20020927221205.39732.qmail
pb1.pair.com...
> Well, I didn't really mean to imply anything about people's honesty and so
> forth...
>
> I just wanted to say that validating (anything) on the client side is not
> normally a good (and reliable) idea. Of course, as always mentioned,
> validation on the server side is always better.
>
> - E
>
>
> "Kenneth Love" <kennethlove
onewingedangel.com> wrote in message
> news:20020925223838.46117.qmail
pb1.pair.com...
> > about the peeking at the code...
> > yes, you could, unless the images were coded somehow. perhaps just
> numbers,
> > not names. after a few tries they'd find "waldo" easily enough, but not
at
> > first.
> >
> > and besides. i'd like to give people credit for being more honest than
> that.
> >
> >
> > "
Edwin" <copperwalls
hotmail.com> wrote in message
> > news:OE20NyFSXOktnHNHbHv0000325c
hotmail.com...
> > > True. Perhaps.
> > >
> > > But, I think, you can actually do something like that WITH php. Say
> > > PHP+Flash or PHP+Javascript...
> > >
> > > Of course, if you're able to do something like this just by using
> > > PHP+Javascript (and HTML only), most probably, you can just take a
peek
> at
> > > the code and find out where "waldo" is... ;)
> > >
> > > - E
> > >
> > > On Thursday, September 26, 2002 12:12 AM
> > > Marek Kilimajer wrote:
> > >
> > > > This is for java, javascript, or flash, not much to do for php.
> > > >
> > > > Kenneth Love wrote:
> > > >
> > > > >hi all.
> > > > >
> > > > >i'm interested in creating a php game that generates a page of
random
> > > (ish)
> > > > >images, one of which is waldo (or the like). when the player clicks
> on
> > > > >waldo, they're taken to the next, slightly harder level.
> > > > >
> > > > >anyone think that sounds fun?
> > > > >any pointers, tips, advice, criticisms?
> > > > >
> > > > >--
> > > > >->-> http://kennethlove.onewingedangel.com <-<-
> > > > >
> > > > >
> >
> >
>
attached mail follows:
I see.
Now, that sounds a lot of fun! :)
Anyway, enjoy!
- E
"Kenneth Love" <kennethlove
onewingedangel.com> wrote in message
news:20020928125417.24331.qmail
pb1.pair.com...
> no no, i understand.
> really, what i was getting at, i guess was that this isn't really meant to
> be developed for mass distribution. more for a class.
>
>
> "
Edwin" <copperwalls
hotmail.com> wrote in message
> news:20020927221205.39732.qmail
pb1.pair.com...
> > Well, I didn't really mean to imply anything about people's honesty and
so
> > forth...
> >
> > I just wanted to say that validating (anything) on the client side is
not
> > normally a good (and reliable) idea. Of course, as always mentioned,
> > validation on the server side is always better.
> >
> > - E
> >
> >
> > "Kenneth Love" <kennethlove
onewingedangel.com> wrote in message
> > news:20020925223838.46117.qmail
pb1.pair.com...
> > > about the peeking at the code...
> > > yes, you could, unless the images were coded somehow. perhaps just
> > numbers,
> > > not names. after a few tries they'd find "waldo" easily enough, but
not
> at
> > > first.
> > >
> > > and besides. i'd like to give people credit for being more honest than
> > that.
> > >
> > >
> > > "
Edwin" <copperwalls
hotmail.com> wrote in message
> > > news:OE20NyFSXOktnHNHbHv0000325c
hotmail.com...
> > > > True. Perhaps.
> > > >
> > > > But, I think, you can actually do something like that WITH php. Say
> > > > PHP+Flash or PHP+Javascript...
> > > >
> > > > Of course, if you're able to do something like this just by using
> > > > PHP+Javascript (and HTML only), most probably, you can just take a
> peek
> > at
> > > > the code and find out where "waldo" is... ;)
> > > >
> > > > - E
> > > >
> > > > On Thursday, September 26, 2002 12:12 AM
> > > > Marek Kilimajer wrote:
> > > >
> > > > > This is for java, javascript, or flash, not much to do for php.
> > > > >
> > > > > Kenneth Love wrote:
> > > > >
> > > > > >hi all.
> > > > > >
> > > > > >i'm interested in creating a php game that generates a page of
> random
> > > > (ish)
> > > > > >images, one of which is waldo (or the like). when the player
clicks
> > on
> > > > > >waldo, they're taken to the next, slightly harder level.
> > > > > >
> > > > > >anyone think that sounds fun?
> > > > > >any pointers, tips, advice, criticisms?
> > > > > >
> > > > > >--
> > > > > >->-> http://kennethlove.onewingedangel.com <-<-
> > > > > >
> > > > > >
> > >
> > >
> >
>
>
attached mail follows:
I wrote a simple script to return data from a query. The database is MS SQL and the field I am looking to return is a VARCHAR(5000). Everything seems to work except the data returned is not the whole field it is shortened. It only returns a portion of the field.
Here is the field: 99 Services, Inc. is a full service IT systems integrator and general contractor specializing in cradle to grave technology planning with strong emphasis on LAN/WAN design (routing and switching) and deployment of high speed, fully redundant, high availability networks. 99 Services also provides Internet/Intranet/Website/email systems design. The company services small to medium sized businesses as well as home offices.
Here is what is returned by the PHP: 99 Services, Inc. is a full service IT systems integrator and general contractor specializing in cradle to grave technology planning with strong emphasis on LAN/WAN design (routing and switching) and deployment of high speed, fully redundant, high availab
Here is the script: <?PHP /* CTC Profile about Company */ /* ========================= */ $HostName = "DAS54-DAL-SBC"; $UserName = "*******"; //changed for security $Password = "********"; //changed for security $DBName = "DirectoryDB";
MSSQL_CONNECT($HostName,$UserName,$Password); mssql_select_db($DBName) or DIE("Table unavailable");
$ProfileResults = MSSQL_QUERY("SELECT * FROM CompanyProfile WHERE CompanyID = '$ID'"); $RowCount = MSSQL_NUM_ROWS($ProfileResults);
if($RowCount != 0) { for ($i = 0; $Field2 = MSSQL_FETCH_ARRAY($ProfileResults); ++$i) { $Profile = $Field2["Profile"]; echo $Field2["CompanyID"] . "<br>" . $Field2["Profile"] . "<br><br>To read more information about this "; echo "company, visit their website\n"; } } else { print "This company, $sym is not listed in the CTC Directory."; }
MSSQL_CLOSE(); ?>
attached mail follows:
Hello,
...just wondering...
Are you sure VARCHAR in MS SQL can handle 5000? Should be 255 only? (I'm not really familiar with MS SQL but you can count the number of characters returned by php...)
- E
"Christopher J. Crane" <ccrane
inxdesign.com> wrote in message
news:20020928131633.31875.qmail
pb1.pair.com...
> I wrote a simple script to return data from a query. The database is MS
SQL
> and the field I am looking to return is a VARCHAR(5000). Everything seems
to
> work except the data returned is not the whole field it is shortened. It
> only returns a portion of the field.
>
> Here is the field:
> 99 Services, Inc. is a full service IT systems integrator and general
> contractor specializing in cradle to grave technology planning with strong
> emphasis on LAN/WAN design (routing and switching) and deployment of high
> speed, fully redundant, high availability networks. 99 Services also
> provides Internet/Intranet/Website/email systems design. The company
> services small to medium sized businesses as well as home offices.
>
> Here is what is returned by the PHP:
> 99 Services, Inc. is a full service IT systems integrator and general
> contractor specializing in cradle to grave technology planning with strong
> emphasis on LAN/WAN design (routing and switching) and deployment of high
> speed, fully redundant, high availab
>
>
> Here is the script:
> <?PHP
> /* CTC Profile about Company */
> /* ========================= */
> $HostName = "DAS54-DAL-SBC";
> $UserName = "*******"; //changed for security
> $Password = "********"; //changed for security
> $DBName = "DirectoryDB";
>
> MSSQL_CONNECT($HostName,$UserName,$Password);
> mssql_select_db($DBName) or DIE("Table unavailable");
>
> $ProfileResults = MSSQL_QUERY("SELECT * FROM CompanyProfile WHERE
> CompanyID = '$ID'");
> $RowCount = MSSQL_NUM_ROWS($ProfileResults);
>
> if($RowCount != 0) {
> for ($i = 0; $Field2 = MSSQL_FETCH_ARRAY($ProfileResults); ++$i) {
> $Profile = $Field2["Profile"];
> echo $Field2["CompanyID"] . "<br>" . $Field2["Profile"] .
> "<br><br>To read more information about this ";
> echo "company, visit their website\n";
> }
> }
> else { print "This company, $sym is not listed in the CTC Directory."; }
>
> MSSQL_CLOSE();
> ?>
>
>
attached mail follows:
Thanks for some help. I will look into that. This is not my database so I am
not sure how or why it was setup this way. There is more than 255 characters
in each of these fields.
"
Edwin" <copperwalls
hotmail.com> wrote in message
news:20020928132949.39159.qmail
pb1.pair.com...
> Hello,
>
> ...just wondering...
>
> Are you sure VARCHAR in MS SQL can handle 5000? Should be 255 only? (I'm
not
> really familiar with MS SQL but you can count the number of characters
> returned by php...)
>
> - E
>
>
> "Christopher J. Crane" <ccrane
inxdesign.com> wrote in message
> news:20020928131633.31875.qmail
pb1.pair.com...
> > I wrote a simple script to return data from a query. The database is MS
> SQL
> > and the field I am looking to return is a VARCHAR(5000). Everything
seems
> to
> > work except the data returned is not the whole field it is shortened. It
> > only returns a portion of the field.
> >
> > Here is the field:
> > 99 Services, Inc. is a full service IT systems integrator and general
> > contractor specializing in cradle to grave technology planning with
strong
> > emphasis on LAN/WAN design (routing and switching) and deployment of
high
> > speed, fully redundant, high availability networks. 99 Services also
> > provides Internet/Intranet/Website/email systems design. The company
> > services small to medium sized businesses as well as home offices.
> >
> > Here is what is returned by the PHP:
> > 99 Services, Inc. is a full service IT systems integrator and general
> > contractor specializing in cradle to grave technology planning with
strong
> > emphasis on LAN/WAN design (routing and switching) and deployment of
high
> > speed, fully redundant, high availab
> >
> >
> > Here is the script:
> > <?PHP
> > /* CTC Profile about Company */
> > /* ========================= */
> > $HostName = "DAS54-DAL-SBC";
> > $UserName = "*******"; //changed for security
> > $Password = "********"; //changed for security
> > $DBName = "DirectoryDB";
> >
> > MSSQL_CONNECT($HostName,$UserName,$Password);
> > mssql_select_db($DBName) or DIE("Table unavailable");
> >
> > $ProfileResults = MSSQL_QUERY("SELECT * FROM CompanyProfile WHERE
> > CompanyID = '$ID'");
> > $RowCount = MSSQL_NUM_ROWS($ProfileResults);
> >
> > if($RowCount != 0) {
> > for ($i = 0; $Field2 = MSSQL_FETCH_ARRAY($ProfileResults); ++$i) {
> > $Profile = $Field2["Profile"];
> > echo $Field2["CompanyID"] . "<br>" . $Field2["Profile"] .
> > "<br><br>To read more information about this ";
> > echo "company, visit their website\n";
> > }
> > }
> > else { print "This company, $sym is not listed in the CTC
Directory."; }
> >
> > MSSQL_CLOSE();
> > ?>
> >
> >
>
attached mail follows:
On thing you could do is output <pre>tags around the text you want to
display. The <pre><> tags keeps simple formatting like tabs and new line
characters.
"Shane" <shane
delaplaine.com> wrote in message
news:CD44D03584C7A249A3F86891B24EB8EA41A93A
exch003intermedia.net...
Greetings folks.
I need my carriage returns to show up in my HTML output from my text form field.
There is a JavaScript function that will convert carriage return to <BR> tags, but is there a PHP function that will add <BR> or <P> tags to a text form field in place of the carriage returns a user might add.
Thanks in advance! -NorthBayShane
attached mail follows:
Can you fake IP addresses and referer addresses with the PHP header command. I want to contact a remote php script and not have my page as the referer or ip address. Is this possible with sockets or even just fopen()?
-- Regards, Georgie Casey webmasterfilmfind.tv
*************************** http://www.filmfind.tv Online Film Production Directory ***************************
attached mail follows:
Hi, I want to export some fields on a regular basis from a table to a text file, preferable to the users local computer. I tried writing to a file with fopen but I get "permission denied" when I try to open it for writing. What is the best solution? Thanks, Diana
-- See my web page: http://www.netrox.net/%7Ecastillo/
attached mail follows:
Hi all..
Got this script to verify a login against a mysql-databas with several checking for type errors etc.
When I wanna login people, I include a file with all my functions ('functions.php') and I a function verify is called upon.
the function returns false if user entered wrong user/pass, And if they enter correct info I want them to be redirected to another page.. hm. the headers cant be added (u heard that before?) cuz my login form already started output...
function verify($user,$pass){ // some sql queries here...
if(count($number)>0){ return false; }else{ header("Location:admin.php"); }
}
I would like som help using headers in a correct way, or be able to use another way...
reg:cleaner
attached mail follows:
It's giving you this error because you are sending the headers after outputting something (which could be just a blank line) - check in your functions.php that you dont have any blank lines before the start of or after the end of your script. ie. before the <?php or after the ?>
Debbie
----- Original Message -----
From: "cleaner" <cleaner
constrictor.nu>
To: <php-general
lists.php.net>
Sent: Saturday, September 28, 2002 3:23 PM
Subject: [PHP] headers?
> Hi all.. > > Got this script to verify a login against a mysql-databas with several > checking for type errors etc. > > When I wanna login people, I include a file with all my functions > ('functions.php') and I a function verify is called upon. > > the function returns false if user entered wrong user/pass, And if they > enter correct info I want them to be redirected to another page.. hm. the > headers cant be added (u heard that before?) cuz my login form already > started output... > > function verify($user,$pass){ > // some sql queries here... > > if(count($number)>0){ > return false; > }else{ > header("Location:admin.php"); > } > > } > > I would like som help using headers in a correct way, or be able to use > another way... > > > reg:cleaner > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
IŽll do that...I hope thats the problem....thanks a LOT!
"Debbie_dyer" <debbie_dyer
surfanytime.co.uk> skrev i meddelandet
news:00d601c266fe$2f4d32f0$0100a8c0
homepc...
> It's giving you this error because you are sending the headers after
> outputting something (which could be just a blank line) - check in your
> functions.php that you dont have any blank lines before the start of or
> after the end of your script. ie. before the <?php or after the ?>
>
> Debbie
> ----- Original Message -----
> From: "cleaner" <cleaner
constrictor.nu>
> To: <php-general
lists.php.net>
> Sent: Saturday, September 28, 2002 3:23 PM
> Subject: [PHP] headers?
>
>
> > Hi all..
> >
> > Got this script to verify a login against a mysql-databas with several
> > checking for type errors etc.
> >
> > When I wanna login people, I include a file with all my functions
> > ('functions.php') and I a function verify is called upon.
> >
> > the function returns false if user entered wrong user/pass, And if they
> > enter correct info I want them to be redirected to another page.. hm.
the
> > headers cant be added (u heard that before?) cuz my login form already
> > started output...
> >
> > function verify($user,$pass){
> > // some sql queries here...
> >
> > if(count($number)>0){
> > return false;
> > }else{
> > header("Location:admin.php");
> > }
> >
> > }
> >
> > I would like som help using headers in a correct way, or be able to use
> > another way...
> >
> >
> > reg:cleaner
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
attached mail follows:
Hi All, Can someone explain to me why I am getting an error for the following?
$keywords = $_POST[keywords]; if ($keywords) { echo"<META NAME="keywords" CONTENT=" $keywords ">"; }
TIA Gary
attached mail follows:
That line is syntactically invalid. Did you meant it to say
echo "<META NAME=$keywords CONTENT= $keywords >";
-- JR> -----Original Message----- > From: Gary [mailto:garyb10
earthlink.net] > Sent: Saturday, September 28, 2002 11:15 AM > To: php-general
lists.php.net > Subject: [PHP] unexpected T_STRING error > > > Hi All, > Can someone explain to me why I am getting an error for the following? > > $keywords = $_POST[keywords]; > if ($keywords) { > echo"<META NAME="keywords" CONTENT=" $keywords ">"; > } > > TIA > Gary > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >
attached mail follows:
The quotes within the quotes. Change to: echo"<META NAME=\"keywords\" CONTENT=\" $keywords \">";
> From: "Gary" <garyb10
earthlink.net>
> Sent: Saturday, September 28, 2002 11:15 AM
> Subject: [PHP] unexpected T_STRING error
> Hi All, > Can someone explain to me why I am getting an error for the following? > > $keywords = $_POST[keywords]; > if ($keywords) { > echo"<META NAME="keywords" CONTENT=" $keywords ">"; > }
The quotes within the quotes -- you need to escape them. Otherwise, the second double quote terminates the quoted string, yet there's some more junk on the line. By escaping them, you tellphp you mean the literal ", and don't want to terminate the string . So change to: echo"<META NAME=\"keywords\" CONTENT=\" $keywords \">";
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]