[PHP] Re: phpMyAdmin and apqache 2.0.39 cache problems

2002-07-27 Thread electroteque

i am using IE
"Julio Nobrega" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Electroteque em Friday 26 July 2002 11:19 foi agraciado com uma resposta
> por:
>
> > hi guys i am having major caching issues in phpMyAdmin when i moved to
> > apache 2.0.39 has anyone else expeirence this ? its sending me round the
> > bend , i cant view my mysql tables when i create them , i have to
removed
> > temp internet files and hit refresh to get them to view
>
>   Yes! But only with the Opera navigator, and while using localhost. With
> Internet Explorer, doesn't happen.
>
> --
> --
> http://gnet.inerciasensorial.com.br



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




[PHP] Re: I hate to do this - Parse error...

2002-07-27 Thread Chris Earle

I think the Parse error might actually be on the last line of your query (
the " .'; ").  I tested that on my page and if I put in the query, as is, it
gave me a parse error.  Without the ending .' it was okay though.

> function view_post($tid){
__
> $query = 'select forum_post.name, forum_post.time, forum_post.uid,
> forum_post.message, priv_user.username from forum_post, priv_user where
> forum_post.uid = priv_user.uid AND forum_post.tid = '.$tid.'; // HERE
__
> $result = mysql_query($query) or die("Query failed: $query" .
> mysql_error());
> $num_results = mysql_num_rows($result);
>
> for ($i=0; $i < $num_results; $i++)
>   {
>  $row = mysql_fetch_array($result);
>  echo $row['name'].'  '.date('jS-M-Y',$row['time']).'
> '.$row['username']."\n"; // Parse error here - line 24
>  echo $row['message']."\n";
>  }
>
> }



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




Re: [PHP] PHP / Apache 2.0.39 issues

2002-07-27 Thread electroteque

geez i thought they had it right this time , i had the same problem with php
4.2.1 , i downloaded the latest snapshot and just copied over the
php_functions.c from there and the install worked after that
"Bob Lockie" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
> >Hello again..
> >
> >I have another compile problem, I'm wondering if someone
> >can help me. I've built and installed Apache 2.0.39 and am recompiling
> >PHP4.2.2. Below are the details..
> >
> >./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-zlib=/usr
> >--with-oci8=`dbhome`
> >
> >Compiling...
> >Entering director '/php-4.2.2/sapi/apache2filter'
> >/bin/sh /php-4.2.2/libtool --silent --mode=compile gcc -I.
> >-I/php4.2.2/sapi/apache2filter -I/php4.2.2/main -I/php-4.2.2
> >-I/usr/local/apache2/include -I/php-4.2.2/Zend
> >-I/php-4.2.2/ext/mysql/libmysql
> >-I/export/home/oracleuser/OraHome1/rdbms/public
> >-I/export/home/oracleuser/OraHome1/rdbms/demo -I/php-4.2.2/ext/xml/expat
> >-D_POSIX_PTHREAD_SEMANTICS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
> >-I/php-4.2.2/TSRM -DTHREAD=1 -g -O2 -pthreads -DZTS -prefer-pic -c
> >php_functions.c
> >php_functions.c:93:27: missing binary operator before '('
>
> Use Apache 1.3.26 with PHP 4.2.2.
> Apache 2 support is experimental at this time.
> If you really want to use Apache2, do a search on google.
>
>
>



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




[PHP] Re: How to UPDATE two MySQL Tables

2002-07-27 Thread Chris Earle

You can use REPLACE instead of making two separate queries (UPDATE and
INSERT) because it checks if it is there, and if it's not, then it adds it;
otherwise it updates it.  I think that's right ... but the SQL server's SQL
server is broken! (the irony!)

That won't solve all of your problems, but it might help.  Check up at
www.mysql.com on how to use "REPLACE"

"Monty" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have two tables: member_basic and member_detail. When a member edits
their
> record, they can edit or add data for either table, but, the data stored
in
> member_detail isn't required, so, they can possibly leave these fields
> blank. By the way, both tables would be linked by a member id.
>
> Here's my dilemma: If they do fill in any fields associated with
> member_detail, I have to first see whether or not there's an entry in the
> member_detail table already for that user (based on member id number). If
> not, I then have to check ALL the form fields associated with this table
to
> see if any data was actually entered so I know whether or not to create a
> new record for the member in member_detail. If there is already an entry
for
> that member in member_detail, then I can just do a standard UPDATE.
>
> Now maybe this is how it has to be done, but, I was hoping there might be
an
> easier way to do this. It appears it's not possible to UPDATE a JOINed
table
> during a query, which is what I was hoping. I am trying to keep the DB
> efficient by keeping optional data that may be left empty in another
table,
> but, it's only making my life difficult, so, unless there's an easier way,
I
> may just combine all the fields into one table and be done with it.
>
> Sorry for the long-winded explanation. Any suggestion are greatly
> appreciated!
>
> Monty
>
>
>
>



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




[PHP] Re: Is it possible...

2002-07-27 Thread lallous

You can't download a script when it is being parsed.

If it is not going to be parsed you can download it as text.

as for php.net , they have got a button on their site called: showsource

click it and have the source of any page you want,


"Apollo" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Is it possible download php scripts from webpages ? for example i need
> php.net scripts or others :-)  If yes, how ?
>
>



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




[PHP] Re: How can I get my session variable to pass to another page?

2002-07-27 Thread lallous

you have to add:
session_start()
in your second file.

"Donpro" <[EMAIL PROTECTED]> wrote in message
005001c234df$fe6e7b80$[EMAIL PROTECTED]">news:005001c234df$fe6e7b80$[EMAIL PROTECTED]...
> Hi,
>
> I have a form that calls a PHP script which sets a session variable and
> redirects to anopther URL as such:
>
> session_start();
> $HTTP_SESSION_VARS['userid'] = "someidnumber";
> Header('Location: ' . 'http://www.mydomain.com/welcome.html');
>
> On welcome.html, I have the following code:
>
> 
> echo 'userid: ' . $HTTP_SESSION_VARS['userid'] . '
'; > > > When I run it in my browser, the value of 'userid' is empty. Anyone know > why? > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Calling a function without variable params

2002-07-27 Thread lallous

you can pass an unlimited number of variable through the array()
constructor.

as:

data_interface(array($table1, $table2, $table3))
you can use an Array manipulation functions for that order too.

good luck,


"Mathieu Dumoulin" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Ok, here i made a function that can accept an unknown number of params.
>
> In fact, it's a data interface for a mysql database, when i call the
> object's constructor it is in possibility to pass any number of table
names
> from 1 to x. Now i got this other class called a data interfacer which
sends
> a certain number of tables to the data interface constructor. I tried
doing:
>
> $interface = new data_interface($table1, eval("$table2, $table3,
$table4"));
> $interface = eval("new data_interface($table1, $table2, $table3,
$table4)");
>
> and various other tries. The thing is i can't know how many tables can be
> transfered from the data interfacer to the data_interface. So i could make
a
> if..elseif...elseif until i reach something like 10 tables but still, it's
> not a good practice, i'm sure there is a way to emulate real parameters
when
> they are needed and skip them in the call if you don't have them.
>
> Can anybody help me out?
>
> InsaneCoder
>
>



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




[PHP] Re: Is it possible...

2002-07-27 Thread Lars Olsson

No. Since PHP is executed on the server, the only thing that is sent to 
the browser is pure HTML (and client-sided scripts like JavaScript).

This means you cannot just get the source code of a PHP page by just 
browsing it.

/lasso ([EMAIL PROTECTED])



Apollo wrote:
> Is it possible download php scripts from webpages ? for example i need
> php.net scripts or others :-)  If yes, how ?
> 
> 


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




[PHP] Re: I hate to do this - Parse error...

2002-07-27 Thread JJ Harrison

Thanks.

I've never seen an error that far up from the qouted line.


--
JJ Harrison
[EMAIL PROTECTED]
www.tececo.com

"Chris Earle" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I think the Parse error might actually be on the last line of your query (
> the " .'; ").  I tested that on my page and if I put in the query, as is,
it
> gave me a parse error.  Without the ending .' it was okay though.
>
> > function view_post($tid){
> __
> > $query = 'select forum_post.name, forum_post.time, forum_post.uid,
> > forum_post.message, priv_user.username from forum_post, priv_user where
> > forum_post.uid = priv_user.uid AND forum_post.tid = '.$tid.'; // HERE
> __
> > $result = mysql_query($query) or die("Query failed: $query" .
> > mysql_error());
> > $num_results = mysql_num_rows($result);
> >
> > for ($i=0; $i < $num_results; $i++)
> >   {
> >  $row = mysql_fetch_array($result);
> >  echo $row['name'].'  '.date('jS-M-Y',$row['time']).'
> > '.$row['username']."\n"; // Parse error here - line 24
> >  echo $row['message']."\n";
> >  }
> >
> > }
>
>



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




[PHP] Re: Logging: Best archive method

2002-07-27 Thread lallous

No matter how much you compress you'll always come across the size grow
problem.

try RAR (www.rarsoft.com) execute it from PHP when necessary.

good luck,

"Julio Nobrega" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>   Hi all,
>
>   I am serializing every get, post, cookie and server variables to log
them.
> I was using mysql to store this data, but I've generated with 900
pageviews
> a 5 (five) MB table. Now I am using the bz2 extension to accomplish this,
> but I am not sure if it's the best method.
>
>   Are there any better alternatives? I must log this data for every
> requested page since it's for a bank application (ever had the Central
Bank
> of your country asking for log files? ;-)
>
>   Thanks,
>
> Julio Nobrega
> http://gnet.inerciasensorial.com.br



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




[PHP] Re: Quotes getting screwed up in form fields

2002-07-27 Thread lallous

if you're using Apache, try creating an .htaccess file with this line in it:
php_value magic_quotes_gpc 1



"Monty" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> If someone enters this into a field...
>
>New York "City"
>
> and I need to re-display it in the field (if an error occurred, for
> example), this is what's in the field...
>
>New York \
>
> I have another multi-line text field that I used quotes in and this
doesn't
> happen with that field, even though they are both being treated in the
same
> manner. What am I missing?
>



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




Re: [PHP] Using Javascript

2002-07-27 Thread Zoltan Konyves

Hello Uma,

Monday, July 22, 2002, 8:09:44 AM, you wrote:


UST> Hello,

UST>  I need to display a value on the text box during onClick event where the
UST> data is fetched from the database..I have given the code like this but it
UST> is giving unterminated string constant..


UST> ");


UST> Can anyone please tell me how to solve this ... 


UST> Thanks & Regards,
UST> Uma



Hi,

Try to use:


-- 
Best regards,
 Zoltanmailto:[EMAIL PROTECTED]


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




[PHP] Date() Problem

2002-07-27 Thread Tony Harrison

Hi, im making a tab/lyric portal, and for viewing tabs i want to display the
time the lyric/tab was submitted. So I retrive it from a MySQL database (as
a timestamp) and format it using the date function. The problem is, that the
date: 19-01-2038 04:14:07 is allways returned, even though in the `date`
field the timestamp says (as an actual example) 20020723200919.

Here is a shortened version of the script:

$link = mysql_connect($dbhost, $dbuser, $dbpass);

mysql_select_db($dbname, $link);

