[PHP] Random include???

2002-12-19 Thread Benjamin Trépanier
Hi, I'm a newbie in php so sorry for that question!

I have a table in a html dcc and I want toinclude a file in a cell, but
that file must be random so people load a different page each time they
refresh... The basic syntax I use for the include is below now, I want to
know how to generate the random.

Ex. My file are

folio_1.php3  
folio_2.php3  
folio_3.php3  
folio_4.php3  
folio_5.php3  



TD WIDTH=77 HEIGHT=435 ROWSPAN=2 align=left? include(folio.php3);
?/TD


Thanks!
Ben


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




[PHP] Show only user that variable musiccontain pop

2002-11-27 Thread Benjamin Trépanier
Hi, I need information about  a simple command...

I have a DB (of course...) and I need to show only ID that variable
musiccontain  pop

I found this example that is suppose to do a similar thing in a msql
query...

SELECT * FROM $TBL_NEWS WHERE music LIKE '%pop%' AND  ORDER BY name


So it's not working properly...

Thanks for your help

Ben


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




Re: [PHP] Show only user that variable musiccontain pop

2002-11-27 Thread Benjamin Trépanier

$req = MYSQL_QUERY(SELECT id FROM $TBL_NEWS ORDER BY nom LIMIT 0,
$limit_news);
$res = MYSQL_NUM_ROWS($req);

This is my lines... It's not working... :-(

Thanks for your help



Le 27/11/02 15:23, « Support @ Fourthrealm.com » [EMAIL PROTECTED] a
écrit :


 If you only have one condition, then get rid of the AND in the where
 statement;

 Select only the fields that you need, instead of *

 Like this:

 SELECT id FROM $TBL_NEWS WHERE music LIKE '%pop%'  ORDER BY name


 Peter

 At 03:16 PM 11/27/2002 -0500, Benjamin Trépanier wrote:
 Hi, I need information about  a simple command...

 I have a DB (of course...) and I need to show only ID that variable
 musiccontain  pop

 I found this example that is suppose to do a similar thing in a msql
 query...

 SELECT * FROM $TBL_NEWS WHERE music LIKE '%pop%' AND  ORDER BY name


 So it's not working properly...

 Thanks for your help

 Ben


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

 - - - - - - - - - - - - - - - - - - - - -
 Fourth Realm Solutions
 [EMAIL PROTECTED]
 http://www.fourthrealm.com
 Tel: 519-739-1652
 - - - - - - - - - - - - - - - - - - - - -


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



$req = MYSQL_QUERY(SELECT id FROM $TBL_NEWS ORDER BY nom LIMIT 0,
$limit_news);
$res = MYSQL_NUM_ROWS($req);

This is my lines... It's not working... :-(

Thanks for your help


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




[PHP] Upload permission on a web_user space...

2002-11-04 Thread Benjamin Trépanier
Hello, I'm trying again to ask you that question because I was not
understand.

I have a unix server hosting service, my hosting service allow me to create
web_server. Those are create for my client who have to upload differents
things. So when people are connecting to my ftp (example  on IE...) they can
see any folder in their web_user space and can upload stuff in any folder of
their level... So the set upload permission is not working... What can I do

Is it possible to create a upload page (php) that allow user to see every
folder of his web_user space??

Thanks!


Ben


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




RE: [PHP] Want to exclude first 10 records from table

2002-10-16 Thread Smith, Benjamin

select * from forum order by postdate desc LIMIT 10, -1

Assuming you are using MySQL of course.

See the official documentation for further assistance:

http://www.mysql.com/doc/en/SELECT.html

-Original Message-
From: Manisha [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 16 October 2002 4:44 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Want to exclude first 10 records from table


I am having forum table. First 10 records are treated as Current postings 
and rest are treated as Archive.

I know how to take first 10

select * from forum order by postdate desc LIMIT 10

But I do not know how to take postings excluding above 10. I do not want to 
make use of loop rather I want to do this in one single query as I need to 
pass this to some further include files.

Thanks in advance
Manisha


-- 
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] why can't i do this?

2002-10-16 Thread Smith, Benjamin

Because the first example is not correct syntax?

I wasn't aware that the first element in a comparison could ever be left out, is it 
that way in other languages?

-Original Message-
From: Peter Houchin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 17 October 2002 2:15 PM
To: php_gen
Subject: [PHP] why can't i do this?


howdy 

can some one please tell me why i can't do this

elseif ($_POST['cost'] =4  =20001){...}

but i can do this 

elseif ($_POST['cost'] =4  $_POST['cost'] =20001){...}



Cheers 

Peter 
the only dumb question is the one that wasn't asked 
 

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


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




RE: [PHP] MySQL GMT -- Local time

2002-10-16 Thread Smith, Benjamin

Local to the client or local to the server?

-Original Message-
From: Jason [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 17 October 2002 3:26 PM
To: php_gen
Subject: [PHP] MySQL GMT -- Local time



My logging application is feeding a MySQL database with data records
that are time stamped with GMT time.  I would like to query the database
for records matching local time(eg. all records created on oct
17,2002 local time).  I would prefer if the records could be formated
in local time when returned from MySQL.  What is the best way to do this.

Jason





-- 
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] Odd request

2002-10-12 Thread Smith, Benjamin

No, there isn't, and no, there probably shouldn't be, since the height in pixels that 
the page will render in is dependent on client-side attributes like font size, 
resolution, browser type, etc.

This might be an appropriate function in javascript, but not php.



Any way in php to determine at what height html content will render???  If
not, should there be?




-- 
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] Extract HTML tags

2002-10-09 Thread Smith, Benjamin

There are a couple of ways you could do it, the proper way with a regular expression, 
or you could just kludge it using explode() and chucking out the stuff you did not 
need.

-Original Message-
From: Shawn McKenzie [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 10 October 2002 7:43 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Extract HTML tags


I've loaded an html file into a string.  What I'd like to do is create two
new strings:

first new string with the original string but remove all content from the
beginning of the file up to and including body, and then remove from the
end of file up to and including /body

second new string only containing content after head up to and including
body

Any ideas on simple ways to do this?

TIA
-Shawn



-- 
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] Access denied to php files in Netscape 6

2002-10-02 Thread Smith, Benjamin

It's not impossible if the site is not opened up to full public access, and he is 
using different proxy settings on each browser. 

Check those.

-Original Message-
From: Chris Shiflett [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 2 October 2002 4:23 PM
To: Chris Nielsen
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Access denied to php files in Netscape 6


This seems absolutely impossible. Can you verify that you are using the 
*exact* same URL with each browser? I would recommend copy/pasting the 
URL from each into a text document or something to be sure every slash, 
etc., is identical.

This will also ensure that you are accessing these scripts via the 
http:// scheme rather than the file:// scheme.

Chris

Chris Nielsen wrote:

I'm running PWS on WinXP Pro. I can't test my php stuffs in Netscape cause
it says Access Denied when I try to access any php file. They work fine in
IE6.



-- 
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] Cookie

