[PHP] Flash and php

2002-02-24 Thread Martin

Hello!

I read that the flash-format has been published to all users (see:
http://www.macromedia.com/macromedia/proom/pr/1998/flashstandard.html).

I was wondering if there is some php-support to generate
flash-animations in general.

What I'm looking for in particulla is a simple horizontal text-scroller
done in flash, but generated with php (to show diffenrent text on
different user-inputs for example). Has someone done this before?

Martin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Flash and php

2002-02-24 Thread Martin

Okay, I found the Ming-Library in the documentation (I just search for
flash in the functions list and didn't find anything). I will try this.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Flash and php

2002-02-24 Thread Mika Tuupola

On Sun, 24 Feb 2002, Martin wrote:

 I was wondering if there is some php-support to generate
 flash-animations in general.

http://www.php.net/manual/en/ref.swf.php
http://www.php.net/manual/en/ref.ming.php

-- 
Mika Tuupola  http://www.appelsiini.net/~tuupola/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Flash and php

2002-02-24 Thread Martin

Hi Mika, thanx for your answer,

 http://www.php.net/manual/en/ref.swf.php
 http://www.php.net/manual/en/ref.ming.php

which one should I prefer (using windows) ?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Disabliing browser cache possible?

2002-02-24 Thread Andy

Hi there,

I would like to disable clients browser cache. Anyhow this does not work.

In a PHP book I found following line:

header(Pragma: no-cache);

Does not work though.

Can anybody help?

Thanx Andy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Not Quite: how to build an array

2002-02-24 Thread Jason Wong

On Sunday 24 February 2002 04:03, jtjohnston wrote:
 I'm splitting mysql entries to build an array of author names called
 $authors.

  As someone already suggested, you could use:
   array_push($authors, explode(;, $mydata-AS));

 http://ccl.flsh.usherb.ca/db/authors_under_study.php

 It works, but still gets First argument to array_push() needs to be an
 array and fails before it gets to print_r($authors). Am I doing
 something wrong here:

[snip]

What array_push is doing is adding the *whole* array onto the existing array. 
What you need is to add the *elements* of the array onto the existing array.

Try this:

  $news = mysql_query(select id,AUS from $table); 
  $authors = array();
  while ($mydata = mysql_fetch_object($news))
  {
echo $mydata-id.|.$mydata-AUS.hr\n; 
$tmp = explode(;, $mydata-AUS);
foreach($tmp as $val) {
  array_push($authors, $val);
}
  }
  print_r($authors);


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Subtlety is the art of saying what you think and getting out of the way
before it is understood.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Opening sockets

2002-02-24 Thread LaserJetter

I'm running GTK on Win32 and have made an app that connects to a server and
downloads some data.
I tested it over my LAN and it works fine, using both 10.0.0.1 and
gethostbyname(amd) as the host in fsockopen(host, 80, 30)
I've now tried running it over the internet, trying to connect to the server
www.lottery-machine.co.uk or gethostbyname(www.lottery-machine.co.uk) but it
won;t connect to the server. The window that displays the downloaded data
contains a webpage which is produced by the web host when there's an error
of some kind. If I type in the GET request
(www.lottery-machine.co.uk/clientlogin.php?username=mepassword=password) in
a web browser it works fine as expected.
I'm in touch with them about the problem but does anyone know what is
causing this? Does the host only accept connections from web browsers or
something?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Localization support

2002-02-24 Thread Uros Gruber

Hi!

I hope this is right address to get some help about this.

I tried many ways to get working locales, but nothing works.

My OS is FreeBSD 4.5 and php i use is 4.1.1.

I want to get slovenian locale working
If I set LC_ALL in my environment and if i type date for example in
shell everything is OK, i see date printet in my language.

but when i type this i PHP

setlocale(LC_ALL, 'sl_SI.ISO_8859-2');
echo pre;
print_r(localeconv());

i get output like this

Array
(
[decimal_point] = .
[thousands_sep] = 
[int_curr_symbol] = 
[currency_symbol] = 
[mon_decimal_point] = 
[mon_thousands_sep] = 
[positive_sign] = 
[negative_sign] = 
[int_frac_digits] = 127
[frac_digits] = 127
[p_cs_precedes] = 127
[p_sep_by_space] = 127
[n_cs_precedes] = 127
[n_sep_by_space] = 127
[p_sign_posn] = 127
[n_sign_posn] = 127
[grouping] = Array
(
)

[mon_grouping] = Array
(

but it has to be like this


Array
(
[decimal_point] = ,
[thousands_sep] = .
[int_curr_symbol] = SIT
[currency_symbol] = SIT
[mon_decimal_point] = ,
[mon_thousands_sep] = .
[positive_sign] = 
[negative_sign] = -
[int_frac_digits] = 2
[frac_digits] = 2
[p_cs_precedes] = 0
[p_sep_by_space] = 1
[n_cs_precedes] = 0
[n_sep_by_space] = 1
[p_sign_posn] = 1
[n_sign_posn] = 1
[grouping] = Array
(
[0] = 3
)

[mon_grouping] = Array
(
[0] = 3
)

I tried exact code on window2000 and i get second output, so on
windows works this but on unix does not.

There is also strange thig about nameing locales. Somewhere i have to
use only sl or slv, somwhere sl_SI or maybe like here
sl_SI.ISO_8859-2. Shouldn't be this somehow standard. So if i move my
code on other machine nothing would work or what.

Plese if someboday can help me or have some good doc.

-- 
lp,
 Uros  mailto:[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Installing PHP4.1.1 on RH7.2 impossible!

2002-02-24 Thread Andy

Hi there,

I am a Linux newbie and I would reallly like to get this thing working on
RH7.2 But it does not work out!

A normal PHP4.1.1 installation works. But I need gd2.0 and JPEG support.
Thats where my knowledge ends.

I tryed following configue line:

./ configure --with-apxs=/usr/sbin/apxs --with-mysql --with-gd --with-jpeg

It compiles and after restarting apache the normal php works.  While trying
to use gd I get following errormsg:

no JPEG support in this php build
imagecreatetruecolor requires gd2.0 or later

Is there someone out ther who knows the propper configure line?? Thank you
so much for any help

Cheers Andy




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Installing PHP4.1.1 on RH7.2 impossible!

2002-02-24 Thread Rasmus Lerdorf

See http://www.php.net/~rasmus/gd.html

On Sun, 24 Feb 2002, Andy wrote:

 Hi there,

 I am a Linux newbie and I would reallly like to get this thing working on
 RH7.2 But it does not work out!

 A normal PHP4.1.1 installation works. But I need gd2.0 and JPEG support.
 Thats where my knowledge ends.

 I tryed following configue line:

 ./ configure --with-apxs=/usr/sbin/apxs --with-mysql --with-gd --with-jpeg

 It compiles and after restarting apache the normal php works.  While trying
 to use gd I get following errormsg:

 no JPEG support in this php build
 imagecreatetruecolor requires gd2.0 or later

 Is there someone out ther who knows the propper configure line?? Thank you
 so much for any help

 Cheers Andy




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Lossless JPEG image rotation

2002-02-24 Thread Baumann Reto

Is there a good way to rotate a JPEG image (90°, 180° or 270°)?

I tried jpegtran and convert (ImageMagick)... But they both don't really
work as expected. Why?

jpegtran only workes if used with -trim. But this trims the image (cuts some
pixels away), which is not a very good way.

ImageMagick's convert isn't lossless :(

Any other ideas?


Thanks a lot
Reto



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] problem while loop.

2002-02-24 Thread Jeff Bearer

I have a problem while loop that isn't terminating when it's supposed
to.  I can't figure out what the problem is, if I run a comparison
inside the while loop it matches as it should, but for some reason the
same comparison isn't working as the while loop expression. I get an
infinite loop when I run this code.

while(strtotime($event_date) = strtotime($end_date)){
# test to see if the loop should of stopped.
if(strtotime($event_date) = strtotime($end_date))
echo GO!!\n;
else echo STOP!!!\n;

/* omitted code that finds the next $event_date */
}




-- 
Jeff Bearer, RHCE
Webmaster
PittsburghLIVE.com
2002 EPpy Award, Best Online U.S. Newspaper

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Installing PHP4.1.1 on RH7.2 impossible!

2002-02-24 Thread Andy

Thanx Rasmus,

Andy


Rasmus Lerdorf [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 See http://www.php.net/~rasmus/gd.html

 On Sun, 24 Feb 2002, Andy wrote:

  Hi there,
 
  I am a Linux newbie and I would reallly like to get this thing working
on
  RH7.2 But it does not work out!
 
  A normal PHP4.1.1 installation works. But I need gd2.0 and JPEG
support.
  Thats where my knowledge ends.
 
  I tryed following configue line:
 
  ./
configure --with-apxs=/usr/sbin/apxs --with-mysql --with-gd --with-jpeg
 
  It compiles and after restarting apache the normal php works.  While
trying
  to use gd I get following errormsg:
 
  no JPEG support in this php build
  imagecreatetruecolor requires gd2.0 or later
 
  Is there someone out ther who knows the propper configure line?? Thank
you
  so much for any help
 
  Cheers Andy
 
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Unknown column when column does exist.

2002-02-24 Thread [EMAIL PROTECTED]

Jason,

  Can't execute INSERT INTO events (TITLE, SUMMARY, ORG, CITY, PROVINCE,
  DATE, REG_DATE, FEE) VALUES ('Another Event', 'Summary of this event
  goes here', 'Another Organization', 'Coquitlam', 'BC', 'Another Date',
  'Another Date', '$250') Unknown column 'ORG' in 'where clause'
 
 Where is your 'where clause' coming from?

That's it! I forgot to change the table name! Remember that I said I
copied it from a working php file and renamed it, and thought I had changed
all elements needed? I overlooked that particular one! Thanks for pointing
it out the 'where clause' part. It should work now!

Again, thanks!

Laurie

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




php-general Digest 24 Feb 2002 17:23:04 -0000 Issue 1191

2002-02-24 Thread php-general-digest-help


php-general Digest 24 Feb 2002 17:23:04 - Issue 1191

Topics (messages 85981 through 85998):

Re: php3/php4 difference
85981 by: David Robley

Flash and php
85982 by: Martin
85983 by: Martin
85984 by: Mika Tuupola
85985 by: Martin

Re: adding 'vote' mechanism
85986 by: Nick Wilson

Disabliing browser cache possible?
85987 by: Andy
85992 by: Girish Nath

Re: Unknown column when column does exist.
85988 by: Jason Wong
85998 by: lmlweb.mybc.com

Re: Not Quite: how to build an array
85989 by: Jason Wong

Opening sockets
85990 by: LaserJetter

Localization support
85991 by: Uros Gruber

Installing PHP4.1.1 on RH7.2 impossible!
85993 by: Andy
85994 by: Rasmus Lerdorf
85997 by: Andy

Lossless JPEG image rotation
85995 by: Baumann Reto

problem while loop.
85996 by: Jeff Bearer

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

---BeginMessage---

In article [EMAIL PROTECTED], 
[EMAIL PROTECTED] says...
 $numresult=mysql_query($sql) 
   or die( 4 QUERY ERR $sql);
 
 echo numresult = $numresult;
 
 $numrows=mysql_num_rows($numresult);
 mysql_free_result($numresult);
 echo P align='left'You have selected  .$numrows .
 record(s).;
 
 When I run the script above on php4 windows I get the
 following result:
 
 numresult = Resource id #2
 You have selected 0 record(s).
 
 
 When I run the script above on php3 linux I get the
 following result:
 
 numresult = 2
 You have selected 1382 record(s).
 
 
 Why do I get two different values for $numresult?
 Thanks

Are you actually using the same database for both queries? Try running 
the query from the command line on both machines and see what happens.

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

---End Message---
---BeginMessage---

Hello!

I read that the flash-format has been published to all users (see:
http://www.macromedia.com/macromedia/proom/pr/1998/flashstandard.html).

I was wondering if there is some php-support to generate
flash-animations in general.

What I'm looking for in particulla is a simple horizontal text-scroller
done in flash, but generated with php (to show diffenrent text on
different user-inputs for example). Has someone done this before?

Martin



---End Message---
---BeginMessage---

Okay, I found the Ming-Library in the documentation (I just search for
flash in the functions list and didn't find anything). I will try this.



---End Message---
---BeginMessage---

On Sun, 24 Feb 2002, Martin wrote:

 I was wondering if there is some php-support to generate
 flash-animations in general.

http://www.php.net/manual/en/ref.swf.php
http://www.php.net/manual/en/ref.ming.php

-- 
Mika Tuupola  http://www.appelsiini.net/~tuupola/


---End Message---
---BeginMessage---

Hi Mika, thanx for your answer,

 http://www.php.net/manual/en/ref.swf.php
 http://www.php.net/manual/en/ref.ming.php

which one should I prefer (using windows) ?


---End Message---
---BeginMessage---

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Steven Walker declared
 I personally prefer voting mechanisms that display how many votes have 
 been cast. If you keep the thumbs_up separate from thumbs_down, you can 
 figure the total number of votes. Otherwise, you will not be able to 
 know whether the author is *really* average or just never voted for.

Thanks for the replys, I just thought I might be missing something
obvious but I guess not. I'll go with my original plan as Steven's point
echos my own thoughts on this.

Regards
- -- 
- ---
 www.explodingnet.com   |Projects, Forums and
+Articles for website owners 
- -- Nick Wilson -- |and designers.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8eMHjHpvrrTa6L5oRAt6XAJ0SJVNSAUOnxBDxVMHNzVsUgFRxaQCeK65t
Flz4SpReKz+Ft6gdvQHo+kE=
=0ES1
-END PGP SIGNATURE-

---End Message---
---BeginMessage---

Hi there,

I would like to disable clients browser cache. Anyhow this does not work.

In a PHP book I found following line:

header(Pragma: no-cache);

Does not work though.

Can anybody help?

Thanx Andy



---End Message---
---BeginMessage---

Hi

http://www.php.net/manual/en/function.header.php

There is a section about how to disable caching about 1/3 way down the page.

Regards


Girish
--
www.girishnath.co.uk


- Original Message -
From: Andy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, February 24, 2002 12:04 PM
Subject: [PHP] Disabliing browser cache possible?


Hi there,

I would like to disable clients browser cache. Anyhow this does not work.


[PHP] SVG page displays correctly, but not when generated by PHP

2002-02-24 Thread john gunther

Does anyone have any idea why I can display a true SVG file successfully 
in IE 6 with Adobe SVG viewer 3.0, but not when the identical content is 
generated by PHP. Example:

SVGRECT.SVG displays properly (Apache server includes directive AddType 
image/svg+xml svg):

?xml version=1.0 encoding=UTF-8 standalone=no ?
!DOCTYPE svg PUBLIC -//W3C//DTD SVG 1.0//EN 
http://www.w3.org/TR/SVG/DTD/svg10.dtd;
svg
rect x=10 y=0 width=460 height=50 /
/svg

However, SVGRECT.PHP, which results in the same page text, brings up a 
dialog box Would you like to open the file or save it to your 
computer? Choosing Open causes nothing to happen. Choosing Save 
results in another dialog box Internet Explorer  was unable to open 
this internet site:

?php
header(Content-type: image/svg+xml);
echo ?xml version=\1.0\ encoding=\UTF-8\ standalone=\no\ ?;
echo \n!DOCTYPE svg PUBLIC \-//W3C//DTD SVG 1.0//EN\ 
\http://www.w3.org/TR/SVG/DTD/svg10.dtd\;;
echo \nsvg;
echo \nrect x=\10\ y=\0\ width=\460\ height=\50\ /;
echo \n/svg;
?

Displaying SVGRECT.PHP from another PHP page using the embed tag works 
properly.

Here's another curious occurrence that may be related: displaying any   php 
page as a local file brings up the Windows Open with dialog, whereas 
referencing the same page as a URL works.

Any insighta you can provide would be appreciated. Thanks.

John Gunther


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] problem while loop.

2002-02-24 Thread Steven Walker

Jeff,

The problem is most likely with incrementing $event_data. It's hard to 
say without seeing the rest of the code.

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]

 I have a problem while loop that isn't terminating when it's supposed
 to.  I can't figure out what the problem is, if I run a comparison
 inside the while loop it matches as it should, but for some reason the
 same comparison isn't working as the while loop expression. I get an
 infinite loop when I run this code.

 while(strtotime($event_date) = strtotime($end_date)){
   # test to see if the loop should of stopped.
   if(strtotime($event_date) = strtotime($end_date))
   echo GO!!\n;
   else echo STOP!!!\n;

   /* omitted code that finds the next $event_date */
 }




 --
 Jeff Bearer, RHCE
 Webmaster
 PittsburghLIVE.com
 2002 EPpy Award, Best Online U.S. Newspaper

 --
 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] get emum values

2002-02-24 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all
Which php function can I use to get the emum values from a mysql db
table? I remember doing this once before but I've been looking at the
manual and just can't remember how I did it?

Many thanks
- -- 
- ---
 www.explodingnet.com   |Projects, Forums and
+Articles for website owners 
- -- Nick Wilson -- |and designers.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8eTgCHpvrrTa6L5oRAl0uAKCzvaf13t5bmwLDvjfYpdnbzAn/8wCdHHVC
/N9ePmxrZ4xP3dMx35CQ8Dc=
=EzhU
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] get emum values

2002-02-24 Thread Jason Wong

On Monday 25 February 2002 02:59, Nick Wilson wrote:
 Hi all
 Which php function can I use to get the emum values from a mysql db
 table? I remember doing this once before but I've been looking at the
 manual and just can't remember how I did it?

Not sure whether there is a built-in function for doing so. But here's 
something I prepared earlier:

#===
# create_list_from_ENUM
#---
# Returns array [enum vals]
#
# Arguments
# -
#
# $dbh: a $dbh object defined in class.DBI.inc
# $table  : the table to get the ENUM values from
# $column : the column containing the ENUM values
#
#===
function create_list_from_ENUM($dbh, $table, $column) {
  $sth = $dbh-prepare(SHOW COLUMNS FROM $table LIKE '$column');
  if ($sth) {
$sth-execute();
while ($row = $sth-fetchrow_hash()) {
  ereg(('(.*)'), $row[1], $temp);
  $array = explode( ',', $temp[2] );
  while (list ($key, $val) = each ($array)) {
$return[] = $val;
  }
}
  }
  return $return;
}


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Lies!  All lies!  You're all lying against my boys!
-- Ma Barker
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Email Verification

2002-02-24 Thread Steven Walker

Does anybody know any good ways (or available code) for verifying email 
addresses?

Checking syntax is not enough.. I'd like to actually be able to test 
whether the email address exists.

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] get emum values

2002-02-24 Thread Matt

I think I got this off the Zend site a year or so ago:
//
function mysql_fetch_enumerations($db_connection, $table_name, $column_name,
$sorted=unsorted) {
/*
Author
Thomas J. Swan
Revision History
1.0Creation of function
1.1Added the ability to sort the array before returning it
Parameters
$db_connection an established mysql connection to the correct
database
$table_namename of Table containing the ENUMeration
$column_namecolumn whose possible values are to be listed
$sortedsort array in ascending,descending, or unsorted
order
Returns
Array of valid values for an enumerated type
Example
$bob = mysql_fetch_enumerations($mysql_connection, Event,
age_group);
while(list($key,$value) = each($bob)) {
echo $value .  ;
}
echo \n;
*/
 $table = addslashes($table);
 $field = addslashes($field);
if ($result = mysql_query(SHOW COLUMNS FROM $table_name LIKE
\$column_name\,$db_connection)) {
$temp = mysql_fetch_array($result);
if (strstr(strtoupper($temp['Type']),ENUM)) {
$str = StripSlashes(substr($temp['Type'],
(strpos($temp['Type'],(,0))+1, (strpos($temp['Type'],\),0)-1)));
$tok = strtok($str,,);
while ($tok) {
$labels[] = substr($tok,(1),(strlen($tok) - 2));
$tok = strtok(,);
}
switch(strtolower($sorted)) {
case ascending :
sort($labels);
break;
case descending :
rsort($labels);
break;
default :
break;
}
return $labels;
} else {
echo (Error not ENUM type\n);
}
} else {
echo (Error querying database.\n);
echo mysql_errno( ).: .mysql_error( ).\n;
}
return false;
}
- Original Message -
From: Nick Wilson [EMAIL PROTECTED]
Subject: [PHP] get emum values


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi all
 Which php function can I use to get the emum values from a mysql db
 table?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] get emum values

2002-02-24 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Jason Wong declared
 Not sure whether there is a built-in function for doing so. But here's 
 something I prepared earlier:
 
 function create_list_from_ENUM($dbh, $table, $column) {
   $sth = $dbh-prepare(SHOW COLUMNS FROM $table LIKE '$column');
   if ($sth) {
 $sth-execute();
 while ($row = $sth-fetchrow_hash()) {
   ereg(('(.*)'), $row[1], $temp);
   $array = explode( ',', $temp[2] );
   while (list ($key, $val) = each ($array)) {
 $return[] = $val;
   }
 }
   }
   return $return;
 }

Yep, It's come back to me now. Your right of course there is no php
function for this, it's the 'show columns' sql that does the trick.
Cheers!
- -- 
- ---
 www.explodingnet.com   |Projects, Forums and
+Articles for website owners 
- -- Nick Wilson -- |and designers.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8eT6kHpvrrTa6L5oRAkQ3AJkB9oYyoidJUlfyUF9LZYe0nUh/rACdGOUj
LkdsHqhrHequJVuhKGi/HLM=
=hbeU
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Email Verification

2002-02-24 Thread Michael Kimsal

Steven Walker wrote:
 Does anybody know any good ways (or available code) for verifying email 
 addresses?
 
 Checking syntax is not enough.. I'd like to actually be able to test 
 whether the email address exists.


Nothing is 100%, so don't exclude people because you can't verify them.

There are 2 types of email addresse:

verifiable
unverifiable

The 'type' is determined by talking to the mail host of the domain, but 
this is, at best, an inexact science.

Verifiable means that you've connected to the mail host and indicated 
you had mail for a specific user account and it did not reply back 'user 
unknown'.  That is the best you can hope for, because once that mail 
system accepts it for delivery, it may still not be delivered to the end 
user for a number of reasons - no mailbox space left, for example.  Or 
in fact, the specific user account DOESN'T exist, but the mail server is 
set to accept all incoming mail first, and does more precise error 
checking at a later time.

Unverifiable would mean that the mail server will actually tell you up 
front that an account doesn't exist, or isn't accepting mail from you, 
or has a full mailbox, or whatever.

So you might be able to tell if an account specifically DOES NOT exist, 
but you can never be certain that an account actually does exist without 
completely sending a mail, and hoping that it'll bounce to the right 
place if there's a problem.

The way to do this is to use SMTP to talk to the other mail host - Zend 
has some code snippets like the one referenced below (probably others, 
but here's a starting point)

http://www.zend.com/codex.php?id=449single=1

Hope that helps some...




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Email Verification

2002-02-24 Thread Thalis A. Kalfigopoulos

What you could do additionally to syntax check, is to check if the domain they are 
giving is existant or not with checkdnsrr(). Still not 100% fullproof though :-(

cheers,
thalis



On Sun, 24 Feb 2002, Steven Walker wrote:

 Does anybody know any good ways (or available code) for verifying email 
 addresses?
 
 Checking syntax is not enough.. I'd like to actually be able to test 
 whether the email address exists.
 
 Steven J. Walker
 Walker Effects
 www.walkereffects.com
 [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] Re: Email Verification

2002-02-24 Thread Steven Walker

Michael,

Thanks for your help! Your advice entirely makes sense. Perhaps a good 
way to use email verification is to alert the user that the address 
could not be verified, but if they insist, they can still submit it.

This probably falls under the 90/10 rule... I'll spend 90% of my time 
trying to fix a problem that occurs 10% (or less) of the time ;)

Thanks for the Zend referral. I'll give it a try.

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]

On Sunday, February 24, 2002, at 11:31  AM, Michael Kimsal wrote:

 Steven Walker wrote:
 Does anybody know any good ways (or available code) for verifying 
 email addresses?
 Checking syntax is not enough.. I'd like to actually be able to test 
 whether the email address exists.


 Nothing is 100%, so don't exclude people because you can't verify them.

 There are 2 types of email addresse:

 verifiable
 unverifiable

 The 'type' is determined by talking to the mail host of the domain, but 
 this is, at best, an inexact science.

 Verifiable means that you've connected to the mail host and indicated 
 you had mail for a specific user account and it did not reply back 
 'user unknown'.  That is the best you can hope for, because once that 
 mail system accepts it for delivery, it may still not be delivered to 
 the end user for a number of reasons - no mailbox space left, for 
 example.  Or in fact, the specific user account DOESN'T exist, but the 
 mail server is set to accept all incoming mail first, and does more 
 precise error checking at a later time.

 Unverifiable would mean that the mail server will actually tell you up 
 front that an account doesn't exist, or isn't accepting mail from you, 
 or has a full mailbox, or whatever.

 So you might be able to tell if an account specifically DOES NOT exist, 
 but you can never be certain that an account actually does exist 
 without completely sending a mail, and hoping that it'll bounce to the 
 right place if there's a problem.

 The way to do this is to use SMTP to talk to the other mail host - Zend 
 has some code snippets like the one referenced below (probably others, 
 but here's a starting point)

 http://www.zend.com/codex.php?id=449single=1

 Hope that helps some...




 -- 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: encryption and HTTP

2002-02-24 Thread Murray Chamberlain

Yeah the idea of php md5() hash is for data integrity, by taking a hash of
some data and taking a hash of it later, allows you to compare the results
and see if the data hash been changed, such as a database value.

You have to use some form of client side technology to pass variables
encrypted. e.g. using Javascript or implementing SSL. U could always use
Java applets.

Muz

Erik Price [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Without using SSL or JavaScript, is there any way to make an md5 hash or
 encrypt a string before sending it out as a POST request?

 It seems that without encrypting the data before sending it, it can
 still be intercepted.  Once intercepted, it doesn't matter if I use
 md5() on the $_POST['password'] once it gets to the script, because
 anyone can submit the same intercepted string to the script via POST and
 it will be md5()ed when it gets there, thus defeating the purpose.

 Maybe I haven't quite wrapped my brain around a decent authentication
 scheme yet.


 Erik





 

 Erik Price
 Web Developer Temp
 Media Lab, H.H. Brown
 [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Convert An Array

2002-02-24 Thread jtjohnston

http://ccl.flsh.usherb.ca/db/authors_under_study.php
or
$names = array (john, mary, bill, mary, bill, mary, bill,
john, bill, john);

1) How do I count the elements of $names to produce:

bill   4
john   3
mary   3

2) How do I store the counted elements into a new array? How do I create
this:

$new_array = array (bill=4, john=3, mary=3)

I'm looking at http://www.php.net/manual/en/function.array.php
but not sure.




Re: [PHP] Convert An Array

2002-02-24 Thread Edward van Bilderbeek - Bean IT

http://www.php.net/manual/en/function.array-count-values.php


- Original Message - 
From: jtjohnston [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, February 24, 2002 10:49 PM
Subject: [PHP] Convert An Array


 http://ccl.flsh.usherb.ca/db/authors_under_study.php
 or
 $names = array (john, mary, bill, mary, bill, mary, bill,
 john, bill, john);
 
 1) How do I count the elements of $names to produce:
 
 bill   4
 john   3
 mary   3
 
 2) How do I store the counted elements into a new array? How do I create
 this:
 
 $new_array = array (bill=4, john=3, mary=3)
 
 I'm looking at http://www.php.net/manual/en/function.array.php
 but not sure.
 
 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] ? re phpwebhosting.com - still in business??

2002-02-24 Thread Pax

Does anyone know if phpwebhosting.com is still in business?

I have sent them 2 sales inquiries and nothing happened so far for last
4-5 days and I also left them a message. I guess I got to the point that
I need to move on..since this company cannot even answer sales
inquiries...



Pax



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Email Verification

2002-02-24 Thread Simon Willison

Steven Walker wrote:

 Does anybody know any good ways (or available code) for verifying 
 email addresses?

 Checking syntax is not enough.. I'd like to actually be able to test 
 whether the email address exists.

The only way to be sure is to send them an e-mail with a link or 
validation code that they must use to prove the address exists - or if 
it's for an account just tell them that the (random) password for their 
account will be e-mailed to the address they provide.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Access Array Values?

2002-02-24 Thread jtjohnston

I knew there was areason why I stopped Perling :) THANKS!
How do I disassemble its values? How would I foreach? Something like this?