$get_resource = mysql_query("SELECT
`artist_id`,`title`,`content`,`user_id`,`date`,`type`,`views` FROM
`resources` WHERE `id` = $id");

$values = mysql_fetch_row($get_resource);





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




[PHP] Re: Date() Problem

2002-07-27 Thread Jome

> Hi, im making a tab/lyric portal, and for viewing tabs i want to display
the
> time the lyric/tab was submitted. So I retrive it from a MySQL database
(as
> a timestamp) and format it using the date function. The problem is, that
the
> date: 19-01-2038 04:14:07 is allways returned, even though in the `date`
> field the timestamp says (as an actual example) 20020723200919.
>
> Here is a shortened version of the script:
>
>  $submitdate"); ?>
>

Hi Tony,

the date() function in PHP does _only_ take UNIX timestamps as an argument
which means that you can not run such a timestamp as the above.

I recommend that you have a look at
http://www.mysql.com/doc/D/a/Date_and_time_functions.html which describes
the built-in functions for date-handling in MySQL. A function to look at
could be DATE_FORMAT().

Regards,

Jome



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




[PHP] Re: Date() Problem

2002-07-27 Thread Tony Harrison

Yeh, ive allready looked at that before, but where and when do i use
DATE_FORMAT() ? When im inserting the row or selecting it?

"Jome" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Hi, im making a tab/lyric portal, and for viewing tabs i want to display
> the
> > time the lyric/tab was submitted. So I retrive it from a MySQL database
> (as
> > a timestamp) and format it using the date function. The problem is, that
> the
> > date: 19-01-2038 04:14:07 is allways returned, even though in the `date`
> > field the timestamp says (as an actual example) 20020723200919.
> >
> > Here is a shortened version of the script:
> >
> >  > $submitdate"); ?>
> >
>
> Hi Tony,
>
> the date() function in PHP does _only_ take UNIX timestamps as an argument
> which means that you can not run such a timestamp as the above.
>
> I recommend that you have a look at
> http://www.mysql.com/doc/D/a/Date_and_time_functions.html which describes
> the built-in functions for date-handling in MySQL. A function to look at
> could be DATE_FORMAT().
>
> Regards,
>
> Jome
>
>



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




Re: [PHP] calling user-defined php functions from tag

2002-07-27 Thread Justin French

So you want to load Page A, click on a link, stay on Page A, but execute a
function located in a script on Page B, without leaving A

I've never done it, but I believe you call a javascript function which can
do it I think... maybe it's a POST form... sorry I can't be more help, but
I've never needed to do it.

If you can live with the page refreshing, then there's heaps of options.


Justin



on 27/07/02 12:43 PM, Michael ([EMAIL PROTECTED]) wrote:

> 
> 
> Hi, Justin.
> 
> Thanks very much for the reponse.
> Yeah, this is a SUPER simplified form of my question, so please don't
> expect it to make sense. Heh.
> 
> Basically, I have a php file with dozens of functions in it. I want ONE of
> them to get called when a link is clicked.
> 
> Currently, I achieve this with the use of HTML forms. My form generates a
> list of options. And the user has to select an option, then click the
> SUBMIT button.
> 
> But I want to make it a one-step process, whereby the user only needs to
> click on the option.
> 
> Of course, you can't achieve this in a form with JavaScript, but the
> JavaScript code won't let me execute a server-side php function
> (obviously).
> 
> And I don't want to just shoot the link off to another page (even though
> that's what it was designed to do). I want to call a very specific
> function.
> 
> Tricky, I know.   :(
> 
> -- Michael
> 
> On Sat, 27 Jul 2002, Justin French wrote:
> 
>> Date: Sat, 27 Jul 2002 11:35:23 +1000
>> From: Justin French <[EMAIL PROTECTED]>
>> To: Michael <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>> Subject: Re: [PHP] calling user-defined php functions from  tag
>> 
>> on 27/07/02 12:09 PM, Michael ([EMAIL PROTECTED]) wrote:
>> 
>>> >> function joe() {
>>> $temp1=10;
>>> $temp2=20;
>>> $result=$temp1+$temp2;
>>> echo "The result of this function is: " . $result;
>>> }
>>> ?>
>> 
>> wouldn't that be
>> 
>> return "The result of this function is: " . $result;
>> 
>> rather than echo?
>> 
>> 
>> Anyhoo, you haven't specified HOW you want to communicate the result of the
>> function to the browser.
>> 
>> A HREF is supposed to take you off to another page (amongst other things),
>> which might be what you're after.
>> 
>> JavaScript (*shudder*) is designed to provide client-side actions, so maybe
>> a javascript alert is what you want, or a pop-up window, or who knows what.
>> 
>> You need to decide what happens, in a story board fashion.
>> 
>> 
>> Remember, everything in PHP code takes place on the server, BEFORE the
>> browser gets it.
>> 
>> 
>> Example of using JS alert:
>> 
>> 
>> > function joe() {
>> $temp1=10;
>> $temp2=20;
>> $result=$temp1+$temp2;
>> return "The result of this function is: " . $result;
>> }
>> ?>
>> calculate foo
>> 
>> 
>> but really, I can't understand why you wouldn't just do:
>> 
>> 
>> > $result=$temp1+$temp2;
>> echo "Total: {$result}";
>> ?>
>> 
>> 
>> Why do they have to click?
>> 
>> 
>> You'll have to check all the javascript stuff and maybe massage it, because
>> I haven't tested this, and haven't written much JS in the past coupla years.
>> 
>> 
>> Beware of the limitations of relying on javascript for anything though :)
>> 
>> 
>> Justin French
>> 
>> 
>> --
>> 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: Date() Problem

2002-07-27 Thread Jome

> Yeh, ive allready looked at that before, but where and when do i use
> DATE_FORMAT() ? When im inserting the row or selecting it?
>

Replace your existent query with this one and try:

SELECT
`artist_id`,`title`,`content`,`user_id`,DATE_FORMAT(date,'%d-%m-%Y
%H:%i:%s'),`type`,`views` FROM
`resources` WHERE `id` = $id

Regards,

Jome



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




[PHP] Re: High Resolution Images

2002-07-27 Thread Peter

I've had problems in some graphics viewers opening JPEGs saved in
progressive format.
Maybe saving them at such high resolution (or interlaced) isn't part of the
JPEG specifaction that GD uses.


"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I am creating a script that takes an uploaded image, creates a thumbnail
> from it, and saves both files.
>
> The script works great, but the problem is, the files It will have to
> handle, are high-resolution files (300dpi, 24 bit-depth).. it works fine
on
> regular files (72 dpi), but when I upload a 300dpi image, it says that the
> image is not a valid JPEG file.
>
> Warning: imagecreatefromjpeg:
> '/home/sites/site1/web/uploadedHi-Res/mo_0001.jpg' is not a valid JPEG
file
> in /home/sites/site1/web/site/designers/doSubmit.php on line 6
>
> The image appears to be valid here, it opens on photoshop, and everywhere,
> however, once uploaded, the image seems to be corrupted somehow, bc if I
> download it again, it won¨t open anywhere. Has this happened to anyone
else
> on this list?.. if so, please advise!.
>
> Here is the code for the script if it helps:
>
>
> function createThumbnail($path, $filename) {
> $src_img=ImageCreateFromJpeg($path); //HERE IT SAYS IMAGE NOT VALID
> if (imagesx($src_img)  > imagesy($src_img)) {
>  $new_w=69;
>  $new_h=40;
>  $t1 = imagesx($src_img);
>  $t2 = imagesy($src_img);
> } else {
>  $new_w=40;
>  $new_h=69;
>  $t1 = imagesy($src_img);
>  $t2 = imagesx($src_img);
>  }
> header("Content-type: image/jpeg");
> $dst_img=imagecreate($new_w,$new_h);
> imagecopyresized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,$t1,$t2);
> ImageJpeg($dst_img,
> "/home/sites/site1/web/uploadedHi-Res/$filename-thumb.jpg", 50);
> }
>
>
> if (($filename_type != "image/jpeg") && ($filename_type != "image/jpg") &&
> ($filename_type != "image/pjpeg")) {
> header("Location:submitError.php"); exit;
> } else {
> srand((double)microtime()*100);
> $randomfile = substr(md5(rand(0,999)), 0, 6);
> $upload = "/home/sites/site1/web/uploadedHi-Res";
> $upload_path = "$upload/$filename_name";
> if (is_uploaded_file($filename)) {
>  Exec("cp $filename $upload_path");
>   $link = @mysql_connect(localhost, 'x', '')
>or die("Unable to Connect to Database");
>  mysql_select_db();
>  $sql = "INSERT INTO  VALUES ('$designer_valid', '$filename_name',
> NOW(), 'Pending')";
>  $result = mysql_query($sql) or die("Query Failed");
>  createThumbnail($upload_path, $filename_name);
>  header("Location:designSubmitted.php"); exit;
> } else {
>header("Location:submitError.php"); exit;
>   }
> }
>
>



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




[PHP] Re: How to defeat winroute [proxy]?

2002-07-27 Thread Peter

Do you still get the cached version when you press the refresh button in the
browser?
Going back to a page will nearly always return a cached version of the page
unless it was created as result of a form post.


"Evgeny Chuykov" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi.
>
> I've tried this:
>
> header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
> header("Cache-control: private");
> header("Cache-control: no-cache");
> header("Cache-control: no-store");
> header("Cache-control: must-revalidate");
> header("Cache-control: proxy-revalidate");
> header("Cache-control: max-age=0");
> header("Pragma: no-cache");
>
> session_cache_limiter('private, must-revalidate');
> ( and session_cache_limiter('nocache') )
>
> But it doesn't work - winroute cache everything. Does anyone know any
> solution?
>
> --
> Best regards,
>  Evgeny  mailto:[EMAIL PROTECTED]
>



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




[PHP] Re: Date() Problem

2002-07-27 Thread JJ Harrison

Alternativly you could store the dates as UNIX timestamps.

That is what I do. It is then eaiser to do certian things(ie show stuff
released in the last month)


--
JJ Harrison
[EMAIL PROTECTED]
www.tececo.com

"Tony Harrison" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Yeh, ive allready looked at that before, but where and when do i use
> DATE_FORMAT() ? When im inserting the row or selecting it?
>
> "Jome" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > Hi, im making a tab/lyric portal, and for viewing tabs i want to
display
> > the
> > > time the lyric/tab was submitted. So I retrive it from a MySQL
database
> > (as
> > > a timestamp) and format it using the date function. The problem is,
that
> > the
> > > date: 19-01-2038 04:14:07 is allways returned, even though in the
`date`
> > > field the timestamp says (as an actual example) 20020723200919.
> > >
> > > Here is a shortened version of the script:
> > >
> > >  > > $submitdate"); ?>
> > >
> >
> > Hi Tony,
> >
> > the date() function in PHP does _only_ take UNIX timestamps as an
argument
> > which means that you can not run such a timestamp as the above.
> >
> > I recommend that you have a look at
> > http://www.mysql.com/doc/D/a/Date_and_time_functions.html which
describes
> > the built-in functions for date-handling in MySQL. A function to look at
> > could be DATE_FORMAT().
> >
> > Regards,
> >
> > Jome
> >
> >
>
>



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




[PHP] Re: Date() Problem

2002-07-27 Thread Tony Harrison

I tried using UNIX stamps but it dont work, and why the hell does it default
to that date anyway? I thought it was supposed to default to the current
time?

"Jj Harrison" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Alternativly you could store the dates as UNIX timestamps.
>
> That is what I do. It is then eaiser to do certian things(ie show stuff
> released in the last month)
>
>
> --
> JJ Harrison
> [EMAIL PROTECTED]
> www.tececo.com
>
> "Tony Harrison" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Yeh, ive allready looked at that before, but where and when do i use
> > DATE_FORMAT() ? When im inserting the row or selecting it?
> >
> > "Jome" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > > Hi, im making a tab/lyric portal, and for viewing tabs i want to
> display
> > > the
> > > > time the lyric/tab was submitted. So I retrive it from a MySQL
> database
> > > (as
> > > > a timestamp) and format it using the date function. The problem is,
> that
> > > the
> > > > date: 19-01-2038 04:14:07 is allways returned, even though in the
> `date`
> > > > field the timestamp says (as an actual example) 20020723200919.
> > > >
> > > > Here is a shortened version of the script:
> > > >
> > > >  on
> > > > $submitdate"); ?>
> > > >
> > >
> > > Hi Tony,
> > >
> > > the date() function in PHP does _only_ take UNIX timestamps as an
> argument
> > > which means that you can not run such a timestamp as the above.
> > >
> > > I recommend that you have a look at
> > > http://www.mysql.com/doc/D/a/Date_and_time_functions.html which
> describes
> > > the built-in functions for date-handling in MySQL. A function to look
at
> > > could be DATE_FORMAT().
> > >
> > > Regards,
> > >
> > > Jome
> > >
> > >
> >
> >
>
>



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




Re: [PHP] Re: Date() Problem

2002-07-27 Thread Justin French

I store all dates in unix timestamp format.  It's the easiest one to work
with, and it's easy to do things like "date + three days", because it's just
a case of adding the right number of seconds to the current stamp.

You don't have to split anything, or get substr()'s of anything... and since
date() accepts unix timestamps AND is the easiest way to get date formats
(for me), I reckon it's the best way to go.


Justin


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




[PHP] removing html...

2002-07-27 Thread JJ Harrison

Hi,

I have search around on google/php.net to try and find a way to remove
, everything above , and everything below it in a html page.

eg.



test


Blah Blah Blah



would become: Blah Blah Blah

I know how to use php to convert html to pure text etc but I don't know how
to remove the unwanted header and footer HTML.

I am pretty sure that someone must have done it(HTML file uploads for sites
etc).

Thanks in advance and good night.


--
JJ Harrison
[EMAIL PROTECTED]
www.tececo.com




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




php-general Digest 27 Jul 2002 13:38:56 -0000 Issue 1489

2002-07-27 Thread php-general-digest-help


php-general Digest 27 Jul 2002 13:38:56 - Issue 1489

Topics (messages 109909 through 109957):

Re: calling user-defined php functions from  tag
109909 by: Justin French
109911 by: Michael
109912 by: Mathieu Dumoulin
109913 by: Michael
109915 by: Mathieu Dumoulin
109917 by: Bob Lockie
109929 by: Nick Oostveen
109930 by: Chris Earle
109950 by: Justin French

Call func with variable num params (Dont confuse with making func variable params)
109910 by: Mathieu Dumoulin
109931 by: Tom Rogers

RE:
109914 by: John Holmes

Re: Possible to have optional values in function?
109916 by: JJ Harrison

need help with unusual php/mysql/array manipulation script
109918 by: spam
109928 by: Chris Earle

Re: Cookies
109919 by: John Huggins

problems with func_get_arg()
109920 by: James Nord
109927 by: Chris Earle

Re: Red Hat 7.2 enabling MySQL on preinstalled PHP
109921 by: Jason Wong

Quotes getting screwed up in form fields
109922 by: Monty
109925 by: Chris Earle
109945 by: lallous

Re: adding Databases
109923 by: Lord Loh.

Re: filling an array(2)
109924 by: Chris Earle

Re: Table formatting
109926 by: Chris Earle

snapshot windows build
109932 by: Josh Levine

I hate to do this - Parse error...
109933 by: JJ Harrison
109936 by: Chris Earle
109943 by: JJ Harrison

Is it possible...
109934 by: apollo
109939 by: lallous
109942 by: Lars Olsson