2002-10-02 Thread Smith, Benjamin

The register globals function must be turned ON in your php.ini for the first method 
to work.

-Original Message-
From: Max Buvry [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 2 October 2002 2:38 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Cookie 




Hi,

I use : apache 1.3.26, php 4.2.3, postgresql 7.2 (under solaris 7).

I attempt to modify my old sources which run with the previous versions
and I meet a problem with the cookie.

I read that we can see the contents of a cookie with 2 methods :

echo $testcookie
echo $_COOKIE[testcookie]

For me, only the second method runs.

An idea ?

In advance, thanks

mb

-- 
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] remote desktop control

2002-10-01 Thread Smith, Benjamin

Not really, no. It goes well beyond the capabilities of a server-side scripting 
language.

There is a java implementation in VNC that allows this capability, though.

-Original Message-
From: Rahul [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 1 October 2002 4:53 PM
To: [EMAIL PROTECTED]
Subject: [PHP] remote desktop control


Hello all,
  
   Is it possible to implement Web Based Remote Desktop Control using PHP or anyother 
webbased language? 
Aim is to share the remote(visitor's) system(desktop).
If possible, plz let me know how to proceed.


Advance thanks,
-sadha

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




RE: [PHP] Can I pass the ftp transfer mode in a string?

2002-09-30 Thread Smith, Benjamin

What if you enclose it in single quotes?

-Original Message-
From: John Kelly [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 1 October 2002 12:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Can I pass the ftp transfer mode in a string?


Can I pass the ftp transfer mode in a string like ...

$filetype = FTP_ASCII;
$upload = ftp_fput($conid, $dfile, $sfile, $filetype);

I ask as when I do I get the following error message ...

Warning: ftp_fput() expects parameter 4 to be long, string given

If I replace $filetype with the text FTP_ASCII or FTP_BINARY it works fine.



-- 
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] image wrapper - graphs

2002-09-30 Thread Smith, Benjamin

Try gnuplot: 

-Original Message-
From: Mike Mannakee [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 1 October 2002 2:31 PM
To: [EMAIL PROTECTED]
Subject: [PHP] image wrapper - graphs


Hi,

Does anyone know of image creation libraries that will generate graphs?

Mike



-- 
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] syntax question

2002-09-29 Thread Smith, Benjamin

Check out this tutorial on the MySQL website:

http://www.mysql.com/articles/mysql_intro.html

It contains links to the basics of SQL and its syntax, as well as giving you a good 
grounding in MySQL specifically.

As others have stated, most of the functionality you really need should be built into 
the SQL query. It's redundant to request excessive results from the database server, 
only to filter them out with custom php routines.

-Original Message-
From: Chris Shiflett [mailto:[EMAIL PROTECTED]]
Sent: Monday, 30 September 2002 3:30 PM
To: Justin French
Cc: Jeff Bluemel; [EMAIL PROTECTED]
Subject: Re: [PHP] syntax question


Justin French wrote:

on 30/09/02 2:44 PM, Jeff Bluemel ([EMAIL PROTECTED]) wrote:
  

how to I test for a null value?


empty()?  isset()?  if($var == )?  if($var == NULL)??  have a look in
the php manual for string functions, and comparison operators


I think he maybe meant testing for null values in SQL.

If this is true, there is the null keyword: is null and is not null.

select * from table_name where column_name is not null

This selects all rows from a table where the data in column column_name 
is not null. Be careful with this, as it actually tests for null and not 
an empty string, for example. If you want to test whether a value is 
null once you have assigned it to a PHP variable, you can use one of 
Justin's suggestions.

In addition, PHP has null as well.

Happy hacking.

Chris


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


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




RE: [PHP] Keeping your published script safe?

2002-09-26 Thread Smith, Benjamin

There's no real foolproof free way of doing this, it's a fact of life that there will 
always be people who do this. I wouldn't lose sleep over it.

Console yourself with the fact that for every person who does not acknowledge your 
effort, there are probably 10 people who do.

-Original Message-
From: Stephen Craton [mailto:[EMAIL PROTECTED]]
Sent: Friday, 27 September 2002 7:09 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Keeping your published script safe?


Hello,

I have many scripts published at various script sites and I just got a
report of an incident where the user has removed my copyright at the
bottom of the script. We have reached an agreement thank heavens,
they're going to go search for a script that doesn't require the
copyright.

Anyway, I was just wondering if there was any program or script that can
keep your script safe from people removing the copyright. Please help!
I'd really like to keep my scripts safe from those hacker people.

Thanks,
Stephen
http://www.melchior.us
http://php.melchior.us



-- 
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] length function

2002-09-26 Thread Smith, Benjamin

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

-Original Message-
From: Jeff Bluemel [mailto:[EMAIL PROTECTED]]
Sent: Friday, 27 September 2002 1:35 PM
To: [EMAIL PROTECTED]
Subject: [PHP] length function


I am looking for a function that will give me the number of characters of a
string, or number.  I tried using the function length, but that function
seems to deal with arrays, and doesn't seem to function like I am intending
it to.

--

Thanks,

Jeff Bluemel



-- 
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] [REGEX] Regex ref to '' character problem (fwd)

2002-07-11 Thread Benjamin Plaquevent

Hi,

I try to refer to the '' character in a regex using preg_replace
function:

preg_replace(/(http:\/\/.\S+(?![\\]))/, a href=\$1\
target='ext'$1/a, http://testbr);

Ref to '' with '\' seems to work but not '' with '\'...

Any idea???

Thanks!



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




[PHP] header() and frameset

2002-02-01 Thread Benjamin deRuyter

Does anybody know of a way to break out of a frameset while using the
following code to redirect the browser:

header(Location: http://www.anywhere.com/;);
exit();

Thanks.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] problems with mt_rand()

2002-01-31 Thread Benjamin deRuyter

I need to generate a random number (range is not crucial) and I have been
trying to use mt_rand().  However, I am finding that is generates the same
value EVERY time.  This is true whether I supple a range or not.  For
example, the follow line of code generated 13 EVERY time...

$result = mt_rand(1,15);
echo $result;

In addition, this line of code generated 1755202938 EVERY time...

$result = mt_rand();
echo $result;

What am I doing wrong??

 - Ben


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] redirection rather than include()

2002-01-31 Thread Benjamin deRuyter

This is a PHP newbie trying to figure something out.

I am creating a web-app which begins with a login page and goes through the
typical user/pass validation and upon success moves to a frameset where the
application will run.  The action of the login form is act_login.php.  In
that script I validate the user/pass and, upon validation, include() the
frameset script.  However, I would rather redirect the browser to the
frameset script.  In other words I want to progression to go like this...

login form -- successful login (determined by act_login.php) -- redirect
browser to app frameset

This scenario is probably swimming in technicalities, and I'm probably just
fine using the include() statement.  However, I guess my overall question
is... is there a way to redirect the browser to a new URL (eg. php script)
inside something as simple as an if/then statement?