foreach (array_count_values ($names) as $name and $count) -??
{
echoa href=\search.php?input=.$name.\.$name./a (.$count.)br`;
}

a href=search.php?input=billbill/a (3)br
a href=search.php?input=johnjohn/a (3)br
a href=search.php?input=marymary/a (4)br

http://www.php.net/manual/en/function.array-count-values.php talks about how
it counts. But how do I access each separate value?

John

--snip---
$names = array (john, mary, bill, mary, bill, mary, bill,
john, bill, john);
echopre;
print_r($names);
echo/pre;
echohrpre;
print_r(array_count_values ($names));
echo/pre;


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Opening sockets

2002-02-24 Thread LaserJetter

Well, after browsing through the HTTP/1.1 standards I found that an optional
header Host after the GET request could be used.

I now write GET /clientlogin.php?username=mepassword=mypassword
HTTP/1.0\r\nHost: www.lottery-machine.co.uk\r\n\r\n to the open socket...

and it works fine!!!


Laserjetter [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'm running GTK on Win32 and have made an app that connects to a server
and
 downloads some data.
 I tested it over my LAN and it works fine, using both 10.0.0.1 and
 gethostbyname(amd) as the host in fsockopen(host, 80, 30)
 I've now tried running it over the internet, trying to connect to the
server
 www.lottery-machine.co.uk or gethostbyname(www.lottery-machine.co.uk) but
it
 won;t connect to the server. The window that displays the downloaded data
 contains a webpage which is produced by the web host when there's an error
 of some kind. If I type in the GET request
 (www.lottery-machine.co.uk/clientlogin.php?username=mepassword=password)
in
 a web browser it works fine as expected.
 I'm in touch with them about the problem but does anyone know what is
 causing this? Does the host only accept connections from web browsers or
 something?





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Email Verification

2002-02-24 Thread jtjohnston

Is this what you want?

function validateEmail ($email) {
return (ereg('^[-!#$%\'*+\\./0-9=?A-Z^_`a-z{|}~]+'. '@'.
'[-!#$%\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.' .
'[-!#$%\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email));
 }