Re: phpMyAdmin and apqache 2.0.39 cache problems
109935 by: electroteque

Re: PHP / Apache 2.0.39 issues
109937 by: electroteque

Re: How to UPDATE two MySQL Tables
109938 by: Chris Earle

Re: How can I get my session variable to pass to another page?
109940 by: lallous

Re: Calling a function without variable params
109941 by: lallous

Re: Logging: Best archive method
109944 by: lallous

Re: Using Javascript
109946 by: Zoltan Konyves

Date() Problem
109947 by: Tony Harrison
109948 by: Jome
109949 by: Tony Harrison
109951 by: Jome
109954 by: JJ Harrison
109955 by: Tony Harrison
109956 by: Justin French

Re: High Resolution Images
109952 by: Peter

Re: How to defeat winroute [proxy]?
109953 by: Peter

removing html...
109957 by: JJ Harrison

Administrivia:

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

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

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


--

--- Begin Message ---

on 27/07/02 12:09 PM, Michael ([EMAIL PROTECTED]) wrote:

>  function joe() {
> $temp1=10;
> $temp2=20;
> $result=$temp1+$temp2;
> echo "The result of this function is: " . $result;
> }
> ?>

wouldn't that be

return "The result of this function is: " . $result;

rather than echo?


Anyhoo, you haven't specified HOW you want to communicate the result of the
function to the browser.

A HREF is supposed to take you off to another page (amongst other things),
which might be what you're after.

JavaScript (*shudder*) is designed to provide client-side actions, so maybe
a javascript alert is what you want, or a pop-up window, or who knows what.

You need to decide what happens, in a story board fashion.


Remember, everything in PHP code takes place on the server, BEFORE the
browser gets it.


Example of using JS alert:



calculate foo


but really, I can't understand why you wouldn't just do:





Why do they have to click?


You'll have to check all the javascript stuff and maybe massage it, because
I haven't tested this, and haven't written much JS in the past coupla years.


Beware of the limitations of relying on javascript for anything though :)


Justin French


--- End Message ---
--- Begin Message ---



Hi, Justin.

Thanks very much for the reponse.
Yeah, this is a SUPER simplified form of my question, so please don't
expect it to make sense. Heh.

Basically, I have a php file with dozens of functions in it. I want ONE of
them to get called when a link is clicked.

Currently, I achieve this with the use of HTML forms. My form generates a
list of options. And the user has to select an option, then click the
SUBMIT button.

But I want to make it a one-step process, whereby the user only needs to
click on the option.

Of course, you can't achieve this in a form with JavaScript, but the
JavaScript code won't let me execute a server-side php function
(obviously).

And I don't want to just shoot the link off to another page (even though
that's what it was designed to do). I want to call a very specific
function.