Thanks!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] CGI vs. ISAPI

2002-01-27 Thread Benjamin deRuyter

I'm fairly new to PHP, having worked with ColdFusion in the past.  Can
somebody shed some light on to the key differences between the CGI
installation and the ISAPI installation.  I working with IIS on Win2k and
using MySQL for a db server.  Thanks.

 - Ben


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





[PHP] Post CGI variable to PHP

2002-01-10 Thread Benjamin Bostow

I am trying to pass variables from a CGI/Perl script
to a php page. I know how to pass it through the url
(i.e. page.php?tmp=[var1]tmp2=[var2]) but need to
know how to pass it so that the information does not
show up in the url. 

Benjamin

__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: PHP+MYSQL unable to select database

2001-12-10 Thread Benjamin Pflugmann

Hi.

First, please avoid cross-posting.

Try to narrow down the problem by trying from the command line client
(i.e. try to rule out PHP as source of the problem). If that doesn't
work, try the PHP list.

If you are successful, it belongs to the MySQL list (as PHP is no
longer part of the problem).

And it doesn't sound like any particular debian problem at all.

On Mon, Dec 10, 2001 at 11:58:51AM +0100, [EMAIL PROTECTED] wrote:
 I can't select a database from a php script.

What means i can't select? Does it simply show no effect? Do you get
an error? Anything else?

 I've set privileges in both the user and the data base tables
 and I've done FLUSH PRIVILEGES;
 
 WHY?

I cannot say, because you did not provide enough information, mainly
which error message you get (provided you got one).

You may want to have a look at the following section from the fine
manual: http://www.mysql.com/doc/A/c/Access_denied.html

If that doesn't help, don't forget to mention, what you already have
tried. And please write only to one list at a time, the one which
seems most appropriate. Thanks.

Bye,

Benjamin.


PS: Reply-To set accordingly.

-- 
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Store locator / postcode proximity

2001-12-09 Thread Smith, Benjamin

I wouldn't trust a 10-above or 10-below rule, personally, unless you
weren't too concerned about the accuracy of your information.

Why don't you give Australia Post a call?

-Original Message-
From: Jason Murray [mailto:[EMAIL PROTECTED]] 
Sent: Monday, 10 December 2001 10:22 AM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Store locator / postcode proximity

Hi folks,

I've seen messages on here in the past about Store Locator tools,
where someone enters a postcode and the nearest store to that postcode
is found.

I'm wondering if anyone has any information about how to get the 
proximity data for postcodes in Australia? Or is it safe to assume
that if a postcode is, say, 3107, that 3120 or 3110 (for example) 
are nearby as well as 3108 (so, perhaps, 10 above and 10 below could
be safely assumed to be nearby?)

I saw some mention of this a few months ago here from some of the
other Aussies on the list, but I've long since lost the archived
messages.

Could someone please help me a little with this? :)

Thanks

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] very urgent assistance

2001-12-05 Thread Smith, Benjamin

This would have to be the most bizarre spam I have ever read.
 

-Original Message-
From: Adewale.Johnson [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, 6 March 2001 6:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP] very urgent assistance

Dr.Adewale.Johnson.
16 Kingsway Road 
Ikoyi, Lagos 
Nigeria.. 
[EMAIL PROTECTED]
6th, December , 2001. 
 
Sir, 
 
Request for Urgent Business Relationship. 
 
First I must solicit your confidence in this transaction. This is by 
virtue of its nature as being utterly confidential and top secret. We
shall 
be counting on your ability and reliability to prosecute a transaction
of 
great magnitude  involving a pending business transaction requiring 
maximum confidence. 
 
We are top officials of the Federal Government Contract Review Panel who

are interested  in importation of goods into our country with 
funds which are presently trapped in Nigeria. In order to commence this 
business we solicit  your assistance to enable us RECIEVE the 
said trapped funds ABROAD. 
 
The source of this fund is as follows : During the regime of our late 
head of state, Gen.  Sani Abacha, the government officials set up 
companies and awarded themselves contracts which were grossly 
over-invoiced in various  Ministries. The NEW CIVILIAN Government 
set up a Contract Review Panel (C.R.P) and we have identified a lot of 
inflated contract  funds which are presently floating in the Central 
Bank of Nigeria (C.B.N). However, due to our position as civil servants 
and members of this  panel, we cannot acquire this money in our 
names. I have therefore, been delegated as a matter of trust by my 
colleagues of the panel  to look for an Overseas partner INTO whose 
ACCOUNT the sum of US$31,000,000.00 (Thirty one Million United States 
Dollars) WILL  BE PAID BY TELEGRAPHIC TRANSFER. 
Hence we are writing you this letter.  
We have agreed to share the money thus: 
70% for us (the officials) 
20% for the FOREIGN PARTNER (you) 
10% to be used in settling taxation and all local and foreign expenses. 
 
It is from this 70% that we wish to commence the importation business. 
Please note that this  transaction is 100% safe and we hope that the
funds arrive your 
account in latest ten (10)  banking days from  the date of reciept of
the following 
information  by email: A suitable name and bank account into which the
funds can 
be paid. 
 
The above information will enable us write letters of claim and job 
description respectively. 
This way we will use your company's name to 
apply for payments and re-award the contract in your company name. 
 
We are looking forward to doing business with you and solicit your 
confidentiality in this  transaction. 
 
For security reasons, please respond only to the above email address or
fax number 234 
1 7747907. I will bring you  into the complete picture of this pending
project when I have 
heard from you. 
 
Yours Faithfully, 
Dr.Adewale.Johnson.
Tel/fax: 234 1 7747907 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] odrer by alphabet

2001-12-03 Thread Smith, Benjamin

You can simply order by that field in your SQL string...ie:

SELECT * FROM TABLENAME ORDER BY FIELDNAME;

And to switch the order:

SELECT * FROM TABLENAME ORDER BY FIELDNAME DESC;

-Original Message-
From: Rambo Amadeus [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, 4 December 2001 1:15 PM
To: [EMAIL PROTECTED]
Subject: [PHP] odrer by alphabet

hi, i have about 100 names in my database. How should i list them by
alphabet.

Thanks


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] apache + ftp!

2001-11-12 Thread Benjamin

hey group!

i have apache installed on an win2000 machine and now i need an good and
stable ftp server! which one does i take!

thank you, ben




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: apache + ftp!

2001-11-12 Thread Benjamin

do you know about cerberus-ftp? how is it?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Can PHP and Java work together?

2001-08-31 Thread Benjamin Lupu

Jack,

You can either check your text field with JavaScript before submitting your
form or
after on server-side with PHP. I prefer to use JavaScript because it saves a
back
and forth.

here an example of that :

http://1ppl.free.fr/scripts/javascript16.htm

For the printing function, check that :

http://1ppl.free.fr/scripts/javascript04.htm

Enjoy :-)