This will also do the job. It actually connects to the mail server name and
runs it to see if valid :

 http://px.sklar.com/code-pretty.html?code_id=508



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] creating dropdown lists from fetched arrays.

2002-02-24 Thread Matthew Darcy

Hi,

I want to create a dropdown list with options from a table.

ie
HTML
BODY

?php

$sql_select = select * from dropdown_options;
$results = mysql_query($sql_select);

while ($row = mysql_fetch_array($results);
{
echo option VALUE=$row[col1] NAME=option1
}

/BODY
/HMTL

I know this is basic but it is to give you an idea of what I want.

I have tried to find an example of this in the book I am using to learn to
no result.

I am guessing this is how it works from the info I have read from the book.

Can someone put me on the right path.

Thanks,

Matt.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Access Array Values?

2002-02-24 Thread Martin Towell

foreach (array_count_values ($names) as $name=$count)
-^^

-Original Message-
From: jtjohnston [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 9:34 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Access Array Values?


I knew there was areason why I stopped Perling :) THANKS!
How do I disassemble its values? How would I foreach? Something like this?

foreach (array_count_values ($names) as $name and $count) -??
{
echoa href=\search.php?input=.$name.\.$name./a (.$count.)br`;
}

a href=search.php?input=billbill/a (3)br
a href=search.php?input=johnjohn/a (3)br
a href=search.php?input=marymary/a (4)br

http://www.php.net/manual/en/function.array-count-values.php talks about how
it counts. But how do I access each separate value?

John

--snip---
$names = array (john, mary, bill, mary, bill, mary, bill,
john, bill, john);
echopre;
print_r($names);
echo/pre;
echohrpre;
print_r(array_count_values ($names));
echo/pre;


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: ? re phpwebhosting.com - still in business??

2002-02-24 Thread jtjohnston

What's their deal? How do they offer all that and be so cheap?
Using my site like Geocities to advertise?
http://www.phpwebhosting.com/host_details.html
J


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Access Array Values?

2002-02-24 Thread jtjohnston

:)
foreach (array_count_values ($names) as $name=$count)
Thanks M! :)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Email Verification

2002-02-24 Thread Martin Towell

You can use sockets and connect to their mail server (bit after the @) and
pretend to send an email to them, but cancel the request before you
actually send anything - doesn't always work though, as some servers will
report back the all users are correct

This is the code I use - a bit long though - if anyone can find a better
way, please email me


?
//

if (!class_exists(mail_exchange_class))
{
  class mail_exchange_class
  {
//

function get_mx_reply($f)
{
  $body = ;
  do
  {
$line = fgets($f, 1024);
$body .= $line\n;
$ch = substr($line, 3, 1);
  }
  while ($ch == -);

  return $body;
}

//

function send_mx_msg($f, $str)
{
  fputs($f, $str);
  return mail_exchange_class::get_mx_reply($f);
}

//

function check_email($email)
{
  list($user, $host) = explode(@, $email);

  // --- check if there's a mail server
  // -
  if (!getmxrr($host, $mx_arr, $wt_arr))
  {
return false;
  }

  // --- check if user exists at mail server
  // --
  // try connecting to one of the mail servers
  $i = 0;
  $num_mx = count($mx_arr);
  do
  {
$mx_server = $mx_arr[0];
$f = fsockopen($mx_server, 25);
$i++;
  }
  while (!$f  $i  $num_mx);
  if (!$f)
  {
return false;
  }

  // talk with mail server to determine user validity
  $flag = true;
// default to: user exists
  $rep = mail_exchange_class::get_mx_reply($f);
// welcome message
  $rep = mail_exchange_class::send_mx_msg($f, helo anonymous\n);
// introduce ourselves
  $rep = mail_exchange_class::send_mx_msg($f, mail from:$email\n);
// say we want to send a msg
  $rep = mail_exchange_class::send_mx_msg($f, rcpt to:$email\n);
// say who it's to
  if (substr($rep, 0, 3) != 250)
// check if user exists
  {
$flag = false;
// ... now we know they don't exist
  }
  $rep = mail_exchange_class::send_mx_msg($f, rset\n);
// reset all the buffers
  $rep = mail_exchange_class::send_mx_msg($f, quit\n);
// log off from server
  fclose($f);

  // return status
  return $flag;
}
  }
}
?

then to use:
  $email = [EMAIL PROTECTED];
  if (mail_exchange_class::check_email($email))
;  // user probably exists
  else
;  // user doesn't exist, or can't connect to server

I think that's all you need of this code - there's lots more, there's an
email class and an attachment class that goes with it, but it's need to
check the address

HTH
Martin

-Original Message-
From: Simon Willison [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 9:27 AM
To: Steven Walker
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Email Verification


Steven Walker wrote:

 Does anybody know any good ways (or available code) for verifying 
 email addresses?

 Checking syntax is not enough.. I'd like to actually be able to test 
 whether the email address exists.

The only way to be sure is to send them an e-mail with a link or 
validation code that they must use to prove the address exists - or if 
it's for an account just tell them that the (random) password for their 
account will be e-mailed to the address they provide.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: ? re phpwebhosting.com - still in business??

2002-02-24 Thread Jeff Lewis

They are very questionable.  Have had heard many complaints from clients and
associates about these guys shutting down sites without warning, anything
that starts to get a few hits seems to be an issue with them...

Again, you get what you pay for people :)

Jeff
- Original Message -
From: jtjohnston [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, February 24, 2002 5:44 PM
Subject: [PHP] Re: ? re phpwebhosting.com - still in business??


 What's their deal? How do they offer all that and be so cheap?
 Using my site like Geocities to advertise?
 http://www.phpwebhosting.com/host_details.html
 J




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] problem while loop.

2002-02-24 Thread Jeff Bearer

It's all returning proper dates and the proper timestamps when I check
them inside the loop.  I'm formatting the dates in -MM-DD format and
strtotime is returning the proper timestamps.  I'm curious how can you
say it's a problem with the dates when the if statement comparing the
same expression as the while loop works properly?



On Sun, 2002-02-24 at 13:09, Steven Walker wrote:
 Jeff,
 
 The problem is most likely with incrementing $event_data. It's hard to 
 say without seeing the rest of the code.
 
 Steven J. Walker
 Walker Effects
 www.walkereffects.com
 [EMAIL PROTECTED]
 
  I have a problem while loop that isn't terminating when it's supposed
  to.  I can't figure out what the problem is, if I run a comparison
  inside the while loop it matches as it should, but for some reason the
  same comparison isn't working as the while loop expression. I get an
  infinite loop when I run this code.
 
  while(strtotime($event_date) = strtotime($end_date)){
  # test to see if the loop should of stopped.
  if(strtotime($event_date) = strtotime($end_date))
  echo GO!!\n;
  else echo STOP!!!\n;
 
  /* omitted code that finds the next $event_date */
  }
 
 
 
 
  --
  Jeff Bearer, RHCE
  Webmaster
  PittsburghLIVE.com
  2002 EPpy Award, Best Online U.S. Newspaper
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
-- 
Jeff Bearer, RHCE
Webmaster
PittsburghLIVE.com
2002 EPpy Award, Best Online U.S. Newspaper

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RE: (HTML related) helping to creating dropdown lists from fetched arrays.

2002-02-24 Thread Matthew Darcy

it does help a little.

I know the html is wrong I used this as an example to what I wanted.

What I need to know is how to use PHP to generate the options in the list
from col1 and show the option 2.
The data for these is got from an array.

so really what I want to know is how to code in PHP


select name=test drop down
  option value=col1($row1)col2($row1)
  option value=col1($row2)col2($row2)
  option value=col1($row3)col2($row3)
/select

you get the idea ?

Thanks,

Matt.




-Original Message-
From: Cece [mailto:[EMAIL PROTECTED]]On Behalf Of Heilig (Cece) Szabolcs
Sent: 24 February 2002 23:07
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: OT:(HTML related) helping to creating dropdown lists from
fetched arrays.


 I want to create a dropdown list with options from a table.

 ?php

 $sql_select = select * from dropdown_options;
 $results = mysql_query($sql
 _select);

 while ($row = mysql_fetch_array($results);
 {
   echo option VALUE=$row[col1] NAME=option1
 }

Hi!

The problem is simple: wrong HTML
You have to make html code similar that:

select name=gender
  option value=Ffemale
  option value=Mmale
  option value=0not known :)
/select

Hope it helps

Cece


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] RE: (HTML related) helping to creating dropdown lists from fetched arrays.

2002-02-24 Thread Martin Towell

try this: (I don't have experience w/ mysql, but I do with other dbs)

select name=test drop down
?php
$sql_select = select * from dropdown_options;
$results = mysql_query($sql_select);
while ($row = mysql_fetch_array($results);
{
  echo option VALUE=.$row[col1]..$row[col2];
}
?
/select

-Original Message-
From: Matthew Darcy [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 10:06 AM
To: [EMAIL PROTECTED]
Subject: [PHP] RE: (HTML related) helping to creating dropdown lists
from fetched arrays.


it does help a little.

I know the html is wrong I used this as an example to what I wanted.

What I need to know is how to use PHP to generate the options in the list
from col1 and show the option 2.
The data for these is got from an array.

so really what I want to know is how to code in PHP


select name=test drop down
  option value=col1($row1)col2($row1)
  option value=col1($row2)col2($row2)
  option value=col1($row3)col2($row3)
/select

you get the idea ?

Thanks,

Matt.




-Original Message-
From: Cece [mailto:[EMAIL PROTECTED]]On Behalf Of Heilig (Cece) Szabolcs
Sent: 24 February 2002 23:07
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: OT:(HTML related) helping to creating dropdown lists from
fetched arrays.


 I want to create a dropdown list with options from a table.

 ?php

 $sql_select = select * from dropdown_options;
 $results = mysql_query($sql
 _select);

 while ($row = mysql_fetch_array($results);
 {
   echo option VALUE=$row[col1] NAME=option1
 }

Hi!

The problem is simple: wrong HTML
You have to make html code similar that:

select name=gender
  option value=Ffemale
  option value=Mmale
  option value=0not known :)
/select

Hope it helps

Cece


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] [NEWMAN] Collecting information from a my sql table.

2002-02-24 Thread Philip J. Newman

?php

$sql = SELECT * FROM `publisher` WHERE 1 AND `pub_id` = $pub_id LIMIT 1;
$sql_result = mysql_query($sql, $connection) or die (Could not get Query); 

while ($row = mysql_fetch_array($sql_result)) {
$pub_id = $row[pub_id]; 
$pub_headline = $row[pub_headline]; 
$pub_dateline = $row[pub_dateline]; 
$pub_info = $row[pub_info]; 
$pub_image = $row[pub_image]; 

}

?

When I want to get just one record is there an easyer way than using the while loop 
that I have been using?


Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012



RE: [PHP] [NEWMAN] Collecting information from a my sql table.

2002-02-24 Thread Martin Towell

how about ?

$row = mysql_fetch_array($sql_result);
$pub_id = $row[pub_id]; 
$pub_headline = $row[pub_headline]; 
$pub_dateline = $row[pub_dateline]; 
$pub_info = $row[pub_info]; 
$pub_image = $row[pub_image]; 


-Original Message-
From: Philip J. Newman [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 10:16 AM
To: [EMAIL PROTECTED]
Subject: [PHP] [NEWMAN] Collecting information from a my sql table.


?php

$sql = SELECT * FROM `publisher` WHERE 1 AND `pub_id` = $pub_id LIMIT 1;
$sql_result = mysql_query($sql, $connection) or die (Could not get Query);


while ($row = mysql_fetch_array($sql_result)) {
$pub_id = $row[pub_id]; 
$pub_headline = $row[pub_headline]; 
$pub_dateline = $row[pub_dateline]; 
$pub_info = $row[pub_info]; 
$pub_image = $row[pub_image]; 

}

?

When I want to get just one record is there an easyer way than using the
while loop that I have been using?


Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012



Re: [PHP] problem while loop.

2002-02-24 Thread Steven Walker

Jeff,

Everything you are doing sounds fine, and I don't see any logic problems 
with the while loop. However, I really can't extrapolate any further 
conclusion without more info. How are you determining that the if 
statement is working? As long as this loop is running it should always 
echo 'GO!!'.

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]


On Sunday, February 24, 2002, at 03:00  PM, Jeff Bearer wrote:

 It's all returning proper dates and the proper timestamps when I check
 them inside the loop.  I'm formatting the dates in -MM-DD format and
 strtotime is returning the proper timestamps.  I'm curious how can you
 say it's a problem with the dates when the if statement comparing the
 same expression as the while loop works properly?



 On Sun, 2002-02-24 at 13:09, Steven Walker wrote:
 Jeff,

 The problem is most likely with incrementing $event_data. It's hard to
 say without seeing the rest of the code.


 I have a problem while loop that isn't terminating when it's supposed
 to.  I can't figure out what the problem is, if I run a comparison
 inside the while loop it matches as it should, but for some reason the
 same comparison isn't working as the while loop expression. I get an
 infinite loop when I run this code.

 while(strtotime($event_date) = strtotime($end_date)){
 # test to see if the loop should of stopped.
 if(strtotime($event_date) = strtotime($end_date))
 echo GO!!\n;
 else echo STOP!!!\n;

 /* omitted code that finds the next $event_date */
 }




 --
 Jeff Bearer, RHCE
 Webmaster
 PittsburghLIVE.com
 2002 EPpy Award, Best Online U.S. Newspaper

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



 --
 Jeff Bearer, RHCE
 Webmaster
 PittsburghLIVE.com
 2002 EPpy Award, Best Online U.S. Newspaper

 --
 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] problem while loop.

2002-02-24 Thread Jeff Bearer

Well, I found the problem. it wasn't happening where I thought it was.
which brings up another question I'll have to ask in a new subject about
output buffering.

On Sun, 2002-02-24 at 18:00, Jeff Bearer wrote:
 It's all returning proper dates and the proper timestamps when I check
 them inside the loop.  I'm formatting the dates in -MM-DD format and
 strtotime is returning the proper timestamps.  I'm curious how can you
 say it's a problem with the dates when the if statement comparing the
 same expression as the while loop works properly?
 
 
 
 On Sun, 2002-02-24 at 13:09, Steven Walker wrote:
  Jeff,
  
  The problem is most likely with incrementing $event_data. It's hard to 
  say without seeing the rest of the code.
  
  Steven J. Walker
  Walker Effects
  www.walkereffects.com
  [EMAIL PROTECTED]
  
   I have a problem while loop that isn't terminating when it's supposed
   to.  I can't figure out what the problem is, if I run a comparison
   inside the while loop it matches as it should, but for some reason the
   same comparison isn't working as the while loop expression. I get an
   infinite loop when I run this code.
  
   while(strtotime($event_date) = strtotime($end_date)){
 # test to see if the loop should of stopped.
 if(strtotime($event_date) = strtotime($end_date))
 echo GO!!\n;
 else echo STOP!!!\n;
  
 /* omitted code that finds the next $event_date */
   }
  
  
  
  
   --
   Jeff Bearer, RHCE
   Webmaster
   PittsburghLIVE.com
   2002 EPpy Award, Best Online U.S. Newspaper
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
  
 -- 
 Jeff Bearer, RHCE
 Webmaster
 PittsburghLIVE.com
 2002 EPpy Award, Best Online U.S. Newspaper
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
-- 
Jeff Bearer, RHCE
Webmaster
PittsburghLIVE.com
2002 EPpy Award, Best Online U.S. Newspaper

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] [NEWMAN] Collecting information from a my sql table.

2002-02-24 Thread Philip J. Newman

RE: [PHP] [NEWMAN] Collecting information from a my sql table.Dang, thanks (o;
  - Original Message - 
  From: Martin Towell 
  To: 'Philip J. Newman' ; [EMAIL PROTECTED] 
  Sent: Monday, February 25, 2002 12:22 PM
  Subject: RE: [PHP] [NEWMAN] Collecting information from a my sql table.


  how about ? 

  $row = mysql_fetch_array($sql_result); 
  $pub_id = $row[pub_id]; 
  $pub_headline = $row[pub_headline]; 
  $pub_dateline = $row[pub_dateline]; 
  $pub_info = $row[pub_info]; 
  $pub_image = $row[pub_image]; 



  -Original Message- 
  From: Philip J. Newman [mailto:[EMAIL PROTECTED]] 
  Sent: Monday, February 25, 2002 10:16 AM 
  To: [EMAIL PROTECTED] 
  Subject: [PHP] [NEWMAN] Collecting information from a my sql table. 



  ?php 

  $sql = SELECT * FROM `publisher` WHERE 1 AND `pub_id` = $pub_id LIMIT 1; 
  $sql_result = mysql_query($sql, $connection) or die (Could not get Query); 

  while ($row = mysql_fetch_array($sql_result)) { 
  $pub_id = $row[pub_id]; 
  $pub_headline = $row[pub_headline]; 
  $pub_dateline = $row[pub_dateline]; 
  $pub_info = $row[pub_info]; 
  $pub_image = $row[pub_image]; 

  } 

  ? 

  When I want to get just one record is there an easyer way than using the while loop 
that I have been using? 



  Philip J. Newman 
  Philip's Domain - Internet Project. 
  http://www.philipsdomain.com/ 
  [EMAIL PROTECTED] 
  Phone: +64 25 6144012 




Re: [PHP] [NEWMAN] Collecting information from a my sql table.

2002-02-24 Thread Richard Baskett

The very first record will be the very first time you assign the $row a
query result.  So basically:

$row = mysql_fetch_array($sql_result);

$row will now only have the very first results data in it, if you want the
next rows data you would just call it again:

$row = mysql_fetch_array($sql_result);

Your while statement is just doing this a bunch of times until it reaches
the end of your results.

Enjoy!

Rick

If I accept you as you are, I will make you worse; however, if I treat you
as though you are what you are capable of becoming, I help you become that.
- Johann Wolfgang von Goethe

 From: Philip J. Newman [EMAIL PROTECTED]
 Organization: Philip's Domain - Internet Project
 Reply-To: Philip J. Newman [EMAIL PROTECTED]
 Date: Mon, 25 Feb 2002 12:15:36 +1300
 To: [EMAIL PROTECTED]
 Subject: [PHP]  [NEWMAN] Collecting information from a my sql table.
 
 ?php
 
 $sql = SELECT * FROM `publisher` WHERE 1 AND `pub_id` = $pub_id LIMIT 1;
 $sql_result = mysql_query($sql, $connection) or die (Could not get Query);
 
 while ($row = mysql_fetch_array($sql_result)) {
 $pub_id = $row[pub_id];
 $pub_headline = $row[pub_headline];
 $pub_dateline = $row[pub_dateline];
 $pub_info = $row[pub_info];
 $pub_image = $row[pub_image];
 
 }
 
 ?
 
 When I want to get just one record is there an easyer way than using the while
 loop that I have been using?
 
 
 Philip J. Newman
 Philip's Domain - Internet Project.
 http://www.philipsdomain.com/
 [EMAIL PROTECTED]
 Phone: +64 25 6144012
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] RE: (HTML related) helping to creating dropdown lists from fetched arrays.

2002-02-24 Thread Matthew Darcy

RE: [PHP] RE: (HTML related) helping to creating dropdown lists from fetched
arrays.Thanks Martin.

That looks perfect.
I have adaprted what you sent to use in my test application and I am getting
an error on line 22 which is the $row= line.

Take a look and see if you can spot my error as it all looks fine to me
(again )

Thanks,

Matt.

HTML

HEAD

META NAME=GENERATOR Content=vi

TITLE Search for food/TITLE

/HEAD

BODY BGCOLOR=#ff

CENTER

TABLE BGCOLOR=#191970 WIDTH=400 HEIGHT=20

TR WIDTH=400 HEIGHT=10 BGCOLOR=#ff9900

TD WIDTH=400 FACE=arial SIZE=4 COLOR=#191970CENTER food Search
/CENTER/FONT/TD

/TR

TR HEIGHT=40 WIDTH=400

TDFONT FACE=arial SIZE=3 COLOR=#ff9900 select
name=food_type_drop_down

?php

$sql_select_food_type=select * from food_type_menu;

$results=mysql_query($sql_select_food_type);

while ($row = mysql_fetch_array($results);

{

echo option VALUE=.$row[food_search_field]..$row[food_type];

}

?

/select

/TD

/TABLE

/BODY

/HTML

  -Original Message-
  From: Martin Towell [mailto:[EMAIL PROTECTED]]
  Sent: 24 February 2002 23:13
  To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
  Subject: RE: [PHP] RE: (HTML related) helping to creating dropdown lists
from fetched arrays.


  try this: (I don't have experience w/ mysql, but I do with other dbs)

  select name=test drop down
  ?php
  $sql_select = select * from dropdown_options;
  $results = mysql_query($sql_select);
  while ($row = mysql_fetch_array($results);
  {
echo option VALUE=.$row[col1]..$row[col2];
  }
  ?
  /select

  -Original Message-
  From: Matthew Darcy [mailto:[EMAIL PROTECTED]]
  Sent: Monday, February 25, 2002 10:06 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] RE: (HTML related) helping to creating dropdown lists
  from fetched arrays.



  it does help a little.

  I know the html is wrong I used this as an example to what I wanted.

  What I need to know is how to use PHP to generate the options in the list
  from col1 and show the option 2.
  The data for these is got from an array.

  so really what I want to know is how to code in PHP



  select name=test drop down
option value=col1($row1)col2($row1)
option value=col1($row2)col2($row2)
option value=col1($row3)col2($row3)
  /select

  you get the idea ?

  Thanks,

  Matt.





  -Original Message-
  From: Cece [mailto:[EMAIL PROTECTED]]On Behalf Of Heilig (Cece) Szabolcs
  Sent: 24 February 2002 23:07
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: OT:(HTML related) helping to creating dropdown lists from
  fetched arrays.



   I want to create a dropdown list with options from a table.

   ?php
  
   $sql_select = select * from dropdown_options;
   $results = mysql_query($sql
   _select);
  
   while ($row = mysql_fetch_array($results);
   {
 echo option VALUE=$row[col1] NAME=option1
   }

  Hi!

  The problem is simple: wrong HTML
  You have to make html code similar that:

  select name=gender
option value=Ffemale
option value=Mmale
option value=0not known :)
  /select

  Hope it helps

  Cece



  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Email Verification

2002-02-24 Thread Billy S Halsey

I don't have code, since I've never needed to do this, but can anyone 
see a problem with simply issuing a VRFY or an EXPN command instead of 
actually faking out sending a message?

/bsh/

Martin Towell wrote:

You can use sockets and connect to their mail server (bit after the @) and
pretend to send an email to them, but cancel the request before you
actually send anything - doesn't always work though, as some servers will
report back the all users are correct


-- 


/-=[ BILLY S HALSEY ]=--\
| Member of Technical Staff, Sun Microsystems, Inc. ESP Solaris SW  |
| All opinions and technical advice offered in this message are my |
| own and not necessarily endorsed by my employer. |
\--=[ [EMAIL PROTECTED] ]=/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] RE: (HTML related) helping to creating dropdown lists from fetched arrays.

2002-02-24 Thread Martin Towell

original line:
while ($row = mysql_fetch_array($results);
new line:
while ($row = mysql_fetch_array($results))

-Original Message-
From: Matthew Darcy [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 10:37 AM
To: Martin Towell; [EMAIL PROTECTED]
Subject: RE: [PHP] RE: (HTML related) helping to creating dropdown lists
from fetched arrays.


RE: [PHP] RE: (HTML related) helping to creating dropdown lists from fetched
arrays.Thanks Martin.

That looks perfect.
I have adaprted what you sent to use in my test application and I am getting
an error on line 22 which is the $row= line.

Take a look and see if you can spot my error as it all looks fine to me
(again )

Thanks,

Matt.

HTML

HEAD

META NAME=GENERATOR Content=vi

TITLE Search for food/TITLE

/HEAD

BODY BGCOLOR=#ff

CENTER

TABLE BGCOLOR=#191970 WIDTH=400 HEIGHT=20

TR WIDTH=400 HEIGHT=10 BGCOLOR=#ff9900

TD WIDTH=400 FACE=arial SIZE=4 COLOR=#191970CENTER food Search
/CENTER/FONT/TD

/TR

TR HEIGHT=40 WIDTH=400

TDFONT FACE=arial SIZE=3 COLOR=#ff9900 select
name=food_type_drop_down

?php

$sql_select_food_type=select * from food_type_menu;

$results=mysql_query($sql_select_food_type);

while ($row = mysql_fetch_array($results);

{

echo option VALUE=.$row[food_search_field]..$row[food_type];

}

?

/select

/TD

/TABLE

/BODY

/HTML

  -Original Message-
  From: Martin Towell [mailto:[EMAIL PROTECTED]]
  Sent: 24 February 2002 23:13
  To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
  Subject: RE: [PHP] RE: (HTML related) helping to creating dropdown lists
from fetched arrays.


  try this: (I don't have experience w/ mysql, but I do with other dbs)

  select name=test drop down
  ?php
  $sql_select = select * from dropdown_options;
  $results = mysql_query($sql_select);
  while ($row = mysql_fetch_array($results);
  {
echo option VALUE=.$row[col1]..$row[col2];
  }
  ?
  /select

  -Original Message-
  From: Matthew Darcy [mailto:[EMAIL PROTECTED]]
  Sent: Monday, February 25, 2002 10:06 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] RE: (HTML related) helping to creating dropdown lists
  from fetched arrays.



  it does help a little.

  I know the html is wrong I used this as an example to what I wanted.

  What I need to know is how to use PHP to generate the options in the list
  from col1 and show the option 2.
  The data for these is got from an array.

  so really what I want to know is how to code in PHP



  select name=test drop down
option value=col1($row1)col2($row1)
option value=col1($row2)col2($row2)
option value=col1($row3)col2($row3)
  /select

  you get the idea ?

  Thanks,

  Matt.





  -Original Message-
  From: Cece [mailto:[EMAIL PROTECTED]]On Behalf Of Heilig (Cece) Szabolcs
  Sent: 24 February 2002 23:07
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: OT:(HTML related) helping to creating dropdown lists from
  fetched arrays.



   I want to create a dropdown list with options from a table.

   ?php
  
   $sql_select = select * from dropdown_options;
   $results = mysql_query($sql
   _select);
  
   while ($row = mysql_fetch_array($results);
   {
 echo option VALUE=$row[col1] NAME=option1
   }

  Hi!

  The problem is simple: wrong HTML
  You have to make html code similar that:

  select name=gender
option value=Ffemale
option value=Mmale
option value=0not known :)
  /select

  Hope it helps

  Cece



  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Email Verification

2002-02-24 Thread Martin Towell

I tried doing that, but some servers don't support them :(

-Original Message-
From: Billy S Halsey [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 10:39 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Email Verification


I don't have code, since I've never needed to do this, but can anyone 
see a problem with simply issuing a VRFY or an EXPN command instead of 
actually faking out sending a message?

/bsh/

Martin Towell wrote:

You can use sockets and connect to their mail server (bit after the @) and
pretend to send an email to them, but cancel the request before you
actually send anything - doesn't always work though, as some servers will
report back the all users are correct


-- 


/-=[ BILLY S HALSEY ]=--\
| Member of Technical Staff, Sun Microsystems, Inc. ESP Solaris SW  |
| All opinions and technical advice offered in this message are my |
| own and not necessarily endorsed by my employer. |
\--=[ [EMAIL PROTECTED] ]=/




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] RE: (HTML related) helping to creating dropdown lists from fetched arrays.

2002-02-24 Thread Matthew Darcy

RE: [PHP] RE: (HTML related) helping to creating dropdown lists from fetched
arrays.genius - didn't notice that, forgot to close the query.

Thanks,

Matt.

  -Original Message-
  From: Martin Towell [mailto:[EMAIL PROTECTED]]
  Sent: 24 February 2002 23:43
  To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
  Subject: RE: [PHP] RE: (HTML related) helping to creating dropdown lists
from fetched arrays.


  original line:
  while ($row = mysql_fetch_array($results);
  new line:
  while ($row = mysql_fetch_array($results))

  -Original Message-
  From: Matthew Darcy [mailto:[EMAIL PROTECTED]]
  Sent: Monday, February 25, 2002 10:37 AM
  To: Martin Towell; [EMAIL PROTECTED]
  Subject: RE: [PHP] RE: (HTML related) helping to creating dropdown lists
  from fetched arrays.



  RE: [PHP] RE: (HTML related) helping to creating dropdown lists from
fetched
  arrays.Thanks Martin.

  That looks perfect.
  I have adaprted what you sent to use in my test application and I am
getting
  an error on line 22 which is the $row= line.

  Take a look and see if you can spot my error as it all looks fine to me
  (again )

  Thanks,

  Matt.

  HTML

  HEAD

  META NAME=GENERATOR Content=vi

  TITLE Search for food/TITLE

  /HEAD

  BODY BGCOLOR=#ff

  CENTER

  TABLE BGCOLOR=#191970 WIDTH=400 HEIGHT=20

  TR WIDTH=400 HEIGHT=10 BGCOLOR=#ff9900

  TD WIDTH=400 FACE=arial SIZE=4 COLOR=#191970CENTER food Search
  /CENTER/FONT/TD

  /TR

  TR HEIGHT=40 WIDTH=400

  TDFONT FACE=arial SIZE=3 COLOR=#ff9900 select
  name=food_type_drop_down

  ?php

  $sql_select_food_type=select * from food_type_menu;

  $results=mysql_query($sql_select_food_type);

  while ($row = mysql_fetch_array($results);

  {

  echo option VALUE=.$row[food_search_field]..$row[food_type];

  }

  ?

  /select

  /TD

  /TABLE

  /BODY

  /HTML

-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: 24 February 2002 23:13
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: [PHP] RE: (HTML related) helping to creating dropdown lists
  from fetched arrays.



try this: (I don't have experience w/ mysql, but I do with other dbs)

select name=test drop down
?php
$sql_select = select * from dropdown_options;
$results = mysql_query($sql_select);
while ($row = mysql_fetch_array($results);
{
  echo option VALUE=.$row[col1]..$row[col2];
}
?
/select

-Original Message-
From: Matthew Darcy [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 10:06 AM
To: [EMAIL PROTECTED]
Subject: [PHP] RE: (HTML related) helping to creating dropdown lists
from fetched arrays.




it does help a little.

I know the html is wrong I used this as an example to what I wanted.

What I need to know is how to use PHP to generate the options in the
list
from col1 and show the option 2.
The data for these is got from an array.

so really what I want to know is how to code in PHP




select name=test drop down
  option value=col1($row1)col2($row1)
  option value=col1($row2)col2($row2)
  option value=col1($row3)col2($row3)
/select

you get the idea ?

Thanks,

Matt.






-Original Message-
From: Cece [mailto:[EMAIL PROTECTED]]On Behalf Of Heilig (Cece) Szabolcs
Sent: 24 February 2002 23:07
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: OT:(HTML related) helping to creating dropdown lists from
fetched arrays.




 I want to create a dropdown list with options from a table.

 ?php

 $sql_select = select * from dropdown_options;
 $results = mysql_query($sql
 _select);

 while ($row = mysql_fetch_array($results);
 {
   echo option VALUE=$row[col1] NAME=option1
 }

Hi!

The problem is simple: wrong HTML
You have to make html code similar that:

select name=gender
  option value=Ffemale
  option value=Mmale
  option value=0not known :)
/select

Hope it helps

Cece




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] RE: (HTML related) helping to creating dropdown lists from fetched arrays.

2002-02-24 Thread Matthew Darcy

Getting there now...

all looks well, very tidy etc.

However my drop down box is empty ?? I know there is data in the table I am
running the select on though ???

Any ideas ?

Thanks,

Matt.


-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: 24 February 2002 23:43
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: [PHP] RE: (HTML related) helping to creating dropdown lists
from fetched arrays.


original line:
while ($row = mysql_fetch_array($results);
new line:
while ($row = mysql_fetch_array($results))

-Original Message-
From: Matthew Darcy [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 10:37 AM
To: Martin Towell; [EMAIL PROTECTED]
Subject: RE: [PHP] RE: (HTML related) helping to creating dropdown lists
from fetched arrays.


RE: [PHP] RE: (HTML related) helping to creating dropdown lists from fetched
arrays.Thanks Martin.

That looks perfect.
I have adaprted what you sent to use in my test application and I am getting
an error on line 22 which is the $row= line.

Take a look and see if you can spot my error as it all looks fine to me
(again )

Thanks,

Matt.

HTML

HEAD

META NAME=GENERATOR Content=vi

TITLE Search for food/TITLE

/HEAD

BODY BGCOLOR=#ff

CENTER

TABLE BGCOLOR=#191970 WIDTH=400 HEIGHT=20

TR WIDTH=400 HEIGHT=10 BGCOLOR=#ff9900

TD WIDTH=400 FACE=arial SIZE=4 COLOR=#191970CENTER food Search
/CENTER/FONT/TD

/TR

TR HEIGHT=40 WIDTH=400

TDFONT FACE=arial SIZE=3 COLOR=#ff9900 select
name=food_type_drop_down

?php

$sql_select_food_type=select * from food_type_menu;

$results=mysql_query($sql_select_food_type);

while ($row = mysql_fetch_array($results);

{

echo option VALUE=.$row[food_search_field]..$row[food_type];

}

?

/select

/TD

/TABLE

/BODY

/HTML

  -Original Message-
  From: Martin Towell [mailto:[EMAIL PROTECTED]]
  Sent: 24 February 2002 23:13
  To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
  Subject: RE: [PHP] RE: (HTML related) helping to creating dropdown lists
from fetched arrays.


  try this: (I don't have experience w/ mysql, but I do with other dbs)

  select name=test drop down
  ?php
  $sql_select = select * from dropdown_options;
  $results = mysql_query($sql_select);
  while ($row = mysql_fetch_array($results);
  {
echo option VALUE=.$row[col1]..$row[col2];
  }
  ?
  /select

  -Original Message-
  From: Matthew Darcy [mailto:[EMAIL PROTECTED]]
  Sent: Monday, February 25, 2002 10:06 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] RE: (HTML related) helping to creating dropdown lists
  from fetched arrays.



  it does help a little.

  I know the html is wrong I used this as an example to what I wanted.

  What I need to know is how to use PHP to generate the options in the list
  from col1 and show the option 2.
  The data for these is got from an array.

  so really what I want to know is how to code in PHP



  select name=test drop down
option value=col1($row1)col2($row1)
option value=col1($row2)col2($row2)
option value=col1($row3)col2($row3)
  /select

  you get the idea ?

  Thanks,

  Matt.





  -Original Message-
  From: Cece [mailto:[EMAIL PROTECTED]]On Behalf Of Heilig (Cece) Szabolcs
  Sent: 24 February 2002 23:07
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: OT:(HTML related) helping to creating dropdown lists from
  fetched arrays.



   I want to create a dropdown list with options from a table.

   ?php
  
   $sql_select = select * from dropdown_options;
   $results = mysql_query($sql
   _select);
  
   while ($row = mysql_fetch_array($results);
   {
 echo option VALUE=$row[col1] NAME=option1
   }

  Hi!

  The problem is simple: wrong HTML
  You have to make html code similar that:

  select name=gender
option value=Ffemale
option value=Mmale
option value=0not known :)
  /select

  Hope it helps

  Cece



  --
  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] Email Verification

2002-02-24 Thread Andrew Brampton

It may of allready been mentioned, but why don't you just send out a Click
The Link To Verify email... that way you are allways 100% sure the email
addy works.. Just requires the user to follow a link

Andrew
- Original Message -
From: Martin Towell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Sunday, February 24, 2002 11:43 PM
Subject: RE: [PHP] Email Verification


 I tried doing that, but some servers don't support them :(

 -Original Message-
 From: Billy S Halsey [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 25, 2002 10:39 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Email Verification


 I don't have code, since I've never needed to do this, but can anyone
 see a problem with simply issuing a VRFY or an EXPN command instead of
 actually faking out sending a message?

 /bsh/

 Martin Towell wrote:

 You can use sockets and connect to their mail server (bit after the @)
and
 pretend to send an email to them, but cancel the request before you
 actually send anything - doesn't always work though, as some servers will
 report back the all users are correct
 

 --


 /-=[ BILLY S HALSEY ]=--\
 | Member of Technical Staff, Sun Microsystems, Inc. ESP Solaris SW  |
 | All opinions and technical advice offered in this message are my |
 | own and not necessarily endorsed by my employer. |
 \--=[ [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] RE: (HTML related) helping to creating dropdown lists from fetched arrays.

2002-02-24 Thread Matthew Darcy

apologies,

my fault forgot to include the dbconnect at the top of the page. I was
trying to access the database without loggin onto it.

Sorry all.

Matt.


-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: 24 February 2002 23:43
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: [PHP] RE: (HTML related) helping to creating dropdown lists
from fetched arrays.


original line:
while ($row = mysql_fetch_array($results);
new line:
while ($row = mysql_fetch_array($results))

-Original Message-
From: Matthew Darcy [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 10:37 AM
To: Martin Towell; [EMAIL PROTECTED]
Subject: RE: [PHP] RE: (HTML related) helping to creating dropdown lists
from fetched arrays.


RE: [PHP] RE: (HTML related) helping to creating dropdown lists from fetched
arrays.Thanks Martin.

That looks perfect.
I have adaprted what you sent to use in my test application and I am getting
an error on line 22 which is the $row= line.

Take a look and see if you can spot my error as it all looks fine to me
(again )

Thanks,

Matt.

HTML

HEAD

META NAME=GENERATOR Content=vi

TITLE Search for food/TITLE

/HEAD

BODY BGCOLOR=#ff

CENTER

TABLE BGCOLOR=#191970 WIDTH=400 HEIGHT=20

TR WIDTH=400 HEIGHT=10 BGCOLOR=#ff9900

TD WIDTH=400 FACE=arial SIZE=4 COLOR=#191970CENTER food Search
/CENTER/FONT/TD

/TR

TR HEIGHT=40 WIDTH=400

TDFONT FACE=arial SIZE=3 COLOR=#ff9900 select
name=food_type_drop_down

?php

$sql_select_food_type=select * from food_type_menu;

$results=mysql_query($sql_select_food_type);

while ($row = mysql_fetch_array($results);

{

echo option VALUE=.$row[food_search_field]..$row[food_type];

}

?

/select

/TD

/TABLE

/BODY

/HTML

  -Original Message-
  From: Martin Towell [mailto:[EMAIL PROTECTED]]
  Sent: 24 February 2002 23:13
  To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
  Subject: RE: [PHP] RE: (HTML related) helping to creating dropdown lists
from fetched arrays.


  try this: (I don't have experience w/ mysql, but I do with other dbs)

  select name=test drop down
  ?php
  $sql_select = select * from dropdown_options;
  $results = mysql_query($sql_select);
  while ($row = mysql_fetch_array($results);
  {
echo option VALUE=.$row[col1]..$row[col2];
  }
  ?
  /select

  -Original Message-
  From: Matthew Darcy [mailto:[EMAIL PROTECTED]]
  Sent: Monday, February 25, 2002 10:06 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] RE: (HTML related) helping to creating dropdown lists
  from fetched arrays.



  it does help a little.

  I know the html is wrong I used this as an example to what I wanted.

  What I need to know is how to use PHP to generate the options in the list
  from col1 and show the option 2.
  The data for these is got from an array.

  so really what I want to know is how to code in PHP



  select name=test drop down
option value=col1($row1)col2($row1)
option value=col1($row2)col2($row2)
option value=col1($row3)col2($row3)
  /select

  you get the idea ?

  Thanks,

  Matt.





  -Original Message-
  From: Cece [mailto:[EMAIL PROTECTED]]On Behalf Of Heilig (Cece) Szabolcs
  Sent: 24 February 2002 23:07
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: OT:(HTML related) helping to creating dropdown lists from
  fetched arrays.



   I want to create a dropdown list with options from a table.

   ?php
  
   $sql_select = select * from dropdown_options;
   $results = mysql_query($sql
   _select);
  
   while ($row = mysql_fetch_array($results);
   {
 echo option VALUE=$row[col1] NAME=option1
   }

  Hi!

  The problem is simple: wrong HTML
  You have to make html code similar that:

  select name=gender
option value=Ffemale
option value=Mmale
option value=0not known :)
  /select

  Hope it helps

  Cece



  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] RE: (HTML related) helping to creating dropdown lists from fetched arrays.

2002-02-24 Thread Matthew Darcy

fixed the connection problem,

I am still getting no output to the option menu.

The output HTML page looks like this.


HTML

HEAD
META NAME=GENERATOR Content=vi
TITLEThe Search Page/TITLE
/HEAD
BODY BGCOLOR=white
CENTER



TABLE BGCOLOR=#191970 WIDTH=400 HEIGHT=20
TR WIDTH=400 HEIGHT=10  BGCOLOR=#ff9900
TD WIDTH=380FONT FACE=arial SIZE=4 COLOR=#191970CENTER food 
Search
/CENTER/TD
/TR
TR HEIGHT=40
TDFONT FACE=arial SIZE=3 COLOR=#ff9900 SELECT
NAME=food_type_drop_down
option VALUE=/TD
/select
/TR
/TABLE
/TABLE
/CENTER
/BODY
/HTML

if I do a select * from food_type_menu;
at the sql prompt it returns 4 rows. as this is the same sql query I run in
the php script I would expect it to return 4 rows also ? I am a little lost
to why my menu has no options.

Thanks,

Matt.


-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: 24 February 2002 23:43
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: [PHP] RE: (HTML related) helping to creating dropdown lists
from fetched arrays.


original line:
while ($row = mysql_fetch_array($results);
new line:
while ($row = mysql_fetch_array($results))

-Original Message-
From: Matthew Darcy [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 10:37 AM
To: Martin Towell; [EMAIL PROTECTED]
Subject: RE: [PHP] RE: (HTML related) helping to creating dropdown lists
from fetched arrays.


RE: [PHP] RE: (HTML related) helping to creating dropdown lists from fetched
arrays.Thanks Martin.

That looks perfect.
I have adaprted what you sent to use in my test application and I am getting
an error on line 22 which is the $row= line.

Take a look and see if you can spot my error as it all looks fine to me
(again )

Thanks,

Matt.

HTML

HEAD

META NAME=GENERATOR Content=vi

TITLE Search for food/TITLE

/HEAD

BODY BGCOLOR=#ff

CENTER

TABLE BGCOLOR=#191970 WIDTH=400 HEIGHT=20

TR WIDTH=400 HEIGHT=10 BGCOLOR=#ff9900

TD WIDTH=400 FACE=arial SIZE=4 COLOR=#191970CENTER food Search
/CENTER/FONT/TD

/TR

TR HEIGHT=40 WIDTH=400

TDFONT FACE=arial SIZE=3 COLOR=#ff9900 select
name=food_type_drop_down

?php

$sql_select_food_type=select * from food_type_menu;

$results=mysql_query($sql_select_food_type);

while ($row = mysql_fetch_array($results);

{

echo option VALUE=.$row[food_search_field]..$row[food_type];

}

?

/select

/TD

/TABLE

/BODY

/HTML

  -Original Message-
  From: Martin Towell [mailto:[EMAIL PROTECTED]]
  Sent: 24 February 2002 23:13
  To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
  Subject: RE: [PHP] RE: (HTML related) helping to creating dropdown lists
from fetched arrays.


  try this: (I don't have experience w/ mysql, but I do with other dbs)

  select name=test drop down
  ?php
  $sql_select = select * from dropdown_options;
  $results = mysql_query($sql_select);
  while ($row = mysql_fetch_array($results);
  {
echo option VALUE=.$row[col1]..$row[col2];
  }
  ?
  /select

  -Original Message-
  From: Matthew Darcy [mailto:[EMAIL PROTECTED]]
  Sent: Monday, February 25, 2002 10:06 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] RE: (HTML related) helping to creating dropdown lists
  from fetched arrays.



  it does help a little.

  I know the html is wrong I used this as an example to what I wanted.

  What I need to know is how to use PHP to generate the options in the list
  from col1 and show the option 2.
  The data for these is got from an array.

  so really what I want to know is how to code in PHP



  select name=test drop down
option value=col1($row1)col2($row1)
option value=col1($row2)col2($row2)
option value=col1($row3)col2($row3)
  /select

  you get the idea ?

  Thanks,

  Matt.





  -Original Message-
  From: Cece [mailto:[EMAIL PROTECTED]]On Behalf Of Heilig (Cece) Szabolcs
  Sent: 24 February 2002 23:07
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Subject: OT:(HTML related) helping to creating dropdown lists from
  fetched arrays.



   I want to create a dropdown list with options from a table.

   ?php
  
   $sql_select = select * from dropdown_options;
   $results = mysql_query($sql
   _select);
  
   while ($row = mysql_fetch_array($results);
   {
 echo option VALUE=$row[col1] NAME=option1
   }

  Hi!

  The problem is simple: wrong HTML
  You have to make html code similar that:

  select name=gender
option value=Ffemale
option value=Mmale
option value=0not known :)
  /select

  Hope it helps

  Cece



  --
  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] How to create CSV file on client?

2002-02-24 Thread Petras Virzintas

Hi, is there a recommended PHP way of extracting data from a MySQL database and 
creating a CSV (Comma-seperated-values) file on the client (not the server).

Thanks in advance
Petras




[PHP] HTTP Request Headers - PUHLEASE HELP!

2002-02-24 Thread SpamSucks86

I have an infinitely annoying problem. I coded a script which tracks who
viewed my profile in AOL Instant Messenger. When they click on a link
(AIM inserts their screen name into the URL) the script records it.
However, it does not replace spaces in their screen name with %20 like a
normal browser would. IIS hates this and just returns bad request.
Apache handles it a bit more gracefully, but everything after the space
is lost. When I went to phpinfo() however, it displayed the GET header
(GET blah.php?blah=wow wow HTTP/1.1). How can my script access the GET
header? getallheaders() returns the headers but it excludes the GET
line. Thankyou for your help!



RE: [PHP] HTTP Request Headers - PUHLEASE HELP!

2002-02-24 Thread Martin Towell

what about $argv ?

-Original Message-
From: SpamSucks86 [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 11:40 AM
To: [EMAIL PROTECTED]
Subject: [PHP] HTTP Request Headers - PUHLEASE HELP!


I have an infinitely annoying problem. I coded a script which tracks who
viewed my profile in AOL Instant Messenger. When they click on a link
(AIM inserts their screen name into the URL) the script records it.
However, it does not replace spaces in their screen name with %20 like a
normal browser would. IIS hates this and just returns bad request.
Apache handles it a bit more gracefully, but everything after the space
is lost. When I went to phpinfo() however, it displayed the GET header
(GET blah.php?blah=wow wow HTTP/1.1). How can my script access the GET
header? getallheaders() returns the headers but it excludes the GET
line. Thankyou for your help!



RE: [PHP] Email Verification

2002-02-24 Thread Rodolfo Gonzalez

On Mon, 25 Feb 2002, Martin Towell wrote:
 You can use sockets and connect to their mail server (bit after the @) and
 pretend to send an email to them, but cancel the request before you
 actually send anything - doesn't always work though, as some servers will
 report back the all users are correct

Anyway, you'd have problems, because for @something sometimes something 
has a MX pointing to something else. Also, with regex it'd be a bit 
difficult (I just remember when I propossed to use e-mail checks in IMP, 
the guys came with a two page long regex just to cover one part of the RFC 
:( ). Anyway for general pourpose it'be useful the class by Manuel Lemos 
(look for it in php classes).

Regards.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] HTML Email Has Random '!'

2002-02-24 Thread Steven Walker

Hi,

Has anybody every had problems with random characters showing up in HTML 
email messages?

I've set up an auto-responding email system for product purchasing and 
registration. The system sends multipart HTML and plain text messages 
using mail(). However, exclamation points are showing up in random 
places. I have no idea where they come from... over and over I've looked 
at my source code but can't find any correlation.

For example, here's a clip from an email message:
Support:
If you need any assistance, or would like to arrange another method of
delivery, please conta! ct:

And the code that generates this text looks like:
$email_html .= /b/fontfont face=\Verdana, Arial, Helvetica, 
sans-serif\ size=\2\ color=\#33\;
$email_html .= If you need any assistance, or would like to arrange 
another method ofbrdelivery, please contact:;
$email_html .= /font/ppa 
href=\mailto:[EMAIL PROTECTED]\;;

Sorry this is so hard to read... but the point is that the '!' is not in 
my code. When I make subtle changes to the code, the '!' shows up in 
other places.

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]



RE: [PHP] HTML Email Has Random '!'

2002-02-24 Thread Martin Towell

it's to do with the length of a line - I think it's 1024 - if a lines longer
than that, an ! is put there and a new line is made

Martin

-Original Message-
From: Steven Walker [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 25, 2002 1:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP] HTML Email Has Random '!'


Hi,

Has anybody every had problems with random characters showing up in HTML 
email messages?

I've set up an auto-responding email system for product purchasing and 
registration. The system sends multipart HTML and plain text messages 
using mail(). However, exclamation points are showing up in random 
places. I have no idea where they come from... over and over I've looked 
at my source code but can't find any correlation.

For example, here's a clip from an email message:
Support:
If you need any assistance, or would like to arrange another method of
delivery, please conta! ct:

And the code that generates this text looks like:
$email_html .= /b/fontfont face=\Verdana, Arial, Helvetica, 
sans-serif\ size=\2\ color=\#33\;
$email_html .= If you need any assistance, or would like to arrange 
another method ofbrdelivery, please contact:;
$email_html .= /font/ppa 
href=\mailto:[EMAIL PROTECTED]\;;

Sorry this is so hard to read... but the point is that the '!' is not in 
my code. When I make subtle changes to the code, the '!' shows up in 
other places.

Steven J. Walker
Walker Effects
www.walkereffects.com
[EMAIL PROTECTED]



[PHP] Subdirectory

2002-02-24 Thread Uma Shankari T.


Hello,

  
   Is there any function to display the subdirectory structure of the root
directory using php...


 Is anyone know this plz tell me



-Uma


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Subdirectory

2002-02-24 Thread Bogdan Stancescu

You may want to look at dir() under Directory Functions - it also comes 
with a handy example...

Bogdan

Uma Shankari T. wrote:

Hello,

  
   Is there any function to display the subdirectory structure of the root
directory using php...


 Is anyone know this plz tell me



-Uma






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] SAP DB

2002-02-24 Thread alex black

hi all,

One of the binarycloud developers just told me to have a look at the SAP OS
database, SAPDB.

I'm going to test it tomorrow to see if it actually does what it claims, but
this _looks_ like serious OS competition to Oracle, and if it is I would
very much like to use it for my next project.

So, question:

Has anyone used SAPDB with PHP? If so, experiences? And if not, are there
plans for drivers? I looked in the manual and I didn't see any mention of
SAPDB.

Oh, and I just found a mention of PHP on the SAPDB site. Looks like the
connection is over ODBC, which I really _really_ dislike... are there plans
for anything native? like a sapdb_connect :)?

In any case I think this database has a _HUGE_ amount of potential and PHP
would benefit if access to SAPDB was possible.

please e-mail me directly as I am not subscribed to the NGs:

[EMAIL PROTECTED]
or [EMAIL PROTECTED]

thanks,

_alex



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Email Verification

2002-02-24 Thread Jason Wong

On Monday 25 February 2002 07:43, Martin Towell wrote:
 I tried doing that, but some servers don't support them :(

 -Original Message-
 From: Billy S Halsey [mailto:[EMAIL PROTECTED]]
 Sent: Monday, February 25, 2002 10:39 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Email Verification


 I don't have code, since I've never needed to do this, but can anyone
 see a problem with simply issuing a VRFY or an EXPN command instead of
 actually faking out sending a message?

It's usually turned off to prevent spammers from checking for valid email 
addresses to which they can send their obnoxious stuff.


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Programmers used to batch environments may find it hard to live without
giant listings; we would find it hard to use them.
-- D.M. Ritchie
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] mysql 4 windows

2002-02-24 Thread jtjohnston

Does anyone know if mysql 4 windows is up to snuff yet?
I'm running  http://www.easyphp.org/
Can it be installed as localhost2?

John


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: php - mail() and sendmails clientmqueue directory

2002-02-24 Thread Luke Vogel

Luke Vogel wrote:

[snip]
 Has anyone else experienced this issue, and or can anyone recommend a
 secure solution.

Found the solution ...

http://www.sendmail.org/~ca/email/doc8.12/SECURITY

-- 
Regards
Luke
--
Q:  What does FAQ stand for?
A:  We are Frequently Asked this Question, and we have no idea.
--
C.O.L.S FAQ - http://www.linuxsecurity.com/docs/colsfaq.html
Note: Remove NOSPAM from my return address if necessary
--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] login determines content on page

2002-02-24 Thread William Lovaton

El sáb, 23-02-2002 a las 01:56, jtjohnston escribió:
 What's the difference between
 if (isset($submit_happening))
 and
 if $submit_happening)

if (isset($var))  evaluates whether $var exists or not
if ($var) evaluates de value of $var

$var = 1;
if(isset($var))  --  TRUE
if($var) --  TRUE

---===(O)===---

$var = 0;
if(isset($var))  --  TRUE
if($var) --  FALSE


William


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] mysql 4 windows

2002-02-24 Thread Matthew Walker

Yes. MySQL is as stable as the box you run it on. ;)

Matthew Walker
Ecommerce Project Manager
Mountain Top Herbs


-Original Message-
From: jtjohnston [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, February 24, 2002 10:06 PM
To: [EMAIL PROTECTED]
Subject: [PHP] mysql 4 windows

Does anyone know if mysql 4 windows is up to snuff yet?
I'm running  http://www.easyphp.org/
Can it be installed as localhost2?

John


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.325 / Virus Database: 182 - Release Date: 2/19/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.325 / Virus Database: 182 - Release Date: 2/19/2002
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Entering data into MySQL

2002-02-24 Thread Tim Thorburn

Hi,

I'm having troubles entering information from a form into a MySQL 
database.  Specifically if the user enters an apostrophe anywhere in the 
form, all the information is rejected and nothing is entered into the database.

After researching a little on php.net I found the addslashes() command - 
this did help briefly and I was able to use apostrophe's in the form ... 
but it seems as the problem has resurfaced.

To make matters more frustrating, the addslashes() command works perfectly 
well on my local test machine (Win2k Pro, PHP 4.1.1, MySQL 3.23.44, Apache 
1.3.23) but not at all on the server which is hosted by another company 
(Sun Solaris, PHP 3.0.16, MySQL 3.22.32, Apache 1.3.12).

Does anyone have any suggestions as to why the addslashes() command worked 
for a short time on the webserver and why it stopped?  Or better yet, is 
there a variation of addslashes() that will work on an older version of PHP 
such as 3.0.16?

I'd be eternally grateful for any prompt replies as its already 2.38am and 
my deadline is 9am :P

Thank you
-Tim Thorburn



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Entering data into MySQL

2002-02-24 Thread Andrey Hristov

Try doing it by yourself.
$the_str = str_replace('','\',$the_str);
$the_str = str_replace(',\\',$the_str);

This is a little hack until you find what is the problem with addslashes();

Best regards,
Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
BALANCED SOLUTIONS

- Original Message - 
From: Tim Thorburn [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 25, 2002 9:39 AM
Subject: [PHP] Entering data into MySQL


 Hi,
 
 I'm having troubles entering information from a form into a MySQL 
 database.  Specifically if the user enters an apostrophe anywhere in the 
 form, all the information is rejected and nothing is entered into the database.
 
 After researching a little on php.net I found the addslashes() command - 
 this did help briefly and I was able to use apostrophe's in the form ... 
 but it seems as the problem has resurfaced.
 
 To make matters more frustrating, the addslashes() command works perfectly 
 well on my local test machine (Win2k Pro, PHP 4.1.1, MySQL 3.23.44, Apache 
 1.3.23) but not at all on the server which is hosted by another company 
 (Sun Solaris, PHP 3.0.16, MySQL 3.22.32, Apache 1.3.12).
 
 Does anyone have any suggestions as to why the addslashes() command worked 
 for a short time on the webserver and why it stopped?  Or better yet, is 
 there a variation of addslashes() that will work on an older version of PHP 
 such as 3.0.16?
 
 I'd be eternally grateful for any prompt replies as its already 2.38am and 
 my deadline is 9am :P
 
 Thank you
 -Tim Thorburn
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP Frames?

2002-02-24 Thread Jason Caldwell

I'm trying to pass vars into a php (html) file that uses FRAMES -- top, main
and bottom.

The TOP frame has my menu items.  The MAIN frame will show the pages, and
the BOTTOM frame will have my footer stuff --

Now, when I click on a menu item in the TOP frame I want the TOP and MAIN
frames to update.  My frame page is named: index.php and it links to
head.php (goes in TOP frame), body.php (goes in MAIN frame), and footer.php
(goes in BOTTOM frame.)

So, what I tried (seems logical enough) is to simply call the INDEX.PHP file
with some vars attached, like so a href=http://127.0.0.1/index.php?s=1
target=_topLoad Page/a

Within the Index.php Frames Page (which the var gets passed to) the other
pages don't seem to recognize the var and simply do nothing --

For example -- in the head.php file I have it update an image if s=1, and in
the body.php file, if s=1 a certain page loads -- this all works fine
without frames.

Any suggestions -- I want to use frames if I can, and avoid Java.

Thanks.
Jason



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php