Tricky, I know.   :(

-- Michael

On Sat, 27 Jul 2002, Justin French wrote:

> Date: Sat, 27 Jul 2002 11:35:23 +1000
> From: Justin French <[EMAIL PROTECT

[PHP] Re: need help with unusual php/mysql/array manipulation script

2002-07-27 Thread spam

On Sat, 27 Jul 2002 01:08:12 -0400, [EMAIL PROTECTED] 
(Chris Earle) wrote:
> Ahhh, good old UO.  I remember GMing my taming, 
crazy what they've done to
> the game since I've quit (120 skill, insane!).
> 
> I'm not completely sure of a few things about your 
question and I think that
> I could help if you supply the answers to my 
questions.
> 
> Does one tamer's taming of an animal increase ALL 
animals by a generic
> amount (i.e., John tames "a cow" for the first time, 
then Bill tames it,
> then John tames "a polar bear" for the first time 
and, again, Bill retames
> it; do both examples raise the requirement 9.8 
points or is it based on the
> animal)?
> 
> If it is generic the answer is simple, if not, it 
might get a little more
> complicated.
>

Exactly, it is a set amount.  The 2nd time it is 
tamed, 4.8 is always added to the minimum amount.  The 
3rd time it is tamed, 19.2 is always added to the 
minimum amount.  I'm only going up to the 3rd, because 
anything past that is pretty much impractical.

thanks
sasha 




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




[PHP] Fw: ezmlm warning

2002-07-27 Thread Matt \"TrollBoy\" Wiseman

I'd be upset if my virus filter got me unsubscribed..

Matt "TrollBoy" Wiseman
Webmaster: Shoggoth.net
Site Designer: phpslash.org
The oldest and strongest emotion of mankind is fear,
and the oldest and strongest kind of fear is fear of the unknown.
-H.P. Lovecraft
-
Please do not resell my e-mail address
to anyone or send me unsolicited e-mail
-

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 11:24 PM
Subject: ezmlm warning


> Hi! This is the ezmlm program. I'm managing the
> [EMAIL PROTECTED] mailing list.
>
> I'm working for my owner, who can be reached
> at [EMAIL PROTECTED]
>
>
> Messages to you from the php-general mailing list seem to
> have been bouncing. I've attached a copy of the first bounce
> message I received.
>
> If this message bounces too, I will send you a probe. If the probe
bounces,
> I will remove your address from the php-general mailing list,
> without further notice.
>
>
> I've kept a list of which messages from the php-general mailing list have
> bounced from your address.
>
> Copies of these messages may be in the archive.
> To retrieve a set of messages 123-145 (a maximum of 100 per request),
> send an empty message to:
><[EMAIL PROTECTED]>
>
> To receive a subject and author list for the last 100 or so messages,
> send an empty message to:
><[EMAIL PROTECTED]>
>
> Here are the message numbers:
>
>107683
>107711
>
> --- Enclosed is a copy of the bounce message I received.
>
> Return-Path: <[EMAIL PROTECTED]>
> Received: (qmail 59642 invoked from network); 15 Jul 2002 10:12:37 -
> Received: from unknown (HELO mail-relay2.metalink.net) (207.19.167.130)
>   by pb1.pair.com with SMTP; 15 Jul 2002 10:12:37 -
> Received: from mail-relay2.metalink.net (mail-relay2.metalink.net
[127.0.0.1])
> by mail-relay2.metalink.net (8.11.6/8.11.6) with SMTP id g6FACZJ26275;
> Mon, 15 Jul 2002 06:12:35 -0400
> From: [EMAIL PROTECTED]
> Message-Id: <[EMAIL PROTECTED]>
> References: <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: MetaLINK Technologies E-mail AntiVirus scan results
> Date: Mon, 15 Jul 2002 06:12:35 -0400
> Importance: high
> X-Priority: 1
> X-Mailer: ravmd/8.3.2
> X-RAVMilter-Version: 8.3.1(snapshot 20020108) (mail-relay2.metalink.net)
>
>
> RAV AntiVirus for Linux i686 version: 8.3.2 (snapshot-20020108)
> Copyright (c) 1996-2001 GeCAD The Software Company. All rights reserved.
> Registered version for unlimited domains.
> Running on host: mail-relay2.metalink.net
>
> 
>  MetaLINK Technologies E-mail Antivirus results
> 
>
> The file (part0001:)->(IFRAME0) attached to mail (with subject:[PHP] Tales
of brave Ulysses?) sent by
[EMAIL PROTECTED] to
[EMAIL PROTECTED],  is infected with virus: HTML/IFrame_Exploit*.
> Cannot clean this file.
> The file was successfully deleted by MetaLINK Technologies E-mail
AntiVirus.
> 
> this is a copy of the e-mail header:
>
> Received: (qmail 17991 invoked by uid 110); 15 Jul 2002 10:12:33 -
>
>
>
> Scan engine 8.7 () for i386.
> Last update: Sat Jul 13 08:21:14 2002
> Scanning for 69330 malwares (viruses, trojans and worms).
>
> To get a free 60-days evaluation version of RAV AntiVirus v8
> (yet fully functional) please visit:
>
>http://www.ravantivirus.com
>


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




[PHP] Q:What is the easiest way to test my PHP+Html pages?

2002-07-27 Thread Marcus Unlimited

Hello,

Okay,

Here's what I want to do.

Simply test my PHP stuff and practice with MySQL.

I don't want to learn to master Unix or anything at all like that but
these vague and arcane install instructions are leading me nowhere
except to frustrations.

So what is the absolute simplest and easiest path to open my .html pages

with some php mysql in em. and see them as they will work on the web???

Thank you,
-Marcus



--
||

Marcus Unlimited
http://marcusunlimited.com
Multimedia Internet Design and Education
||

---
Also visit:
-  http://www.chromaticus.com
-  http://ampcast.com/chromaticus



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




[PHP] Re: Q:What is the easiest way to test my PHP+Html pages?

2002-07-27 Thread Tim Luoma

Marcus Unlimited wrote:

> So what is the absolute simplest and easiest path to open my .html pages 
> with some php mysql in em. and see them as they will work on the web???

To quote a friend of mine: "The only way to see how this will work is to 
see how this will work."

Get some server space with the software installed, and play with it.

There's free space available for this purpose at http://www.evolt.org 
and http://f2o.org/ and I'm sure others as well, but it's best if you 
can setup a little 'sandbox' to play in on the actual machine that you 
are using so that you are testing on the same versions, same config that 
you will be running on.

TjL



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




[PHP] Re: Q:What is the easiest way to test my PHP+Html pages?

2002-07-27 Thread Marcus Unlimited

I guess I should reiterate;

"What is the easiest way to test locally (on my desktop) without having to
upload?"

Thanks,-Marcus

Tim Luoma wrote:

> Marcus Unlimited wrote:
>
> > So what is the absolute simplest and easiest path to open my .html pages
> > with some php mysql in em. and see them as they will work on the web???
>
> To quote a friend of mine: "The only way to see how this will work is to
> see how this will work."
>
> Get some server space with the software installed, and play with it.
>
> There's free space available for this purpose at http://www.evolt.org
> and http://f2o.org/ and I'm sure others as well, but it's best if you
> can setup a little 'sandbox' to play in on the actual machine that you
> are using so that you are testing on the same versions, same config that
> you will be running on.
>
> TjL

--
||

Marcus Unlimited
http://marcusunlimited.com
Multimedia Internet Design and Education
||

---
Also visit:
-  http://www.chromaticus.com
-  http://ampcast.com/chromaticus



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




Re: [PHP] Re: Q:What is the easiest way to test my PHP+Html pages?

2002-07-27 Thread Andrew Brampton

Just install apache (for windows), MySQL (for windows), and PHP... voila a
local webserver, and the only way to view your pages, no need to upload
since you can point your webserver to where you are developing your php.

andrew
- Original Message -
From: "Marcus Unlimited" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 27, 2002 3:56 PM
Subject: [PHP] Re: Q:What is the easiest way to test my PHP+Html pages?


> I guess I should reiterate;
>
> "What is the easiest way to test locally (on my desktop) without having to
> upload?"
>
> Thanks,-Marcus
>
> Tim Luoma wrote:
>
> > Marcus Unlimited wrote:
> >
> > > So what is the absolute simplest and easiest path to open my .html
pages
> > > with some php mysql in em. and see them as they will work on the
web???
> >
> > To quote a friend of mine: "The only way to see how this will work is to
> > see how this will work."
> >
> > Get some server space with the software installed, and play with it.
> >
> > There's free space available for this purpose at http://www.evolt.org
> > and http://f2o.org/ and I'm sure others as well, but it's best if you
> > can setup a little 'sandbox' to play in on the actual machine that you
> > are using so that you are testing on the same versions, same config that
> > you will be running on.
> >
> > TjL
>
> --
>

||
>
> Marcus Unlimited
> http://marcusunlimited.com
> Multimedia Internet Design and Education
>

||
>
> ---
> Also visit:
> -  http://www.chromaticus.com
> -  http://ampcast.com/chromaticus
>
>
>
> --
> 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: Date() Problem

2002-07-27 Thread John Holmes

> I store all dates in unix timestamp format.  It's the easiest one to
work
> with, and it's easy to do things like "date + three days", because
it's
> just
> a case of adding the right number of seconds to the current stamp.
> 
> You don't have to split anything, or get substr()'s of anything... and
> since
> date() accepts unix timestamps AND is the easiest way to get date
formats
> (for me), I reckon it's the best way to go.

Well, I've got to butt in on this one and put in a big DISAGREE. Use
whatever is easiest for you, but MySQL provides a very rich assortment
of date and time manipulation functions that are a lot better than PHPs
(without any added classes). 

For example, to get everything from your database that was inserted
three days ago, you'd use:

SELECT * FROM your_table WHERE your_date_column = CURDATE() - INTERVAL 3
DAY;

Now, much of this is MySQL specific, though. I only use MySQL right now,
so it's not an issue, but it can be for some of you. 

Bottom line is use whatever is easiest for you, but realize that there
are a ton of Date and Time functions built into MySQL. Anything you can
do with a PHP function you can do with a MySQL function. You are also
not completely lost if you're storing things as Unixtimstamps. You can
convert from and to unixtimestamps and still make use of all of the
MySQL functions...

---John Holmes...


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




RE: [PHP] Q:What is the easiest way to test my PHP+Html pages?

2002-07-27 Thread John Holmes

Search on Google for PHPTriad or Firepages, or look on hotscripts.com or
sourceforge. There are a couple packages out there that'll install
Apache, PHP, and MySQL automatically for you on Windows. It's nice and
painless. 

Once it's installed, you run a little .bat program to start it all up,
and then call up http://localhost/ to view your pages.

---John Holmes...

> -Original Message-
> From: Marcus Unlimited [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 27, 2002 10:05 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Q:What is the easiest way to test my PHP+Html pages?
> 
> Hello,
> 
> Okay,
> 
> Here's what I want to do.
> 
> Simply test my PHP stuff and practice with MySQL.
> 
> I don't want to learn to master Unix or anything at all like that but
> these vague and arcane install instructions are leading me nowhere
> except to frustrations.
> 
> So what is the absolute simplest and easiest path to open my .html
pages
> 
> with some php mysql in em. and see them as they will work on the
web???
> 
> Thank you,
> -Marcus
> 
> 
> 
> --
>

||
> 
> 
> Marcus Unlimited
> http://marcusunlimited.com
> Multimedia Internet Design and Education
>

||
> 
> 
> ---
> Also visit:
> -  http://www.chromaticus.com
> -  http://ampcast.com/chromaticus
> 
> 
> 
> --
> 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] Q:What is the easiest way to test my PHP+Html pages?

2002-07-27 Thread Marcus Unlimited

Hmm, .bat that is a new one for me, will I still be able to test my pages
in regular windows browsers like IE and NN?

-Marcus


THANKS

John Holmes wrote:

> Search on Google for PHPTriad or Firepages, or look on hotscripts.com or
> sourceforge. There are a couple packages out there that'll install
> Apache, PHP, and MySQL automatically for you on Windows. It's nice and
> painless.
>
> Once it's installed, you run a little .bat program to start it all up,
> and then call up http://localhost/ to view your pages.
>
> ---John Holmes...
>
> > -Original Message-
> > From: Marcus Unlimited [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, July 27, 2002 10:05 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Q:What is the easiest way to test my PHP+Html pages?
> >
> > Hello,
> >
> > Okay,
> >
> > Here's what I want to do.
> >
> > Simply test my PHP stuff and practice with MySQL.
> >
> > I don't want to learn to master Unix or anything at all like that but
> > these vague and arcane install instructions are leading me nowhere
> > except to frustrations.
> >
> > So what is the absolute simplest and easiest path to open my .html
> pages
> >
> > with some php mysql in em. and see them as they will work on the
> web???
> >
> > Thank you,
> > -Marcus
> >
> >
> >
> > --
> >
> 
> ||
> > 
> >
> > Marcus Unlimited
> > http://marcusunlimited.com
> > Multimedia Internet Design and Education
> >
> 
> ||
> > 
> >
> > ---
> > Also visit:
> > -  http://www.chromaticus.com
> > -  http://ampcast.com/chromaticus
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php

--
||

Marcus Unlimited
http://marcusunlimited.com
Multimedia Internet Design and Education
||

---
Also visit:
-  http://www.chromaticus.com
-  http://ampcast.com/chromaticus



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




RE: [PHP] removing html...

2002-07-27 Thread John Holmes

Use a regular expression. Something like this should work.

eregi("(.*)",$html_text,$matches);

$matches[1] should contain the text you are after.

---John Holmes...

> -Original Message-
> From: JJ Harrison [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 27, 2002 9:41 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] removing html...
> 
> Hi,
> 
> I have search around on google/php.net to try and find a way to remove
> , everything above , and everything below it in a html
page.
> 
> eg.
> 
> 
> 
> test
> 
> 
> Blah Blah Blah
> 
> 
> 
> would become: Blah Blah Blah
> 
> I know how to use php to convert html to pure text etc but I don't
know
> how
> to remove the unwanted header and footer HTML.
> 
> I am pretty sure that someone must have done it(HTML file uploads for
> sites
> etc).
> 
> Thanks in advance and good night.
> 
> 
> --
> JJ Harrison
> [EMAIL PROTECTED]
> www.tececo.com
> 
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



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




Re: RE: [PHP] Q:What is the easiest way to test my PHP+Html pages?

2002-07-27 Thread [EMAIL PROTECTED]

Marcus,

A quote from my eMail YESTERDAY:

"There is a nice bundle for windows, it's perfect to test basic php/mysql
stuff. it includes Apache, MySQL and PHP. You can find it at
http://www.firepages.com.au/dev4.htm"; ...

Hope you read it now.

  Oscar.-

--- Mensaje Original --

De: John Holmes [[EMAIL PROTECTED]]
Para: Marcus Unlimited [[EMAIL PROTECTED]],
[EMAIL PROTECTED] [[EMAIL PROTECTED]]
Cc: 
Asunto: RE: [PHP] Q:What is the easiest way to test my PHP+Html pages?
Fecha: 27/07/2002 11:12:34
Mensaje:


Search on Google for PHPTriad or Firepages, or look on 
hotscripts.com
or
sourceforge. There are a couple packages out there that'll install
Apache, PHP, and MySQL automatically for you on Windows. It's nice and
painless. 

Once it's installed, you run a little .bat program to start it all up,
and then call up http://localhost/ to view your pages.

---John Holmes...

> -Original Message-
> From: Marcus Unlimited [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 27, 2002 10:05 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Q:What is the easiest way to test my PHP+Html pages?
> 
> Hello,
> 
> Okay,
> 
> Here's what I want to do.
> 
> Simply test my PHP stuff and practice with MySQL.
> 
> I don't want to learn to master Unix or anything at all like that but
> these vague and arcane install instructions are leading me nowhere
> except to frustrations.
> 
> So what is the absolute simplest and easiest path to open my .html
pages
> 
> with some php mysql in em. and see them as they will work on the
web???
> 
> Thank you,
> -Marcus
> 
> 
> 
> --
>

||
> 
> 
> Marcus Unlimited
> http://marcusunlimited.com
> Multimedia Internet Design and Education
>

||
> 
> 
> ---
> Also visit:
> -  http://www.chromaticus.com
> -  http://ampcast.com/chromaticus
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



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




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




RE: [PHP] removing html...

2002-07-27 Thread John Holmes

Or...

preg_match("/(.*)<\/body>/i",$html_text,$matches);

---John Holmes...

> -Original Message-
> From: JJ Harrison [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 27, 2002 9:41 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] removing html...
> 
> Hi,
> 
> I have search around on google/php.net to try and find a way to remove
> , everything above , and everything below it in a html
page.
> 
> eg.
> 
> 
> 
> test
> 
> 
> Blah Blah Blah
> 
> 
> 
> would become: Blah Blah Blah
> 
> I know how to use php to convert html to pure text etc but I don't
know
> how
> to remove the unwanted header and footer HTML.
> 
> I am pretty sure that someone must have done it(HTML file uploads for
> sites
> etc).
> 
> Thanks in advance and good night.
> 
> 
> --
> JJ Harrison
> [EMAIL PROTECTED]
> www.tececo.com
> 
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



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




Re: [PHP] Q:What is the easiest way to test my PHP+Html pages?

2002-07-27 Thread Marcus Unlimited

Wow hey sorry I missed that.

Thank you,
_Marcus

"[EMAIL PROTECTED]" wrote:

> Marcus,
>
> A quote from my eMail YESTERDAY:
>
> "There is a nice bundle for windows, it's perfect to test basic php/mysql
> stuff. it includes Apache, MySQL and PHP. You can find it at
> http://www.firepages.com.au/dev4.htm"; ...
>
> Hope you read it now.
>
>   Oscar.-
>
> --- Mensaje Original --
>
> De: John Holmes [[EMAIL PROTECTED]]
> Para: Marcus Unlimited [[EMAIL PROTECTED]],
> [EMAIL PROTECTED] [[EMAIL PROTECTED]]
> Cc:
> Asunto: RE: [PHP] Q:What is the easiest way to test my PHP+Html pages?
> Fecha: 27/07/2002 11:12:34
> Mensaje:
>
>
> Search on Google for PHPTriad or Firepages, or look 
>on hotscripts.com
> or
> sourceforge. There are a couple packages out there that'll install
> Apache, PHP, and MySQL automatically for you on Windows. It's nice and
> painless.
>
> Once it's installed, you run a little .bat program to start it all up,
> and then call up http://localhost/ to view your pages.
>
> ---John Holmes...
>
> > -Original Message-
> > From: Marcus Unlimited [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, July 27, 2002 10:05 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Q:What is the easiest way to test my PHP+Html pages?
> >
> > Hello,
> >
> > Okay,
> >
> > Here's what I want to do.
> >
> > Simply test my PHP stuff and practice with MySQL.
> >
> > I don't want to learn to master Unix or anything at all like that but
> > these vague and arcane install instructions are leading me nowhere
> > except to frustrations.
> >
> > So what is the absolute simplest and easiest path to open my .html
> pages
> >
> > with some php mysql in em. and see them as they will work on the
> web???
> >
> > Thank you,
> > -Marcus
> >
> >
> >
> > --
> >
> 
> ||
> > 
> >
> > Marcus Unlimited
> > http://marcusunlimited.com
> > Multimedia Internet Design and Education
> >
> 
> ||
> > 
> >
> > ---
> > Also visit:
> > -  http://www.chromaticus.com
> > -  http://ampcast.com/chromaticus
> >
> >
> >
> > --
> > 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

--
||
Marcus Unlimited
http://marcusunlimited.com
Multimedia Internet Design and Education
||
---
Also visit:
-  http://www.chromaticus.com
-  http://ampcast.com/chromaticus



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




RE: [PHP] Q:What is the easiest way to test my PHP+Html pages?

2002-07-27 Thread John Holmes

.bat is a Batch file. All it's going to do is go through and start up
Apache and MySQL for you. Then you can call up your local pages in any
browser you have installed. You can run a .bat file to stop Apache and
MySQL when you are done, too.

It's all explained in the install instructions for the package you
install.

---John Holmes...

> -Original Message-
> From: Marcus Unlimited [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 27, 2002 11:17 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Q:What is the easiest way to test my PHP+Html
pages?
> 
> Hmm, .bat that is a new one for me, will I still be able to test my
pages
> in regular windows browsers like IE and NN?
> 
> -Marcus
> 
> 
> THANKS
> 
> John Holmes wrote:
> 
> > Search on Google for PHPTriad or Firepages, or look on
hotscripts.com or
> > sourceforge. There are a couple packages out there that'll install
> > Apache, PHP, and MySQL automatically for you on Windows. It's nice
and
> > painless.
> >
> > Once it's installed, you run a little .bat program to start it all
up,
> > and then call up http://localhost/ to view your pages.
> >
> > ---John Holmes...
> >
> > > -Original Message-
> > > From: Marcus Unlimited [mailto:[EMAIL PROTECTED]]
> > > Sent: Saturday, July 27, 2002 10:05 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: [PHP] Q:What is the easiest way to test my PHP+Html
pages?
> > >
> > > Hello,
> > >
> > > Okay,
> > >
> > > Here's what I want to do.
> > >
> > > Simply test my PHP stuff and practice with MySQL.
> > >
> > > I don't want to learn to master Unix or anything at all like that
but
> > > these vague and arcane install instructions are leading me nowhere
> > > except to frustrations.
> > >
> > > So what is the absolute simplest and easiest path to open my .html
> > pages
> > >
> > > with some php mysql in em. and see them as they will work on the
> > web???
> > >
> > > Thank you,
> > > -Marcus
> > >
> > >
> > >
> > > --
> > >
> >

> > ||
> > > 
> > >
> > > Marcus Unlimited
> > > http://marcusunlimited.com
> > > Multimedia Internet Design and Education
> > >
> >

> > ||
> > > 
> > >
> > > ---
> > > Also visit:
> > > -  http://www.chromaticus.com
> > > -  http://ampcast.com/chromaticus
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> --
>

||
> 
> 
> Marcus Unlimited
> http://marcusunlimited.com
> Multimedia Internet Design and Education
>

||
> 
> 
> ---
> Also visit:
> -  http://www.chromaticus.com
> -  http://ampcast.com/chromaticus
> 
> 
> 
> --
> 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: Quotes getting screwed up in form fields

2002-07-27 Thread Julio Nobrega

  I would guess your value doesn't have double quotes around.



  Because what might happen is this:

http://www.inerciasensorial.com.br


"Monty" <[EMAIL PROTECTED]> escreveu na mensagem
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> If someone enters this into a field...
>
>New York "City"
>
> and I need to re-display it in the field (if an error occurred, for
> example), this is what's in the field...
>
>New York \
>
> I have another multi-line text field that I used quotes in and this
doesn't
> happen with that field, even though they are both being treated in the
same
> manner. What am I missing?
>



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




RE: [PHP] Re: How to UPDATE two MySQL Tables

2002-07-27 Thread John Holmes

> You can use REPLACE instead of making two separate queries (UPDATE and
> INSERT) because it checks if it is there, and if it's not, then it
adds
> it;
> otherwise it updates it.  I think that's right ... but the SQL
server's
> SQL
> server is broken! (the irony!)

Just note that REPLACE is MySQL specific. A solution using it may not be
portable to other databases. May or may not matter to you...

---John Holmes...


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




RE: [PHP] Is it possible...

2002-07-27 Thread John Holmes

> Is it possible download php scripts from webpages ? for example i need
> php.net scripts or others :-)  If yes, how ?

Not unless they let you and give you a link to show the source or to
download it. You can't get the source for just any PHP page b/c it's
parsed on the server and only HTML is sent to you.

---John Holmes


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




RE: [PHP] Quotes getting screwed up in form fields

2002-07-27 Thread John Holmes

> If someone enters this into a field...
> 
>New York "City"
> 
> and I need to re-display it in the field (if an error occurred, for
> example), this is what's in the field...
> 
>New York \
> 
> I have another multi-line text field that I used quotes in and this
> doesn't
> happen with that field, even though they are both being treated in the
> same
> manner. What am I missing?

If you look at your source code, you'll see that the entire string is
there. It will look like this:

Value="New York\"City\""

HTML doesn't know that \ is used to escape the " character. It just sees
the string "New York\" and treats the rest as an unknown attribute. 

So, to do it correctly, you should use this:

Value=""

---John Holmes...


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




Re: [PHP] Re: Q:What is the easiest way to test my PHP+Html pages?

2002-07-27 Thread J. Cox


"Andrew Brampton" <[EMAIL PROTECTED]> wrote in message
014a01c2357e$77a15b50$0100a8c0@andrew">news:014a01c2357e$77a15b50$0100a8c0@andrew...
> Just install apache (for windows), MySQL (for windows), and PHP... voila a
> local webserver, and the only way to view your pages, no need to upload
> since you can point your webserver to where you are developing your php.
>
> andrew

Or you could use something like FoxServ:

http://foxserv.linuxmax.net/portal.php

J. Cox
http://www.dinerminor.com
http://www.postnuke.com



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




[PHP] Re: Q:What is the easiest way to test my PHP+Html pages?

2002-07-27 Thread Tim Luoma

Marcus Unlimited wrote:

> "What is the easiest way to test locally (on my desktop) without having to
> upload?"

If you follow the route that several folks suggest and go with one of 
the 'install everything' routes, be sure to install the same versions 
... for example, some of them install older versions of PHP which may 
change some things (ala register_globals) so your scripts may work on 
your local development machine but not on the actual server.

TjL




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




RE: [PHP] Password Generator Script

2002-07-27 Thread Naintara Jain

The following code was created to generate a random password.
But it can be used to generate a random string for any purpose.

The basic idea was to create an array that would contain all the letters of
the English alphabet, and pick out random values from that array. I have
outlined two methods below, please also read the explanation/comments
provided below.

Method 1:
$strrandom=””;

$ivalfrom =ord("a");
$ivalto =ord("z");

for($i=$ivalfrom; $i<=$ivalto; $i++)
$arralpha[] = chr($i);

mt_srand ((double) microtime() * 100);

$rand_al = array_rand ($arralpha, 3);
$strrandom = $arralpha[$rand_al[0]] . $arralpha[$rand_al[1]] .
$arralpha[$rand_al[3]];
$numpart=mt_rand(10,99);
$strrandom .= $numpart;

echo "random = $strrandom";


-

Method 2:
$strrandom=””;

$ivalfrom =ord("a");
$ivalto =ord("z");

for($i=$ivalfrom; $i<=$ivalto; $i++)
$arralpha[] = chr($i);

mt_srand ((double) microtime() * 100);

$strrandom =
$arralpha[mt_rand(0,25)].$arralpha[mt_rand(0,25)].$arralpha[mt_rand(0,25)];
$numpart=mt_rand(10,99);
$strrandom .= $numpart;

echo "random = $strrandom";

-

Explanantion:

/* I used a “for” loop to populate the array with the alphabets in lowercase
(to increase the number of values, you could probably insert uppercase
alphabets too). */

//first populate array with alphabets
$ivalfrom =ord("a");
$ivalto =ord("z");

//add the alphabets to the array
for($i=$ivalfrom; $i<=$ivalto; $i++)
$arralpha[] = chr($i);

/* $arralpha is an array variable which refers to the array of 26 alphabets.
*/

/* I seed the random generator */
mt_srand ((double) microtime() * 100);

/* I wanted my string to contain 3 random letters. I use the array_rand()
function, which takes as input an array, and the number of random values
desired (which is 3 here, but it could be 26 too, equal to or less than the
size of the array). It returns an array, which contains indexes taken at
random from the array passed as the argument.*/

$rand_al = array_rand ($arralpha, 3);
/* Here, $rand_al is another array variable which contains random indexes */

$strrandom=””;
$strrandom = $arralpha[$rand_al[0]] . $arralpha[$rand_al[1]] .
$arralpha[$rand_al[3]];
/* In the above statement, the values in the $rand_al are really subscripts
of the alphabet array, so I use them as subscripts to finally arrive at the
random string. You could iterate through the generated $rand_al using a loop
to get the subscripts */

/* Please note that array_rand() will work for PHP4 and above, it may not
return random values if you do not seed the generator first, and it may
still create a problem on some windows machines (a bug, which has been fixed
on PHP 4.2.2 –dev version). In such a case, use Method 2. */

/* The two lines below add a 2-digit number to the random string. */
$numpart=mt_rand(10,99);
$strrandom .= $numpart;

-Naintara


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
t]On Behalf Of Liam MacKenzie
Sent: Thursday, July 25, 2002 1:04 PM
To: [EMAIL PROTECTED]; Monty
Subject: Re: [PHP] Password Generator Script




Random Password : 


In action:
http://scripts.operationenigma.net/passgen.php


Have fun  :-)





- Original Message -
From: "Monty" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 25, 2002 2:49 PM
Subject: [PHP] Password Generator Script


> Can anyone recommend where I could find a decent script that automatically
> generates passwords? I don't care if they are readable or just random
> letters, numbers.
>
> Thanks!
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>




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





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




RE: [PHP] removing html...

2002-07-27 Thread John Holmes

> I have search around on google/php.net to try and find a way to remove
> , everything above , and everything below it in a html
page.

FYI on the two methods I suggested:

preg_match("/(.*)<\/body>/i",$html_text,$matches);
eregi("(.*)",$html_text,$matches);

Preg vs. Ereg 
nametotal time  average iteration time  
100%Preg Method 59ms5.906E-005  
339%Ereg Method 200ms   0.00020036  

Each method was called 10,000 times. 

---John Holmes...


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




Re: [PHP] High Resolution Images

2002-07-27 Thread [EMAIL PROTECTED]

Justin,

I did what you said, just uploaded the file and downloaded it again, and
the weirdest thing is happening. When I Form-Upload/FTP-Download it, I can
see it on my local computer, it opens everywhere. Now, when I try to see it
from the web site it is uploaded (http://ebsite/file.jpg), it does not
display. mmm Any suggestions?

- Original Message - 
From: "Justin French" <[EMAIL PROTECTED]>
To: "Tech Support" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 9:22 PM
Subject: Re: [PHP] High Resolution Images


> Does the maximum uploaded file size directive in php.ini refuse upload, or
> cut the file off at the maximum?
> 
> If you're uploading via a browser, it *might* be chopping it off,
resulting
> in an invalid file.
> 
> Try *JUST* uploading the file and saving it to disk, then try downloading
&
> saving that file to disk... compare file sizes, and try to open the file.
> 
> 
> If all this works, then you can rule out a file size issue, and look at
> other issues, like a potential bug with large files or large resolutions.
> 
> 
> Justin French

> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, July 26, 2002 5:24 PM
> Subject: [PHP] High Resolution Images
> 
> 
>> Hello,
>> 
>> I am creating a script that takes an uploaded image, creates a thumbnail
>> from it, and saves both files.
>> 
>> The script works great, but the problem is, the files It will have to
>> handle, are high-resolution files (300dpi, 24 bit-depth).. it works fine
> on
>> regular files (72 dpi), but when I upload a 300dpi image, it says that
the
>> image is not a valid JPEG file.
>> 
>> Warning: imagecreatefromjpeg:
>> '/home/sites/site1/web/uploadedHi-Res/mo_0001.jpg' is not a valid JPEG
> file
>> in /home/sites/site1/web/site/designers/doSubmit.php on line 6
>> 
>> The image appears to be valid here, it opens on photoshop, and
everywhere,
>> however, once uploaded, the image seems to be corrupted somehow, bc if I
>> download it again, it won¨t open anywhere. Has this happened to anyone
> else
>> on this list?.. if so, please advise!.
>> 
>> Here is the code for the script if it helps:
>> 
>> 
>> function createThumbnail($path, $filename) {
>> $src_img=ImageCreateFromJpeg($path); //HERE IT SAYS IMAGE NOT VALID
>> if (imagesx($src_img)  > imagesy($src_img)) {
>> $new_w=69;
>> $new_h=40;
>> $t1 = imagesx($src_img);
>> $t2 = imagesy($src_img);
>> } else {
>> $new_w=40;
>> $new_h=69;
>> $t1 = imagesy($src_img);
>> $t2 = imagesx($src_img);
>> }
>> header("Content-type: image/jpeg");
>> $dst_img=imagecreate($new_w,$new_h);
>> imagecopyresized($dst_img,$src_img,0,0,0,0,$new_w,$new_h,$t1,$t2);
>> ImageJpeg($dst_img,
>> "/home/sites/site1/web/uploadedHi-Res/$filename-thumb.jpg", 50);
>> }
>> 
>> 
>> if (($filename_type != "image/jpeg") && ($filename_type != "image/jpg")
&&
>> ($filename_type != "image/pjpeg")) {
>> header("Location:submitError.php"); exit;
>> } else {
>> srand((double)microtime()*100);
>> $randomfile = substr(md5(rand(0,999)), 0, 6);
>> $upload = "/home/sites/site1/web/uploadedHi-Res";
>> $upload_path = "$upload/$filename_name";
>> if (is_uploaded_file($filename)) {
>> Exec("cp $filename $upload_path");
>> $link = @mysql_connect(localhost, 'x', '')
>> or die("Unable to Connect to Database");
>> mysql_select_db();
>> $sql = "INSERT INTO  VALUES ('$designer_valid', '$filename_name',
>> NOW(), 'Pending')";
>> $result = mysql_query($sql) or die("Query Failed");
>> createThumbnail($upload_path, $filename_name);
>> header("Location:designSubmitted.php"); exit;
>> } else {
>> header("Location:submitError.php"); exit;
>> }
>> }
>> 
>> 
>> 


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




Re: [PHP] Re: Q:What is the easiest way to test my PHP+Html pages?

2002-07-27 Thread Steve Buehler

Install PHP on your desktop.  You will need a web server too.  I use 
PHP/MySQL/Apache on my Laptop, Desktop, Servers and workstations.

Steve

At 07:56 AM 7/27/2002 -0700, you wrote:
>I guess I should reiterate;
>
>"What is the easiest way to test locally (on my desktop) without having to
>upload?"
>
>Thanks,-Marcus
>
>Tim Luoma wrote:
>
> > Marcus Unlimited wrote:
> >
> > > So what is the absolute simplest and easiest path to open my .html pages
> > > with some php mysql in em. and see them as they will work on the web???
> >
> > To quote a friend of mine: "The only way to see how this will work is to
> > see how this will work."
> >
> > Get some server space with the software installed, and play with it.
> >
> > There's free space available for this purpose at http://www.evolt.org
> > and http://f2o.org/ and I'm sure others as well, but it's best if you
> > can setup a little 'sandbox' to play in on the actual machine that you
> > are using so that you are testing on the same versions, same config that
> > you will be running on.
> >
> > TjL
>
>--
>||
>
>Marcus Unlimited
>http://marcusunlimited.com
>Multimedia Internet Design and Education
>||
>
>---
>Also visit:
>-  http://www.chromaticus.com
>-  http://ampcast.com/chromaticus
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>--
>This message has been scanned for viruses and
>dangerous content by MailScanner, and is
>believed to be clean.
>ow3



--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
ow3


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




[PHP] Stopping Multiple Entries in mySQL DB

2002-07-27 Thread Thomas Edison Jr.

Glory!

I just want my Adding Into Database script to check if
the Name/Country already exists, and if it does, it
shouldn't be allowed. 

If some with 
Name : Jackson
Country : USA
exists in my DB, no one with same name/country should
be able to add his name/country in the DB.

Can anyone hint?

T. Edison Jr.



__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

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




RE: [PHP] Stopping Multiple Entries in mySQL DB

2002-07-27 Thread John Holmes

> I just want my Adding Into Database script to check if
> the Name/Country already exists, and if it does, it
> shouldn't be allowed.
> 
> If some with
> Name : Jackson
> Country : USA
> exists in my DB, no one with same name/country should
> be able to add his name/country in the DB.

Have your database handle that, not PHP.

When you create your table, make the combo of Name and Country unique.

CREATE TABLE your_table {
Name VARCHAR(15),
Country VARCHAR(15),
UNIQUE Name_Country (Name, Country)
}

Then you can have "Jackson, USA", "Jackson, UK", "Someone Else, USA",
etc...just not the same combination at all.

---John Holmes...


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




[PHP] string comparison

2002-07-27 Thread Bas Jobsen

Hello,

When should i prefer strcmp() above == or !=?
I have test it out (see code below).
But a == comparison seems to be faster always.
First i thought is was cause, if(strcmp($1,$2)!=0), 
needs two comparisons (strcmp and !=). But even
if($1!=$2) is faster then if(strcmp($1,$2)).

Thanks,

Bas Jobsen


1000x:

1000x:


1000x:

1000x:


1000x:

1000x:


1000x:

1000x:




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




RE: [PHP] string comparison

2002-07-27 Thread John Holmes

Strcmp() is case sensitive. So use it when you need a case sensitive
comparison.

---John Holmes...

> -Original Message-
> From: Bas Jobsen [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 27, 2002 12:35 PM
> To: PHP General
> Subject: [PHP] string comparison
> 
> Hello,
> 
> When should i prefer strcmp() above == or !=?
> I have test it out (see code below).
> But a == comparison seems to be faster always.
> First i thought is was cause, if(strcmp($1,$2)!=0),
> needs two comparisons (strcmp and !=). But even
> if($1!=$2) is faster then if(strcmp($1,$2)).
> 
> Thanks,
> 
> Bas Jobsen
> 
>  
> function getmicrotime(){
> list($usec, $sec) = explode(" ",microtime());
> return ((float)$usec + (float)$sec);
> }
> 
> 
> $t1='hello';
> $t2='hello';
> $t3='hallo';
> 
> ?>
> 1000x: $start=getmicrotime();
> for($a=0; $a<10; $a++) if(strcmp($t1,$t3));//nonmatch
> echo getmicrotime()-$start;
> ?>
> 
> 1000x: $start=getmicrotime();
> for($a=0; $a<10; $a++) if($t1!=$t3);//nonmatch
> echo getmicrotime()-$start;
> ?>
> 
> 
> 1000x: $start=getmicrotime();
> for($a=0; $a<10; $a++) if(!strcmp($t1,$t3));//match
> echo getmicrotime()-$start;
> ?>
> 
> 1000x: $start=getmicrotime();
> for($a=0; $a<10; $a++) if($t1==$t3);//match
> echo getmicrotime()-$start;
> ?>
> 
> 
> 1000x: $start=getmicrotime();
> for($a=0; $a<10; $a++) if(strcmp($t1,$t2));//nonmatch
> echo getmicrotime()-$start;
> ?>
> 
> 1000x: $start=getmicrotime();
> for($a=0; $a<10; $a++) if($t1!=$t2);//nonmatch
> echo getmicrotime()-$start;
> ?>
> 
> 
> 1000x: $start=getmicrotime();
> for($a=0; $a<10; $a++) if(!strcmp($t1,$t2));//match
> echo getmicrotime()-$start;
> ?>
> 
> 1000x: $start=getmicrotime();
> for($a=0; $a<10; $a++) if($t1==$t2);//match
> echo getmicrotime()-$start;
> ?>
> 
> 
> 
> 
> --
> 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] uploading pictures

2002-07-27 Thread Oliver Witt

Alexander Kuznetsov schrieb:

> Hello Oliver,
>
> Thursday, July 25, 2002, 1:42:05 PM, you wrote:
>
> OW> Alexander Kuznetsov schrieb:
>
> >> i think u should set write permissions to directory
> >> where u r trying to copy file
>
> OW> Thank you for answering.
> OW> But how do I set write permisisons? With a .htaccess file?
> OW> Oliver
>
> i think the reason is write permission on file system of the server
> and u have to type chmod command:
>
> shell> chmod a+r /place/to/put/uploaded/file
>
> P.S. When reply message use Reply-To All option for you answer will be
> accessible in PHP-general mailing list ;)
>
> --
> Best regards,
> Alexander Kuznetsov

I got a ftp program that i wanna use to set write permission. It tells me
to enter it like that:
site chmod %a[Mode] %a[Filename]
I still don't know how to do it, can somebody please give me an example?
Oliver


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




[PHP] portal / content management

2002-07-27 Thread M.E. Suliman

Hi

Can anyone recommend a good portal system / content management system
(polls, forums, etc.)  I have tried phpnuke but am bound to the standard
layout of it i.e content in the centre and blocks on the left or right.

Any recommendation will be appreciated.

Mohamed



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




RE: [PHP] Re: Table formatting

2002-07-27 Thread Wouter | esctoday.com

I'd use the following code:

--
// DB QUERY
$query = "SELECT columnFirst, columnSecond, columnThird FROM table_name";
$result = mysql_query($query) or die(mysql_error());

// NOW THE LOOP
while ($row = mysql_fetch_assoc($result))
{
 echo "";
 echo "";
 echo join("", $row);
 echo "";
 echo "";
};
--



-Oorspronkelijk bericht-
Van: Chris Earle [mailto:[EMAIL PROTECTED]]
Verzonden: 27 July 2002 06:54
Aan: [EMAIL PROTECTED]
Onderwerp: [PHP] Re: Table formatting


You can do what he said or just put a separate loop inside the original
loop.

Depending on how you get the info, you can use either way (his would create
less overhead if you are just using the same  info every row, otherwise
they're really the same because his way you'll have to create an array to
access later for multiple rows, or just do my way and have the loop access
the NEXT *3* (or whatever) items ...).

i.e.,
for (LOOP FOR )
{
for (LOOP FOR ) {}
}

"César aracena" <[EMAIL PROTECTED]> wrote in message
001a01c234f0$a5e8ad80$28ed0dd1@gateway">news:001a01c234f0$a5e8ad80$28ed0dd1@gateway...
Hi all.

Last nite I've came across a problem I wasn't able to figure out by my
self. It's not difficult to make a loop that will make new *TABLE ROWS*
() to show several DB objects in a nice way. what I need to do, is
to display 2 or maybe even 3 of this objects stored in a DB per table
row, separated in different *TABLE COLUMS* (). how can I achieve
this? What I usually do is:

--
// DB QUERY
$query = "SELECT * FROM table_name";
$result = mysql_query($query) or die(mysql_error());
$num_rows = mysql_num_rows($result);

// NOW THE LOOP
for ($i=0; $i<$num_rows; $i++)
{
 $row = mysql_fetch_array($result);
 echo "";
 echo "";
 echo $row[whatever];
 echo "";
 echo "";
}
--

but how can I get 2 or 3 columns displaying different db objects? A loop
inside a loop?

Thanks in advance,

  Cesar Aracena
CE / MCSE+I
Neuquen, Argentina
+54.299.6356688
+54.299.4466621





--
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] what is http://127.0.0.1?

2002-07-27 Thread Matthew K. Gold

ever since I put up a personal firewall, when I start MySQL I''ve been
getting alerts that MySQL is trying to access this ip address when I start
it...

what, exactly, is it, and is there any reason why MySQL would need to access
the internet if I have apache on my own machine?

thanks,

Matt


- Original Message -
From: Jadiel Flores <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 6:33 PM
Subject: Re: [PHP] Installed PHP on home Win98se, now how can I get browser
to see it?


> Obiously you need a WebServer too, you can install Apache or Personal Web
> Server, and configure php to work with it, next you can browse you own
> server with the address http://localhost or http://127.0.0.1, maybe you
> will have to install mysql for windows too if you wanna work with
databases
> too.
>
> Jadiel
>
> At 03:18 PM 7/26/2002 -0700, you wrote:
> >Hello,
> >
> >I just installed the nice and easy one click PHP install to my Windows
> >98se machine.
> >
> >I just want to be able to test and practice My basic PHP /MySQL stuff
> >without up loading.
> >
> >So now what do I do.
> >
> >I ran the php info scripts and got bunch of weird messages.
> >
> >How do I get the PHP to work in my browsers IE, NN just as it does when
> >uploaded to my hosting co's servers?
> >
> >Thanks,
> >-Marcus
> >
> >--
>
>|||
|||
> >
> >Marcus Unlimited
> >http://marcusunlimited.com
> >Multimedia Internet Design and Education
>
>|||
|||
> >
> >---
> >Also visit:
> >-  http://www.chromaticus.com
> >-  http://ampcast.com/chromaticus
> >
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, visit: http://www.php.net/unsub.php
>
> Jadiel Flores
> -
> http://www.abargon.com
> [EMAIL PROTECTED]
> (52-55) 52-29-80-34
>
>
>
> --
> 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] CURL & SSL