Jack [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Dear all
 I want to ask if i want to perform two task after the user had click a
 button,
 1 is the task perform by PHP
 2 is the task perform by JavaScript
 is it possible to do so?

 I'm actually fresh on JavaScript, before i would call the JavaScript, what
 should i do first or what should i set before though?

 Thx
 Jack
 [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Zip Code Locator?

2001-07-24 Thread Benjamin Bleything

Hey, let me know if you figure out what the extra numbers are for... I might 
have a use for this at some point.

Ben

From: Matthew Loff [EMAIL PROTECTED]
To: 'Ben Bleything' [EMAIL PROTECTED], 'Vincent P. Cocciolone' 
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Zip Code Locator?
Date: Tue, 24 Jul 2001 16:40:01 -0400
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2462.
Importance: Normal


Ben--

Thanks for pointing that out... I've been looking for info like that for
a long time! 

Much appreciated.

--Matt


-Original Message-
From: Ben Bleything [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, July 24, 2001 1:23 PM
To: Vincent P. Cocciolone
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Zip Code Locator?


You could write your own. . .

Just kidding... well, technically you could... but... that's not the
point.

http://sourceforge.net/projects/zipcodedb has a Raw ZIP code dump...
It has a little more data than just zip, city, state... I don't know
what it means, but maybe you would...

Sorry, it's the best I could do =

Ben

On Mon, 23 Jul 2001, Vincent P. Cocciolone wrote:

 Hi,

 Does anyone know where can I find documentation or example scripts for

 a zip code locator. I'm looking for something that will list other zip

 codes within a number of miles radius of the zip specified.

 Thanks!

 Vince


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED] To 
 contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: telnetty/phpy/unixy thing

2001-07-24 Thread Benjamin Bleything

Ahh!  Excellent.  Thanks for the tip!

Ben

Date: Tue, 24 Jul 2001 16:39:56 -0700 (PDT)
From: Philip Hallstrom [EMAIL PROTECTED]
To: Ben Bleything [EMAIL PROTECTED]
cc: [EMAIL PROTECTED]
Subject: Re: telnetty/phpy/unixy thing
MIME-Version: 1.0

I don't remember the exact terms, but telnet won't work unless it's
connected to a tty (ie, you're running it from a command prompt).  That's
why it works when you run it with the PHP binary.

If you're intent on using this method, there's a couple of programs to
look at: socket, and netcat.

Although I'd just do this in PHP itself using the fsockopen() function
(see the man page for an example).

On Tue, 24 Jul 2001, Ben Bleything wrote:

 Hey all... I tried sending this earlier... accidentally sent it to
 [EMAIL PROTECTED], then tried bouncing it to the write address...
 anyway, apologies if it didn't work correctly.

 Anyhoo...

 I'm trying to get a piece of information from a server in the field that
 responds to a certain command with a line of data... ie 'telnet machine
 temp' and it gives back MACHINE:75.3 (temperature).

 Anyway, there's a bunch of other stuff you can do to it with rsh, but
 that's not directly important.  I'm trying to build a web interface to
 control these machines.  Basically, I need to have PHP call 'telnet
 machine temp' and have it feed out whatever the machine returns...

 I've tried exec(), system(), passthru(), and backticks, all without
 success.  I imagine that the reason for this is that telnet isn't routing
 it's stuff to STDOUT (or whatever it is that php reads from in this
 situation).

 Now, get this.  If I use my php binary (shell scripting with php!  wh00!)
 it works dandy... the temp gets passed on, yadda yadda yippy.  But the
 second you try from a web browser, no dice.

 Now, I may be completely off track here... it may be that for some reason
 that I don't understand, telnet isn't actually outputting anything... I
 suspect it is, though.

 So... any ideas how I can get what I want?

 Thanks,
 Ben


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] sending attachments via mail(), possible?

2001-05-09 Thread Benjamin Munoz


There is a PHP class someone wrote called mime_mail that makes this easy. 

The resulting code using this class is something like:


// create new mime_mail object instance
$mail = new mime_mail;

// set all data slots
$mail-from= [EMAIL PROTECTED];
$mail-to  = [EMAIL PROTECTED];
$mail-subject = here's that file;
$mail-body= here's that file;

// read the file from disk
$fd = fopen($file_location, r);
$data = fread($fd, filesize($file_location));
fclose($fd);

// append the attachment
$mail-add_attachment($data, $file_name, $file_mime_type);

// send e-mail
$mail-send();

Look in phpclasses.upperdesign.com or search in Google.

-Ben

-Original Message-
From: Tym Rehm [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 09, 2001 12:18 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] sending attachments via mail(), possible?


You have to open the file and encode it.
Check out this:

html
head
  titleFitnessQuest FTP user request form - results/title
/head
body
?php
$date = exec(date);
$border=--==_856811060==_;
/* Define the attachment and encode it base64 */
$filename=/var/www/sf/Ftp_User_Info.doc;
$fd = fopen($filename, r);
$contents = fread($fd, filesize($filename));
$encoded=chunk_split(base64_encode($contents));
fclose($fd);
/* Trim white spaces */
$request_by = trim($request_by);
$email = trim($email);
$company = trim($company);
/* testing if form is filled out */
if (empty($email) )
{
  print h1FAILED!/h1;
  print pThis form can't be sent! You did not fill the form out
bcompletely!/bbrThe email address is missing!br;
  print brbrPlease click the bback/b button and fill in the email
addressbr;
  print Thank you;
  return;
}
if (empty($dr_ret) )
{
  print h1FAILED!/h1;
  print pThis form can't be sent! You did not fill the form out
bcompletely!/bbrThe system is not selected!br;
  print brbrPlease click the bback/b button and select a system (DR
or Retail)br;
  print Thank you;
  return;
}
#/* recipients */
$recipient = $email;

#/* subject */
$subject = FitnessQuest FTP account form;

#/* message */
$message .= --$border\n;
$message .= Content-Type: text/plain; charset=us-ascii\n\n;
$message .= Attached is a FTP account access form. The form is in Microsoft
Word 97 format, please fill it out completely\n;
$message .= and email it back to [EMAIL PROTECTED] After a completed
form has been recieved your FTP account will be\n;
$message .= created. It will take approximately two working days to
complete your FTP account. You will recieve an email with\n;
$message .= username, password, and ftp server name. If you have questions,
email [EMAIL PROTECTED] or call your account\n;
$message .= representative. Thank you\n\n;
$message .= \n--$border\n;
$message .= Content-Type: application/msword; name=\Ftp\ User\
Info.doc\\n;
$message .= Content-Transfer-Encoding: base64\n;
$message .= Content-Disposition: attachment; filename=\Ftp\ User\
Info.doc\\n;
$message .= \n;
$message .= $encoded;
#$message .= --$border\n;

/* Header infomation */
$headers .= From: FTP Accounts [EMAIL PROTECTED]\n;
$headers .= X-Sender: [EMAIL PROTECTED]\n;
$headers .= Mime-Version: 1.0\n;
$headers .= Content-Type: multipart/mixed; boundary=\$border\\n;

#/* and now mail it */
mail($recipient, $subject, $message, $headers);
print h1Notices Sent/h1;
print h2pEmailed out!br/h2;

print pMail Sent to $recipientp;

/* Send notices to the distribution list */
/* Read Distribution list from text file */
$dlist = file(/var/www/sf/dlist);
$line = explode( ,, $dlist[0]);
array_push ($line, $request_by);
$dnumber = count($line);
if ($dnumber == 0)
{
  print The list is emptyp;
}
for ($i=0; $i$dnumber; $i++)
{
#  print $line[$i]br;
   $line[$i] = trim($line[$i]);
/* Clear Notices var */
   unset ($not_mess);
   unset ($not_headers);
   unset ($not_sub);
/* Notice Email Message */
   $not_mess .= --$border\n;
   $not_mess .= Content-Type: text/plain; charset=us-ascii\n\n;
   $not_mess .= An FTP access form was emailed to $email.\n;
   $not_mess .= Company name: $company\n;
   $not_mess .= $company will be a $dr_ret customer\n\n\n\n;
   $not_mess .= The request form was completed by $request_by on
$date.\n\n;
#   $not_mess .= \n--$border\n;
/* Notice Subject */
  $not_sub .= FTP user setup notice;
/* Notice Headers */
  $not_headers .= From: FTP Accounts [EMAIL PROTECTED]\n;
  $not_headers .= X-Sender: [EMAIL PROTECTED]\n;
  $not_headers .= Mime-Version: 1.0\n;
  $not_headers .= Content-Type: multipart/mixed; boundary=\$border\\n;

/* Send Notice email to distribution list */
/* Diag testing */
#  print |$line[$i]|br;
#  print |$not_sub|br;
#  print |$not_mess|br;
#  print |$not_headers|brp;
  mail($line[$i], $not_sub, $not_mess, $not_headers);
}


?
/body/html


- Original Message -
From: Christian Dechery [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, May 09, 2001 3:10 PM
Subject: [PHP] sending attachments via mail(), possible?


 Is it possible to send attachments via mail() function?

 I tried it, and 

RE: [PHP] manipulating files with php

2001-05-09 Thread Benjamin Munoz


There are a number of ways to do this.  Mine is something like this:

if (has_read_perm($user_id, $file_id)) {
send_file_to_browser($file_id);
} else {
// print error message();
}

...

function has_read_perm($user_id, $file_id) {
// check db table
// return true/false
}

function send_file_to_browser($file_id) {
$file_location = get_file_location($file_id); // get full path of
this file_id
$file_mime = get_file_mime($file_id); // I store this info in the db
$fp = fopen($file_location,r); 
$buff = fread($fp,800); 
header(Content-Type: $file_mime_type\n);
echo $buff; 
}

function get_file_location ($file_id) {
// return full path to the file, including file_name
}

function get_file_mime_type($file_id) {
// return the original file mime type, I have this stored into the
db when a file is uploaded
}

Because you are sending a header here, you can't print html before the
function send_file_to_browser() is called.

-Ben

-Original Message-
From: Andrew Coles [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 09, 2001 12:50 PM
To: [EMAIL PROTECTED]
Subject: [PHP] manipulating files with php


I am creating a CRM system using php for my final year university project.
I would like to enable the storing of files on the system.  However I want
to restrict access to these files according to privilege tables stored in
local mysql tables.  In order to prevent access to the files by simply
typing the url, they would be stored outside the web directory.

Is it possible to create a php page which will read a local file from
outside the web directory and pass the data straight to the http output, in
affect allowing checking of a users status before allowing access to the
file?

I would be grateful for any suggestions,

Thanks,

Andrew



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Simple Questions

2001-05-08 Thread Benjamin Munoz

This is not working?

echo(trtd align=\center\ bgcolor=\$bc\ style=\color: $text;
font-family: $font; font-size:
$fontsize\$server-server_num_players./.$server-server_max_players/td
/tr);

If you are trying to print out 
trtd align=center bgcolor=$bc style=color: $text; font-family:
$font; font-size: $fontsize4/4/td/tr
but can't because it is evaluating it mathematically, try using the HTML
character entity for /, #047;

echo(trtd align=\center\ bgcolor=\$bc\ style=\color: $text;
font-family: $font; font-size:
$fontsize\$server-server_num_players#047;$server-server_max_players/td
/tr);

Hope this is what you meant.

-Ben

-Original Message-
From: Ender [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 3:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Simple Questions


Okay few questions, I am pretty new to this hehe.

If I have a number say, 123.123.123.123.

$ip = 123.123.123.123;

How do I put a starting  and an ending  to make it

123.123.123.123

AND

This doesn't work:

echo(trtd align=\center\ bgcolor=\$bc\ style=\color: $text;
font-family: $font; font-size:
$fontsize\$server-server_num_players./.$server-server_max_players/td
/tr);

What do I need to do to put a / between the two variables?


Best regards,

Ender [Clan Leader]
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Commercial sites that use PHP

2001-04-10 Thread Benjamin Munoz


Yahoo uses a lot of Python.  Yahoo Mail pages have extensions of .py,
indicating Python.  Yahoo acquired eGroups and Google this past year, both
of which openly use Python to generate pages.  They most likely use Python
in conjunction with other scripting and compiled languages.

-Ben

-Original Message-
From: Michael Kimsal [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 10, 2001 9:47 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Commercial sites that use PHP




Brent Langston wrote:

 Does anyone know what Yahoo uses?  It's obviously some form of
scripting...
 especially at http://my.yahoo.com.  I've always been curious about what
they
 are using as their parser... it appears to spit out pure HTML, so it acts
 like PHP...

 Any thoughts?

No offense here, but EVERYTHING does that.  ASP, JSP, CF, Perl, Frontier,
etc.
I think it's pretty impossible to tell what someone's using unless they
announce

via file extensions or something, and even then you can't always tell.





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHPSESSID sticks to every link after upgrate of Apache/PHP

2001-04-08 Thread Benjamin Munoz

In your php.ini, change the following line:
session.use_trans_sid = 1   ; use transient sid support if enabled
to
session.use_trans_sid = 0   ; use transient sid support if enabled

And see if that solves your problem.  Also, check the change with phpinfo(),
and if nothing changed, look for a second evil twin of php.ini

-Ben
-Original Message-
From: trogers [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 08, 2001 6:59 PM
To: 'PHP General List. (E-mail)'
Subject: Re: [PHP] PHPSESSID sticks to every link after upgrate of
Apache/PHP


Hi
You will probably need to make clean and rebuild php config and do a new 
make against the new version of apache.
Just a guess
Tom

At 12:28 PM 5/04/01 +0900, Maxim Maletsky wrote:

Hello,

my co-worker has reinstalled Apache and PHP over the last night.

The Apache was upgraded to the new version while PHP was re-installed the
same.
PHP.ini was untouched.

Site uses sessions and, somehow, after this upgrade started carrying
PHPSESSID through HREF.

What should look for to bring the sessions using Cookies?

from PHP-INI:

NOTE : this was untouched.



[Session]
session.save_handler  = files   ; handler used to store/retrieve data
session.save_path = /tmp; argument passed to save_handler
 ; in the case of files, this is the
 ; path where data files are stored
session.use_cookies   = 1   ; whether to use cookies
session.name  = PHPSESSID ; name of the session
 ; is used as cookie name
session.auto_start= 0   ; initialize session on request startup
session.cookie_lifetime   = 0   ; lifetime in seconds of cookie
 ; or if 0, until browser is restarted
session.cookie_path   = /   ; the path the cookie is valid for
session.cookie_domain = ; the domain the cookie is valid for
session.serialize_handler = php ; handler used to serialize data
 ; php is the standard serializer of
PHP
session.gc_probability= 1   ; percentual probability that the
 ; 'garbage collection' process is
started
 ; on every session initialization
session.gc_maxlifetime= 1440; after this number of seconds, stored
 ; data will be seen as 'garbage' and
 ; cleaned up by the gc process
session.referer_check = ; check HTTP Referer to invalidate
 ; externally stored URLs containing
ids
session.entropy_length= 0   ; how many bytes to read from the file
session.entropy_file  = ; specified here to create the session
id
; session.entropy_length= 16
; session.entropy_file  = /dev/urandom
session.cache_limiter = nocache ; set to {nocache,private,public} to
 ; determine HTTP caching aspects
session.cache_expire  = 180 ; document expires after n minutes
session.use_trans_sid = 1   ; use transient sid support if enabled
 ; by compiling with --enable-trans-sid
=


Has upgrade of apache (modules, etc) anything to do with it?

I can't really give you any more details since my co-coworker is
unreachable
right now, and this is kinda urgent.

Cheers,
Max.



Maxim Maletsky - [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Webmaster, J-Door.com / J@pan Inc.
LINC Media, Inc.
TEL: 03-3499-2175 x 1271
FAX: 03-3499-3109

http://www.j-door.com http://www.j-door.com/
http://www.japaninc.net http://www.japaninc.net/
http://www.lincmedia.co.jp http://www.lincmedia.co.jp/




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] double byte problem

2001-04-08 Thread Benjamin Munoz

Can you send some code?


-Original Message-
From: Subhrajyoti Moitra [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 08, 2001 8:41 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [PHP] double byte problem


hi,
i am having a little problem in using php with double byte character.

a user enters double byte character in some html form.. this user data is
converted into a gif image. and later stored in a mysql/pgsql database...

i have no clue how go about doing this .. can someone please please please
help me .. i am stuck..

_
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Bad Practices

2001-02-13 Thread Benjamin Munoz

Three good articles by the author of PHP Developer's Cookbook.

Top 21 PHP progamming mistakes 
By Sterling Hughes 

http://zend.com/zend/art/mistake.php

http://zend.com/zend/art/mistake1.php

http://zend.com/zend/art/mistake2.php

-Ben Munoz

-Original Message-
From: Jeff Oien [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 10:11 AM
To: PHP
Subject: [PHP] Bad Practices


Would people like to list bad practices and also point us
newbies to any articles online dealing with syntax, correct
use of single and double quotes etc.? 

I would like to get a good handle on these issues right
from the beginning. As a Web designer I like to use 
standard HTML and do everything correctly even if the
browser is forgiving. I notice that a LOT of programmers
write bad HTML and I would imagine many of the publicly
available PHP scripts aren't exactly kosher either. What are 
some of the most objectionable things you see? Thanks.
Jeff Oien

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] A php-xml mailing list?

2001-02-09 Thread Benjamin Munoz


Yes, I subscribe to this PHP-XML mailing list, but it is very low volume.  

I'd encourage anyone considering using XML/XSL/SOAP/RSS to join this list,
so that XML and SOAP can be easily used with a PHP web app environment.  

I've used ASP/COM when I really wanted to use PHP, but the Microsoft SOAP
servers/listeners made XML communication much easier, especially since I'm
new to SOAP.

-Ben

-Original Message-
From: Matt McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 09, 2001 3:24 PM
To: Michael Dearman
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] A php-xml mailing list?


On Fri, Feb 09, 2001 at 05:37:04PM -0700, Michael Dearman wrote:

 I think it would be helpful.
 What do you folks think?

You'd think it would be a popular thing, but the one O'Reilly hosts
is more or less silent.

http://www.oreillynet.com/pub/a/php/php-xml-ml.html

Matt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] 20 Million Fresh E-mail Addresses

2001-02-06 Thread Benjamin Munoz


On replying to SPAM:

Most of you already know this, but replying to SPAM (even if they tell you
that you can remove yourself) usually leads to more SPAM, b/c you've just
given the SPAMMERS your email address confirmed.  
http://www.chugach.net/~techtips/spam3.htm

Just a warning.  

-Ben

-Original Message-
From: Luke [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 05, 2001 6:14 PM
To: [EMAIL PROTECTED]
Subject: [PHP] 20 Million Fresh E-mail Addresses


TO BE REMOVED FROM FUTURE MAILINGS, SIMPLY REPLY TO THIS 
MESSAGE AND PUT
"REMOVE" IN THE SUBJECT.


   20  MILLION
 E-MAIL ADDRESSES
  FOR ONLY $249
**Over Night International Shipping Included** 


Many Call This "The "Perfect E-Mail List"

Over 20-Million Of The Best E-Mail Addresses Available

_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/

Our research has found that many people have tried one or more of
the following...

Free Classifieds? (Don't work anymore)
Web Site? (Takes thousands of visitors)
Banners? (Expensive and losing their punch)
E-Zine? (Hope they have a *huge* subscriber list)
Search Engines? (Forget it, unless you're in the top 20)

 S O   W H A T   W I L L   W O R K ?

Although often misunderstood, there is one method that has proven
to succeed time-after-time.

 E - M A I L   M A R K E T I N G ! !

IT'S A FACT... If you're not using your computer to generate
income,  GOOD income,  you're leaving money on the table.

Here's what the experts have to say about E-Mail Marketing:

"E-mail is an incredible lead generation tool"
-Crains Magazine

"A gold mine for those who can take advantage of
bulk e-mail programs" - The New York Times

"Blows away traditional Mailing" - Advertising Age

Here's an example of your potential earnings if you have a
product or service that brings you a profit of around $30.
Remember, on the Internet, you can make money 7 days a week, 24
hours a day... even while you sleep, orders come from all over
the world!

Orders
Per DayWeekly  Monthly  Yearly

   1   $  210  $   840  $ 10,080
   2  4201,68020,160
   3  6302,52030,240
   51,0504,20050,400
  102,1008,400   100,000
  153,150   12,600   151,200

THE QUESTION IS... how do you generate those orders?

The least expensive and fastest way is through E-Mail Marketing.



  You want to make some money?

  I can put you in touch with over 20 million people at virtually no cost.

  Can you make one cent from each of theses names?

If you can you have a profit of over $200,000.00


  That's right, I have over 20 Million  Fresh  email

addresses that I will sell for only $249. These are all

fresh addresses that include almost every English person

on the Internet today, with no duplications. They are

all sorted and ready to be mailed.  That is the best

deal anywhere today!  


  Don't believe it? People are making that kind of

money right now by doing the same thing, that is

why you get so much email from people selling you

their productit works! 


  These 20 Million email addresses are 

yours to keep, so you can use them over and

over. 


  This offer is not for everyone. If you can not

see just how excellent the risk / reward ratio

in this offer is then there is nothing I can do

for you.  To make money you must stop dreaming

and TAKE ACTION.



Over the past 2 years, we have gained a reputation for having the
cleanest, most responsive e-mail address lists in the industry.
No one has gone to the work it takes to produce an e-mail address
list of this quality.

Here's how we prepare our e-mail lists:

1. We clean and eliminate all duplicates.

2. Next, we use a filter list of 400+ words/phrases to clean even
more. No address with inappropriate or profane wording survives!

3. Then we use our private database of thousands of known
Internet "extremists", those opposed to any kind of commercial
e-mail, and kicked off every one we could find.

4. All domains were verified to insure they're valid.

5. And finally, we sorted the list into easy-to-manage packets of
20,000 addresses in simple text (.txt) format that will work with
any computer operating system.

**
It is time to order!

Shipping is not an issue. 

**FedEx next day world wide shipping included  

As soon as we receive payment we will FedEx your e-mail list via 

CD straight to your door anywhere in the world FedEx next day guaranteed.

**International Orders Welcome*

US funds paid via paypal.com welcomed

PayPal is now available in the following countries:

Australia 
Austria 
Belgium 
Brazil 
Canada 
Denmark 
France 
Germany 
Hong Kong 
Ireland 
Israel 
Italy 
Japan 
Mexico 
Netherlands 
New Zealand 
Norway 
Portugal 
Singapore 
South Africa 
South Korea 
Spain 
Sweden 
Switzerland 
United Kingdom

PayPal.com is very easy to sign up 

[PHP] porting a php3 module/patch to php4

2001-02-06 Thread Benjamin Elijah Griffin

Having seen Richard Lynch write recently on this list:
: There really were very, very, very few changes from PHP3 to PHP4,
: considering it was a complete re-write of the engine.

I think I am going to break down and ask for tips, tricks,
etc, porting a php3 module to php4.

This thing was written by someone else to be part of php-3.0.6 (!)
and adds a few functions for accessing a specialized database to
PHP.

It was intended to live in the dl/ directory.

What is it going to take to get this to work in ext/ or where-
ever it should be for php4?

Benjamin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Suggest for List

2001-02-01 Thread Benjamin Munoz

April, 

There was a discussion like in 1999 (i remember cuz I was learning PHP
then), and Richard Lynch (i think) had a good point that splitting the list
would reduce the quality of the answers on the beginners list--PHP newbies
answering each others questions, you see.

Newbies should continue to post here.  A tip: some developers preface their
posts with something like: "newbie question".  If you do this, you'll likely
get flooded with friendly and helpful responses.Try it :)

-Ben

-Original Message-
From: April [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 01, 2001 11:25 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Suggest for List


I've been searching for a much smaller PHP beginners lists, away from the
official one, because I know I'm much too beginner for this one.  Everytime
I post, I feel like I'm trying to snatch a cookie in full view of the
headmistress, and probably going to get hit with her spoon for it.  You'll
always get the idiots posting to the advanced list, yeah, it happens.  But I
think that the quality of lists would generally go up for both advanced and
beginning people - less interference and less pressure, respectively.


- Original Message -
From: "Boget, Chris" [EMAIL PROTECTED]
To: "'Chris Lee'" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, February 01, 2001 12:42 PM
Subject: RE: [PHP] Suggest for List


  Good idea, I agree, this would be nice. It would allow
  posters to better categorize their question, and would
  give responders a good place to hangout depending on
  their skill set.

 This has been suggested before.  What you will invariably
 find is that all users (beginner and advanced) will subscribe
 and post to the advanced list because the beginners will
 know there are people there who can answer any ?'s whereas
 there may not be on the beginner list...

 Chris



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PDF Questions

2001-01-30 Thread Benjamin Munoz


http://www.phpbuilder.com/columns/perugini20001026.php3

http://www.phpbuilder.com/columns/uwe20001116.php3

http://php.net/manual/en/ref.pdf.php

-Ben

-Original Message-
From: Conover, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 6:31 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PDF Questions 


I was wondering if anyone has any good places to answer questions pertaining
to PDF and PHP.

Ryan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] How can I make PHP to work on Win98 ?

2001-01-30 Thread Benjamin Munoz


You can find some info here...
http://php.net/manual/en/install-windows95-nt.php

And more here...
http://php.weblogs.com/easywindows

First requirement is to have a web server (Xitami, Apache, Personal
Webserver) on your Win98 box.
Then you can run one of the installers found on one of the above links.  

Good luck.

-Ben

-Original Message-
From: nastaran kashani [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 10:15 AM
To: [EMAIL PROTECTED]
Subject: [PHP] How can I make PHP to work on Win98 ?




   Hi,
 I work with Winows98  , and I want to make my system 
a really server.I have two questions :
 
1}What component  I should install on my system to 
  make it a really server ? IIS3 ? or IIS4 ?
2)Where can I get this component (IIS3 or IIS4
  for Windows98) ?


Thanks a lot
 Atieh Kashani

__
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Uploading images only

2001-01-30 Thread Benjamin Munoz


You can check the mime type of the uploaded file.

First upload the file, as usual.  Then check the mime type before copying
from the temp directory to the files directory.

If this is your form:
form action="flm_upload.html" method="post" enctype="multipart/form-data"
input type=hidden name=MAX_FILE_SIZE value=?=$max_file_size?
File: br
input type=file name=userfile/td
input type=submit value="Upload File"
/form

Then on submission, $userfile will be your file, $userfile_name will
automatically be the original file name, and $userfile_type will be the mime
type.  Check if image/gif or image/jpg (double check these) are in the mime
type, and copy($userfile, $file_directory.$userfile_name) for images only.
http://php.net/manual/en/features.file-upload.php


-Ben

-Original Message-
From: Brandon Orther [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 30, 2001 8:30 AM
To: PHP User Group
Subject: [PHP] Uploading images only


Hello,

Is there a way to only let images get upload while doing a simple file
upload form?

Thank you,


Brandon Orther
WebIntellects Design/Development Manager
[EMAIL PROTECTED]
800-994-6364
www.webintellects.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Problem!

2001-01-29 Thread Benjamin Munoz


Stephen,

If this date format is coming from a MySQL database (frequently the case),
you might want to look at the date formatting functions of MySQL.
http://www.mysql.com/doc/D/a/Date_and_time_functions.html.  

ex. select DATE_FORMAT('1997-10-04 22:23:00', '%W %M %Y');

One drawback is that this is not standard SQL, so it's not too portable, if
you are concerned with that.

-Ben

-Original Message-
From: Stephan Ahonen [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 29, 2001 5:22 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Problem!


1.
$date = "20010101";

How could I output 01 01 2001 (or make it 3 variables, like day, month,
year)?

$year = substr($date,0,4);
$month = substr($date,4,2);
$day = substr($date,6,2);

...Assuming that the date is stored in mmdd format.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Export to Spreadsheet Format

2001-01-23 Thread Benjamin Munoz


I want to run a query on a database and export the recordset to a
spreadsheet, preferably Excel native.  

The box is on a Win32 OS, so I can instantiate a Excel COM object (similar
to the PHPBuilder COM article), and use the COM methods to create an Excel
file.

Or, I can fopen and fput a CSV formatted file ready to import into Excel.

My question is this: can anyone recommend a script/class where this has
already been done?  Thanks, PHP list.

Ben Muoz

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Multiple Page Form

2001-01-23 Thread Benjamin Munoz


Make sure you are not forgetting to include $action as a hidden input, so
your script can know how to process.

input type=hidden name=action value=Send, for example

-Ben

-Original Message-
From: Jeremy Bowen [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 23, 2001 12:17 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Multiple Page Form


hey,

I am sure this is a dumb question but, I cannot seem to find out what i am
doing wrong. 

I have a three page form, it basically takes a users input, displays it on
the
next page to make sure the users info is correct (i store the variables on
this page in a form in hidden input tags), when the user clicks subscribe on
this page it is supposed to go on to the third page which is a confirmation
page. We instead of doing that it just reloads the page and resets all of
the
values!

My form looks something like this (This is a simplified version):

?

if ($action=="")

{


PAGE ONE TEXT AND FORM


form method=post action=$PHP_SELF

input type=text name=name
input type=text name=email

input type=submit value=Subscribe
/form


}

elseif ($action="Send")

{


PAGE TWO


form method=post action=$PHP_SELF

$name input type=hidden name=name
$email input type=hidden name=email

input type=submit value=Subscribe

form

}

elseif ($action="Send")

{


Thanks for Subscribing!

mail("Args","Args","Args");

}

?

I have looked on php.net but i cannot seem to find docs on how to do this!

Thanks,

Jeremy






 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Two things

2001-01-17 Thread Benjamin Munoz


Did you mean this?

?php
$i = 0
$colors = array('#ff','#0');
?

-Ben

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 17, 2001 11:52 AM
To: Phil Labonte
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Two things


 When I get a list of items from a database I would like to display them
with
 alternating colors.  Does anyone know how or where I can get some code
that
 will show me how to do that?

$col = 0;
$colors = array('#ff','#00');

while($row=mysql_fetchrow($result)) {
echo "td bgcolor=".$colors[$i++%2]."".$row[0]."/td\n";
}

 The other question is what is the code to get the ip of the client that is
 accessing your site?  I know that one is easy but I forget how to do it.

$REMOTE_ADDR

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Strings??

2001-01-16 Thread Benjamin Munoz

Ade,

What kind of string?  What do you want to do with them?  

-Ben

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 2:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Strings??


Quick Question.

I have a form which has 10 fields, is there any way in PHP to take the
values 
once submitted and create a string for each??

Thanks 
Ade

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] How to keep unauthorized viewers out

2001-01-16 Thread Benjamin Munoz


Correction:
Inside X.php, you have some authentication code.  Maybe something simple as:
?
if (!$valid) {
// redirect to story.php?storynum=X
}
// rest of article follows
?

-Ben
-Original Message-
From: Benjamin Munoz [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 4:20 PM
To: 'Miles Thompson'; [EMAIL PROTECTED]
Subject: RE: [PHP] How to keep unauthorized viewers out


Miles,

If you can save 2.htm as 2.php, use some authentication code.

Story.php becomes
?
include "auth.inc";
include "header.inc";
include $storynum.".php";
include "footer.inc";
?

Inside X.php, you have some authentication code.  Maybe something simple as:
?
if ($valid) {
// redirect to story.php?storynum=X
}
// rest of article follows
?

Inside story.php, set $valid to true
?
$valid = TRUE;
?

Now accessing 2.php directly means that $valid is valid and you'll be
redirected to story.php.

Another option is to place all stories x.php into a story directory and
restrict access to this directory using Apache configuration directives.

-Ben

-Original Message-
From: Miles Thompson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 3:49 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to keep unauthorized viewers out


I'm using a pretty simple linking system for a subscription-based 
newsletter site.

Stories and articles are in straight html files, reached by links from the 
front page. Clicking on a link passes a story number. So the second story 
on the index page would have this link: A HREF="./story.php?storynum=2"

and story.php consists of just these lines:

? include "auth.inc" ;
include "header.inc" ;
include $storynum.".htm" ;
include "footer.inc" ;
?

If someone comes in the "right way", through the index page, they will have 
to be authenticated, then the header, article and page footer are displayed.

There's nothing, however, to stop someone from typing an URL like this:
http://www.somepub.ca/2.htm and seeing the article. I assume they could 
also come in that way via a search engine.

Any suggestions on how to stop that? Resources I should look at? I do want 
to keep the stories in straight html as the editor is struggling now with 
basic layout, etc.

Regards - Miles Thompson



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] MySQL - How to transfer a query resault into a variable?

2001-01-16 Thread Benjamin Munoz


http://www.php.net/manual/en/function.mysql-fetch-object.php

Modified example from the manual above...

?php 
mysql_connect ($host, $user, $password);
$result = mysql_db_query ("database", "select * from table");
while ($row = mysql_fetch_object ($result)) {
// save database fields into variables here
$user_id = $row-user_id;
$name = $row-name;
// print them out if you want, or store them in an array to return
if this is a function
print ("a href=user_details.php?user_id=$user_id$name/abr\n");
}
mysql_free_result ($result);
?

-Ben



-Original Message-
From: SED [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 5:21 PM
To: [EMAIL PROTECTED]
Subject: [PHP] MySQL - How to transfer a query resault into a variable?


Hi,

Lets say I have columns e.g.

| name | address | phone |

I want to make a list of all the names and put the result into a HTML page
where each name is a link.

When the name is clicked (the link), it will open another HTML page with
full information (name, address and phone).

I know how to send the query to list the names (and into a formatted
HTML-file), but I don't know how to put each name into a variable or a link
for the next step.

Can you point me to functions I should focus at or even a solution?

Regards,
Sumarlidi Einar Dadason

SED - Graphic Design

--
Phone:   (+354) 4615501
Mobile:  (+354) 8960376
Fax: (+354) 4615503
E-mail:  [EMAIL PROTECTED]
Homepage:www.sed.is - New Homepage!
--


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




<    1   2