2002-07-27 Thread Jonathan Rosenberg

I am on a server that has CURL & OpenSSL enabled.  I assumed that this meant
that I could do https: requests via CURL.  But for some reason, my attempts
to do this are not working.

If I do a CURL http: request, everything works fine (i.e., I get the web
page, as expected).  But if I use an https: request, no value is returned.

Do I need to do something else to make https: requests work in CURL?

Here's the code in question:

$ch = curl_init("https://secure.authorize.net/gateway/transact.dll";);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);

In this case, $result is the null string (if you try that URL in your
browser, you will that some text is returned).  If I replace the curl_init
with

$ch = curl_init("http://www.cnet.com";);

I get the expected string in $result.

Any thoughts?

--
JR



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




Re: [PHP] what is http://127.0.0.1?

2002-07-27 Thread Duncan Hill

On Sat, 27 Jul 2002, Matthew K. Gold wrote:

> ever since I put up a personal firewall, when I start MySQL I''ve been
> getting alerts that MySQL is trying to access this ip address when I start
> it...
> 
> what, exactly, is it, and is there any reason why MySQL would need to access
> the internet if I have apache on my own machine?

127.0.0.1 == your machine.

127.0.0.1 == something called the local loopback.

In other words, pretty safe to let mysql access it.


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




Re: [PHP] CURL & SSL

2002-07-27 Thread Oscar F

Jonathan,

The exact same thing is happening to me right now, only that I'm working
with the "Concord" people, not with authorize... it says SSL is enabled when
I ask for the info.

The reason why you're not getting the values, is that cURL is telling PHP:
curl: (1) libcurl was built with SSL disabled, https: not supported!

You can see this if you have shell access, and type on command line: curl
"https://...";.

I've tried all that I have found on the cURL mailing list history (make
distclean, ./configure --with-ssl=SSLPATH, make install)..etc..etc.. but
nothing works... Anyone has a solution?.

  Oscar F.-

- Original Message -
From: "Jonathan Rosenberg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 27, 2002 1:50 PM
Subject: [PHP] CURL & SSL


> I am on a server that has CURL & OpenSSL enabled.  I assumed that this
meant
> that I could do https: requests via CURL.  But for some reason, my
attempts
> to do this are not working.
>
> If I do a CURL http: request, everything works fine (i.e., I get the web
> page, as expected).  But if I use an https: request, no value is returned.
>
> Do I need to do something else to make https: requests work in CURL?
>
> Here's the code in question:
>
> $ch = curl_init("https://secure.authorize.net/gateway/transact.dll";);
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
> $result = curl_exec($ch);
>
> In this case, $result is the null string (if you try that URL in your
> browser, you will that some text is returned).  If I replace the curl_init
> with
>
> $ch = curl_init("http://www.cnet.com";);
>
> I get the expected string in $result.
>
> Any thoughts?
>
> --
> JR
>
>
>
> --
> 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] Is it possible...

2002-07-27 Thread apollo

thanks



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




[PHP] failure notice (fwd)

2002-07-27 Thread Miguel Cruz

Is this for real? Rackspace hosts an awful lot of good-hearted people
(including myself). Is there a specific reason why the entire ISP's
customer base has been blocked from posting to php-general? I guess I have
to give up participating on the PHP list...

miguel

-- Forwarded message --
Date: 27 Jul 2002 19:21:15 -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: failure notice

Hi. This is the qmail-send program at stoic.net.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<[EMAIL PROTECTED]>:
216.92.131.4 does not like recipient.
Remote host said: 553 209.61.128.0/18 blocked by rackspace.blackholes.us
Giving up on 216.92.131.4.

--- Below this line is a copy of the message.

Return-Path: <[EMAIL PROTECTED]>
Received: (qmail 22694 invoked by uid 508); 27 Jul 2002 19:21:11 -
Received: from localhost ([EMAIL PROTECTED])
  by localhost with SMTP; 27 Jul 2002 19:21:11 -
Date: Sat, 27 Jul 2002 14:21:11 -0500 (CDT)
From: Miguel Cruz <[EMAIL PROTECTED]>
To: Tony Harrison <[EMAIL PROTECTED]>
cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Date() Problem
In-Reply-To: <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Sat, 27 Jul 2002, Tony Harrison wrote:
> I tried using UNIX stamps but it dont work, and why the hell does it default
> to that date anyway? I thought it was supposed to default to the current
> time?

Be very happy it works the way it does. Since it defaults to an
easily-recognizable date and time, you can quickly tell when you've messed
up your code.

If you don't provide a second argument to date() at all, then it'll
default to the current date and time.

miguel


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




Re: [PHP] Stopping Multiple Entries in mySQL DB

2002-07-27 Thread Chris Earle

do that plus with your insert, just do "INSERT IGNORE ".

"John Holmes" <[EMAIL PROTECTED]> wrote in message
01c2358a$bd729fc0$b402a8c0@mango">news:01c2358a$bd729fc0$b402a8c0@mango...
> > I just want my Adding Into Database script to check if
> > the Name/Country already exists, and if it does, it
> > shouldn't be allowed.
> >
> > If some with
> > Name : Jackson
> > Country : USA
> > exists in my DB, no one with same name/country should
> > be able to add his name/country in the DB.
>
> Have your database handle that, not PHP.
>
> When you create your table, make the combo of Name and Country unique.
>
> CREATE TABLE your_table {
> Name VARCHAR(15),
> Country VARCHAR(15),
> UNIQUE Name_Country (Name, Country)
> }
>
> Then you can have "Jackson, USA", "Jackson, UK", "Someone Else, USA",
> etc...just not the same combination at all.
>
> ---John Holmes...
>



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




[PHP] Combining Columns in MySQL for PHP

2002-07-27 Thread Chris Earle

I was wondering if there was any way to get MySQL to combine the specified
SELECT columns into one column.

i.e.,

SELECT COMBINE(column_1, column_2) As column FROM column_list;

Would give me the results of column_1 and column_2 simply by going through
"column".

Is there any thing that does this in MySQL, or do I have to do this in PHP?
I've been searching mysql.com, but there search engine seems to be broken
and gives me errors frequently. :(



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




RE: [PHP] Combining Columns in MySQL for PHP

2002-07-27 Thread John Holmes

> SELECT COMBINE(column_1, column_2) As column FROM column_list;
> 
> Would give me the results of column_1 and column_2 simply by going
through
> "column".

Use CONCAT() where you have COMBINE().

---John Holmes...


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




Re: [PHP] failure notice (fwd)

2002-07-27 Thread Tech Support

That's what happens when ISP's aren't careful about what happens on their
network. Getting your IP's on the black list is probably one of the worst
things you can let happen as an ISP. They warn you and give you time to
rectify the situation (cancel accounts/access of offenders) before they
actually add you to the list, which is impossible to get removed from.

Many sysadmins rely on the black list to keep their users from getting tons
of spam. It's funny to see the current list of ISP's who ignored the
warnings and got added. Another example of how clueless some of these big
companies really are.

http://blackholes.us/

I am totally surprised to see rackspace on the list. I always thought they
ran a pretty tight ship since they are probably one of the only large collo
companies actually making profit.

That is a drag! You shouldn't give up on the list though. It's not like
php.net has anything against rackspace users. They are just one of many who
make use of the blacklist. Use another email account or get a hotmail
account or something. The list needs you! :-)

Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Miguel Cruz" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 27, 2002 2:24 PM
Subject: [PHP] failure notice (fwd)


> Is this for real? Rackspace hosts an awful lot of good-hearted people
> (including myself). Is there a specific reason why the entire ISP's
> customer base has been blocked from posting to php-general? I guess I have
> to give up participating on the PHP list...
>
> miguel
>
> -- Forwarded message --
> Date: 27 Jul 2002 19:21:15 -
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: failure notice
>
> Hi. This is the qmail-send program at stoic.net.
> I'm afraid I wasn't able to deliver your message to the following
addresses.
> This is a permanent error; I've given up. Sorry it didn't work out.
>
> <[EMAIL PROTECTED]>:
> 216.92.131.4 does not like recipient.
> Remote host said: 553 209.61.128.0/18 blocked by rackspace.blackholes.us
> Giving up on 216.92.131.4.
>
> --- Below this line is a copy of the message.
>
> Return-Path: <[EMAIL PROTECTED]>
> Received: (qmail 22694 invoked by uid 508); 27 Jul 2002 19:21:11 -
> Received: from localhost ([EMAIL PROTECTED])
>   by localhost with SMTP; 27 Jul 2002 19:21:11 -
> Date: Sat, 27 Jul 2002 14:21:11 -0500 (CDT)
> From: Miguel Cruz <[EMAIL PROTECTED]>
> To: Tony Harrison <[EMAIL PROTECTED]>
> cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Re: Date() Problem
> In-Reply-To: <[EMAIL PROTECTED]>
> Message-ID: <[EMAIL PROTECTED]>
> MIME-Version: 1.0
> Content-Type: TEXT/PLAIN; charset=US-ASCII
>
> On Sat, 27 Jul 2002, Tony Harrison wrote:
> > I tried using UNIX stamps but it dont work, and why the hell does it
default
> > to that date anyway? I thought it was supposed to default to the current
> > time?
>
> Be very happy it works the way it does. Since it defaults to an
> easily-recognizable date and time, you can quickly tell when you've messed
> up your code.
>
> If you don't provide a second argument to date() at all, then it'll
> default to the current date and time.
>
> miguel
>
>
> --
> 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] CURL & SSL

2002-07-27 Thread Tech Support

cURL needs to be compiled with SSL support.

./configure --with-ssl=SSLPATH where SSLPATH is the actual path to where
openssl can be found.

./configure --with-ssl=/usr works for me.

Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Oscar F" <[EMAIL PROTECTED]>
To: "Jonathan Rosenberg" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, July 27, 2002 1:42 PM
Subject: Re: [PHP] CURL & SSL


> Jonathan,
>
> The exact same thing is happening to me right now, only that I'm working
> with the "Concord" people, not with authorize... it says SSL is enabled
when
> I ask for the info.
>
> The reason why you're not getting the values, is that cURL is telling PHP:
> curl: (1) libcurl was built with SSL disabled, https: not supported!
>
> You can see this if you have shell access, and type on command line: curl
> "https://...";.
>
> I've tried all that I have found on the cURL mailing list history (make
> distclean, ./configure --with-ssl=SSLPATH, make install)..etc..etc.. but
> nothing works... Anyone has a solution?.
>
>   Oscar F.-
>
> - Original Message -
> From: "Jonathan Rosenberg" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, July 27, 2002 1:50 PM
> Subject: [PHP] CURL & SSL
>
>
> > I am on a server that has CURL & OpenSSL enabled.  I assumed that this
> meant
> > that I could do https: requests via CURL.  But for some reason, my
> attempts
> > to do this are not working.
> >
> > If I do a CURL http: request, everything works fine (i.e., I get the web
> > page, as expected).  But if I use an https: request, no value is
returned.
> >
> > Do I need to do something else to make https: requests work in CURL?
> >
> > Here's the code in question:
> >
> > $ch = curl_init("https://secure.authorize.net/gateway/transact.dll";);
> > curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
> > $result = curl_exec($ch);
> >
> > In this case, $result is the null string (if you try that URL in your
> > browser, you will that some text is returned).  If I replace the
curl_init
> > with
> >
> > $ch = curl_init("http://www.cnet.com";);
> >
> > I get the expected string in $result.
> >
> > Any thoughts?
> >
> > --
> > JR
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



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




Re: [PHP] Combining Columns in MySQL for PHP

2002-07-27 Thread Chris Earle

Thanks for the reply, and I see that I didn't get specific enough (my fault!
sorry).

Here's what I want to take from:

+-+--+
| col_1| col_2 |
+-+--+
| 2.0| 6.8|
+-+--+
| 4.1| 8.9|
+-+--+

I want to do something like SELECT COMBINE(col_1, col_2) as col FROM
column_list ORDER BY col;

Which would give me:

+---+
| col |
+---+
| 2.0 |
+---+
| 4.1 |
+---+
| 6.8 |
+---+
| 8.9 |
+---+

CONCAT would only work if I want strings concatenated on the same row.  Is
there some way I can use JOIN to get what I want?

"John Holmes" <[EMAIL PROTECTED]> wrote in message
000201c235a7$59348560$b402a8c0@mango">news:000201c235a7$59348560$b402a8c0@mango...
> > SELECT COMBINE(column_1, column_2) As column FROM column_list;
> >
> > Would give me the results of column_1 and column_2 simply by going
> through
> > "column".
>
> Use CONCAT() where you have COMBINE().
>
> ---John Holmes...
>



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




RE: [PHP] Combining Columns in MySQL for PHP

2002-07-27 Thread John Holmes

You have a bad database design if you need something like what you are
describing. The columns should probably be in another table, with a
second column, a number, saying which column the number is for.

So your second table would look like the result you want to have...

You may be able to do it with a temporary table, though:

INSERT INTO temp (col) SELECT col1 FROM your_table;
INSERT INTO temp (col) SELECT col2 FROM your_table;
SELECT col FROM temp ORDER BY col ASC;

---John Holmes...

> -Original Message-
> From: Chris Earle [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, July 27, 2002 4:08 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Combining Columns in MySQL for PHP
> 
> Thanks for the reply, and I see that I didn't get specific enough (my
> fault!
> sorry).
> 
> Here's what I want to take from:
> 
> +-+--+
> | col_1| col_2 |
> +-+--+
> | 2.0| 6.8|
> +-+--+
> | 4.1| 8.9|
> +-+--+
> 
> I want to do something like SELECT COMBINE(col_1, col_2) as col FROM
> column_list ORDER BY col;
> 
> Which would give me:
> 
> +---+
> | col |
> +---+
> | 2.0 |
> +---+
> | 4.1 |
> +---+
> | 6.8 |
> +---+
> | 8.9 |
> +---+
> 
> CONCAT would only work if I want strings concatenated on the same row.
Is
> there some way I can use JOIN to get what I want?
> 
> "John Holmes" <[EMAIL PROTECTED]> wrote in message
> 000201c235a7$59348560$b402a8c0@mango">news:000201c235a7$59348560$b402a8c0@mango...
> > > SELECT COMBINE(column_1, column_2) As column FROM column_list;
> > >
> > > Would give me the results of column_1 and column_2 simply by going
> > through
> > > "column".
> >
> > Use CONCAT() where you have COMBINE().
> >
> > ---John Holmes...
> >
> 
> 
> 
> --
> 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] File Browser like Win Explorer in php

2002-07-27 Thread Reuben D. Budiardja

Hi,
I am wondering if anyone has created or know where I can get a code for
browsing files and directory in using php in linux. The one I am looking
for is file browsing capability that is similar to Window Explorer,
meaning you can expand and collapse directory.
I just don't want to re-invent the wheel. If anyone knows about this,
please let me know. I appreciate the help. 

Thanks in advance.
Reuben D. Budiardja





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




[PHP] Dijkstra's Algorithm

2002-07-27 Thread Ville Mattila

Hello there,

I found this very good snippet of Dijkstra's Alogrithm here.
http://www.phpbuilder.com/snippet/detail.php?type=snippet&id=714

Anyway, I have a rather big node network (5 nodes) and this is getting a
bit low. I noted that the script calculates the shortest distance to every
node in the network. Would it be possible to modify it so that it calculates
the shortest distance only from point A to point B that I define both in
advance?

I couldn't figure out that script structure so that I could make the needes
change by myself. Would somebody help me a bit with that?

Or does anyone know another code snippet which makes the same - calculates
the shortest distance and route from node to node?

Thank you,
Ville



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




Re: [PHP] File Browser like Win Explorer in php

2002-07-27 Thread Bob Lockie

On 27 Jul 2002 17:16:52 -0400, Reuben D. Budiardja wrote:

>Hi,
>I am wondering if anyone has created or know where I can get a code for
>browsing files and directory in using php in linux. The one I am looking
>for is file browsing capability that is similar to Window Explorer,
>meaning you can expand and collapse directory.
>I just don't want to re-invent the wheel. If anyone knows about this,
>please let me know. I appreciate the help. 
>
>Thanks in advance.
>Reuben D. Budiardja

Check out:
http://www.phpbuilder.com/snippet/
http://www.phpclasses.org/

I don't know if what you want is there.




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




[PHP] call to undefined function: mysql_connect

2002-07-27 Thread lfindle

Hi.

I'm running PHP 4.2.1 & MySQL 3.23. I'm getting the error message "Call to
undefined function: mysql_connect()" when I try to use it in my code. If
anyone has any ideas as to why this might be happening, I'd be appreciative.



Thanks!


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




[PHP] Sending a File to User's Browser

2002-07-27 Thread Oscar F

Hello,

I need a user to save an image file to their disk. Normally when someone clicks on an 
link to a .jpg file, the fil will display on the same browser window, since it is 
capable of displaying such files. Now, I don't want this to happen, I need to be able 
to show the user the "Save As.." dialog when they click the link. I know it can be 
done bc I've seen it in phpMyAdmin, when you want to save the database dump. If you 
dont click "Save as file" it just displays the text in your browser.

Any ideas??.. :)

  Oscar.-



RE: [PHP] call to undefined function: mysql_connect

2002-07-27 Thread Richard Pijnenburg

It seems then that your mysql support isn't installed correctly with
your php. 

Richard Pijnenburg

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, July 28, 2002 12:25 AM
To: [EMAIL PROTECTED]
Subject: [PHP] call to undefined function: mysql_connect 

Hi.



I'm running PHP 4.2.1 & MySQL 3.23. I'm getting the error message "Call
to

undefined function: mysql_connect()" when I try to use it in my code. If

anyone has any ideas as to why this might be happening, I'd be
appreciative.







Thanks!



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


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




[PHP] CMS systems using PHP and PostgreSQL?

2002-07-27 Thread Glenn Sieb

Does anyone know of a good CMS using both PHP and PostgreSQL?

I see a lot of CMS' out there like pHpSlash, but I'd like to find one that 
works with PostgreSQL if possible.. :) (I use PostgreSQL for a few other 
things, and would much rather not have to load MySQL on the server as well)

Thanks in advance, as always!
Glenn

---
The original portions of this message are the copyright of the author
(c)1998-2002 Glenn E. Sieb.ICQ UIN: 300395IRC Nick: Rainbear
"All acts of Love and Pleasure are Her rituals"-Charge of the Goddess



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




[PHP] RTRIM() - Won't accept 2nd Param

2002-07-27 Thread Monty

When I issue this command to remove any commas at end of string:

$query = rtrim($query, ",");

PHP give me an error saying "Wrong parameter count for rtrim()". How can
this be? The online manual shows rtrim can accept two parameters. Shouldn't
this work? I have PHP 4.0.6 installed on the server.

Thanks.


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




[PHP] Re: removing html...

2002-07-27 Thread JJ Harrison

Thanks,

I had never used regular expressions before and will look into them a bit
more.


--
JJ Harrison
[EMAIL PROTECTED]
www.tececo.com

"Jj Harrison" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
> I have search around on google/php.net to try and find a way to remove
> , everything above , and everything below it in a html page.
>
> eg.
>
> 
> 
> test
> 
> 
> Blah Blah Blah
> 
> 
>
> would become: Blah Blah Blah
>
> I know how to use php to convert html to pure text etc but I don't know
how
> to remove the unwanted header and footer HTML.
>
> I am pretty sure that someone must have done it(HTML file uploads for
sites
> etc).
>
> Thanks in advance and good night.
>
>
> --
> JJ Harrison
> [EMAIL PROTECTED]
> www.tececo.com
>
>
>



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




RE: [PHP] RTRIM() - Won't accept 2nd Param

2002-07-27 Thread Mark Charette

>From the man page:

Note: The second parameter was added in PHP 4.1.0 

-Original Message-
From: Monty [mailto:[EMAIL PROTECTED]]
Sent: Saturday, July 27, 2002 7:28 PM
To: [EMAIL PROTECTED]
Subject: [PHP] RTRIM() - Won't accept 2nd Param


When I issue this command to remove any commas at end of string:

$query = rtrim($query, ",");

PHP give me an error saying "Wrong parameter count for rtrim()". How can
this be? The online manual shows rtrim can accept two parameters. Shouldn't
this work? I have PHP 4.0.6 installed on the server.


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




[PHP] Extra spacing with in HTML

2002-07-27 Thread Kevin Breit

Hey guys,
I am using a textarea to pass information to PHP.  I want to be able to
include HTML tags inside the text area.  I am using ln2br() to properly
convert line breaks to HTML.  This is where my issue comes up.

Lets say I have


  Blar


ln2br() will crunch that and put out:

  Blar


That creates a lot of white space when that HTML is rendered.  How do I
tell PHP not to put line breaks in a situation like that?

Thanks!
-- 
Kevin Breit <[EMAIL PROTECTED]>


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




Re: [PHP] Sending a File to User's Browser

2002-07-27 Thread Support

This works on everything I've tested so far.

$file = "/some/path/to/file";
header("Content-Disposition: inline; filename=" . basename($file));
header("Content-Type: application/octet-stream");
header("Content-Type: application/force-download");
header("Content-Type: application/download");
header("Content-Transfer-Encoding: binary");
header("Content-Length: " . filesize($file));
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
readfile("$file");
exit();

Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net

- Original Message -
From: "Oscar F" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 27, 2002 5:46 PM
Subject: [PHP] Sending a File to User's Browser


Hello,

I need a user to save an image file to their disk. Normally when someone
clicks on an link to a .jpg file, the fil will display on the same browser
window, since it is capable of displaying such files. Now, I don't want this
to happen, I need to be able to show the user the "Save As.." dialog when
they click the link. I know it can be done bc I've seen it in phpMyAdmin,
when you want to save the database dump. If you dont click "Save as file" it
just displays the text in your browser.

Any ideas??.. :)

  Oscar.-



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




[PHP] php 'mail()' security

2002-07-27 Thread Dennis Gearon

How can I make my form which entered by a user, then sent to a company
employee, secure, not vulnerable attack?
-- 
-
Joy is just a thing (to be).. raised on,
Love is just the way to Live and Die,
John Denver.
-
He lost a friend, but kept his Memory (also John Denver),
Thank you...John Corones...my friend always.
-
Look lovingly upon the present,
for it holds the only things that are forever true.
-
Sincerely, Dennis Gearon (Kegley)

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




RE: [PHP] RTRIM() - Won't accept 2nd Param

2002-07-27 Thread David Freeman

 > When I issue this command to remove any commas at end of string:
 > 
 > $query = rtrim($query, ",");
 > 
 > PHP give me an error saying "Wrong parameter count for 
 > rtrim()". How can
 > this be? The online manual shows rtrim can accept two 
 > parameters. Shouldn't
 > this work? I have PHP 4.0.6 installed on the server.

>From what I can see, the second parameter (that you are trying to use)
wasn't introduced until v4.1.0 - that is, you can't use it with your
version of php.

You may find that if you can't upgrade your php you'll need to do
something with substr() and str_pos().

CYA, Dave




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




[PHP] Apache 2

2002-07-27 Thread Kasper

/usr/local/include/pth/pth.h:526: warning: this is the location of the
previous definition
In file included from /usr/local/apache/include/apr_portable.h:90,
 from /usr/local/apache/include/http_protocol.h:64,
 from sapi_apache2.c:38:
/usr/local/include/pth/pthread.h:186: redefinition of `nfds_t'
/usr/local/include/pth/pth.h:56: `nfds_t' previously declared here
sapi_apache2.c: In function `php_input_filter':
sapi_apache2.c:287: structure has no member named `__pthread_read'
*** Error code 1

Stop in /usr/home/base/php-4.2.2/sapi/apache2filter.
*** Error code 1

Stop in /usr/home/base/php-4.2.2/sapi/apache2filter.
*** Error code 1

Stop in /usr/home/base/php-4.2.2/sapi.
*** Error code 1

Stop in /usr/home/base/php-4.2.2.


Why

./configure --prefix=/usr/local/apache --enable-module=so --enable-suexec --
suexec-caller=www --enable-threads

./configure --with-pgsql --with-apxs2=/usr/local/apache/bin/apxs --with-gd -
-with-zlib --with-png-dir=/usr/local/lib --with-jpeg-dir=/usr/local --with-f
reetype-dir=/usr/local/include/freetype2 --enable-gd-native-ttf --with-tsrm-
pth



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




[PHP] PHP/MySQL Search Engine Query Question

2002-07-27 Thread Paul Maine

I am currently working on a website that is implemented using PHP and MySQL.

The site currently has a simple search engine that allows a shopper to type
in a search string that is stored in $search. For example, if a shopper
types in 1972 Ford Mustang
$string ="1972 Ford Mustang"

Using the following SQL statement:
SELECT * FROM whatevertable WHERE whatevercolumn LIKE '%$search%

Records are returned that have this exact string and in this exact order
(I'm aware a wild card character is included on the front and back of the
string).

My desire is to be able to logically AND each token of the search together
independent or the order of the tokens.
I want to return all records that have Mustang AND 1972 AND Ford.

Since a shopper inputs the search string in advance I don't know how many
tokens will be used.

I would appreciate any suggestions.

Regards,
Paul


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




[PHP] How do I show the sourse code?

2002-07-27 Thread Øystein Håland

I have seen on some of the script-sites around some nice ways of presenting
the source code. Often in nice colors. So, the natural question is: how is
that done (cause I don't think anyone has the patience to put < and >
around all the <>)



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




Re: [PHP] php 'mail()' security

2002-07-27 Thread Bob Lockie

On Sat, 27 Jul 2002 17:31:16 -0700, Dennis Gearon wrote:

>How can I make my form which entered by a user, then sent to a company
>employee, secure, not vulnerable attack?
>-- 
>-
>Joy is just a thing (to be).. raised on,
>Love is just the way to Live and Die,
>   John Denver.
>-
>He lost a friend, but kept his Memory (also John Denver),
>   Thank you...John Corones...my friend always.
>-
>Look lovingly upon the present,
>for it holds the only things that are forever true.
>-
>   Sincerely, Dennis Gearon (Kegley)

Setup SSL on your web server.




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




Re: [PHP] How do I show the sourse code?

2002-07-27 Thread Bob Lockie

>I have seen on some of the script-sites around some nice ways of presenting
>the source code. Often in nice colors. So, the natural question is: how is
>that done (cause I don't think anyone has the patience to put < and >
>around all the <>)

Probably some PHP wrapper that highlights the right portions of the code
and sends it back.
I don't know where you can grab one from but it shouldn't be too difficult to make 
your own.




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




Re: [PHP] Extra spacing with in HTML

2002-07-27 Thread Jason Stechschulte

On Sat, Jul 27, 2002 at 08:08:34PM -0400, Kevin Breit wrote:
> Lets say I have
> 
> 
>   Blar
> 
> 
> ln2br() will crunch that and put out:
> 
>   Blar
> 
> 
> That creates a lot of white space when that HTML is rendered.  How do I
> tell PHP not to put line breaks in a situation like that?

There might be an easier way, but you might just have to write your own
code for this.  Something along the lines of: (completely untested)

\n", "\n", $line);
?>

-- 
Jason Stechschulte
[EMAIL PROTECTED]
http://www.ypisco.com
--
The brain is a wonderful organ; it starts working the moment you get up
in the morning, and does not stop until you get to school.

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




[PHP] setcookie question

2002-07-27 Thread Gaylen Fraley

I need to create a cookie that is accessible from more than 1 application,
but on the same server.  What would be the proper syntax?  What I tried was
setcookie ("myCookie","$cookie_value",$timeToExpire,'/');  Right or wrong or
impossible?  Should I not have used the "/"?  Thanks.

--
Gaylen
PHP KISGB v4.0.5 Guest Book http://www.gaylenandmargie.com/phpwebsite/
PHP KISSQ v1.0 Stock Quote http://www.gaylenandmargie.com/phpwebsite




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




Re: [PHP] php 'mail()' security

2002-07-27 Thread Dennis Gearon

What I meant was, how to sanitize the input on the forms so that
malicious stuff cannot be put as commands, etc. in the email address, or
body, or 'extra' field of the 'mail()' function in PHP.
-- 
-
Joy is just a thing (to be).. raised on,
Love is just the way to Live and Die,
John Denver.
-
He lost a friend, but kept his Memory (also John Denver),
Thank you...John Corones...my friend always.
-
Look lovingly upon the present,
for it holds the only things that are forever true.
-
Sincerely, Dennis Gearon (Kegley)

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




RE: [PHP] PHP/MySQL Search Engine Query Question

2002-07-27 Thread Naintara Jain

You can use explode/split functions on the search parameters - that will
give u an array with each search token indexed individually. Suppose the
search input was 'abc xyz'

$strsearch = "abc xyz";

$search=explode(" ",$strsearch);

your array "search" will contain

$search[0]=abc
$search[1]=xyz

Now, you can iterate through the array members and create a SQL string out
of it, join the elements with "LIKE" and "AND".

so that you have something like

SELECT * FROM whatevertable WHERE whatevercolumn LIKE '%$search[0]% AND
whatevercolumn LIKE '%$search[1]%

Since you won't know how many search input 'tokens' will be searched on: Use
a loop to create the SQL statement. You can also use the implode() function
to create the SQL.

Textual searches can be optimised somewhat by creating the appropriate
indexes (refer to the MySQL manual).

-Naintara

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
t]On Behalf Of Paul Maine
Sent: Sunday, July 28, 2002 8:02 AM
To: PHP PHP
Subject: [PHP] PHP/MySQL Search Engine Query Question


I am currently working on a website that is implemented using PHP and MySQL.

The site currently has a simple search engine that allows a shopper to type
in a search string that is stored in $search. For example, if a shopper
types in 1972 Ford Mustang
$string ="1972 Ford Mustang"

Using the following SQL statement:
SELECT * FROM whatevertable WHERE whatevercolumn LIKE '%$search%

Records are returned that have this exact string and in this exact order
(I'm aware a wild card character is included on the front and back of the
string).

My desire is to be able to logically AND each token of the search together
independent or the order of the tokens.
I want to return all records that have Mustang AND 1972 AND Ford.

Since a shopper inputs the search string in advance I don't know how many
tokens will be used.

I would appreciate any suggestions.

Regards,
Paul


--
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] How do I show the sourse code?

2002-07-27 Thread Michael Sims

On Sun, 28 Jul 2002 03:41:19 +0200, you wrote:

>I have seen on some of the script-sites around some nice ways of presenting
>the source code. Often in nice colors. So, the natural question is: how is
>that done (cause I don't think anyone has the patience to put < and >
>around all the <>)

http://www.php.net/manual/en/function.highlight-file.php

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




[PHP] running php with .html files?

2002-07-27 Thread Henry

Hi All,

I'm sure I saw a posting on this subject a month ago so please excuse me for
not paying attention the first time ;-|

I have a php script that I wish to execute but I want to put it in
index.html (not index.php)

I know there is a solution involving configuration files in either the
directory wher the file is held or specifically for the server.
(Unfortunately I don't have access to the conf files for the server because
I'm currently using a shared serever from an ISP).

Any help is greatly appreciated. Even pointers in the right direction would
be useful.

TIA

Henry






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




[PHP] Pulling a data from array of checkboxes

2002-07-27 Thread V Sharapov

I am passing a value of checkboxes in a form to a new page like this (see 
example here: http://www.gibsonusa.com/test/check/)
In a new page how can I pull the data from a MySQL database according to 
each value I passed from a previous page? In other words: Assume that the 
value of a checkbox equal to the ID of the record in a database. The value 
of checkbox 1 (for example) is 12345 and the value of checkbox2 is 67890. 
After passing those values to a new page how can I pull the rest of the 
information from a database for those values?




_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




RE: [PHP] Pulling a data from array of checkboxes

2002-07-27 Thread John Holmes

> I am passing a value of checkboxes in a form to a new page like this
(see
> example here: http://www.gibsonusa.com/test/check/)
> In a new page how can I pull the data from a MySQL database according
to
> each value I passed from a previous page? In other words: Assume that
the
> value of a checkbox equal to the ID of the record in a database. The
value
> of checkbox 1 (for example) is 12345 and the value of checkbox2 is
67890.
> After passing those values to a new page how can I pull the rest of
the
> information from a database for those values?

http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php