Re: [PHP] Can I perform a PHP script from a form but stay on the same page afterwards?

2002-08-15 Thread Charles Fowler

Check out Liz Fulgham article on PHP and Forms ->>
http://softwaredev.earthweb.com/script/article/0,,12063_996351,00.html

It show how the _SERVER fuction/varible is used.

Cheers CJ

Jim Dam wrote:

> http://www.faqts.com/knowledge_base/view.phtml/aid/235/fid/17
> - Original Message -
> From: "php @ banana" <[EMAIL PROTECTED]>
> To: "PHP-GENERAL" <[EMAIL PROTECTED]>
> Sent: Friday, August 09, 2002 5:51 PM
> Subject: Re: [PHP] Can I perform a PHP script from a form but stay on the
> same page afterwards?
>
> >You can send a 204 No Content header, and the browser won't move to the new
> >page, but instead the PHP script will be executed and the browser will stay
> >on the same page.
>
> could you gimmie a code snippet of the above
>
> Thanks
>
> R>
>
> >
> >Jim Dam
> >[EMAIL PROTECTED]
> >
> >
> >- Original Message -
> >From: "César Aracena" <[EMAIL PROTECTED]>
> >To: "'DonPro'" <[EMAIL PROTECTED]>; "'php list'"
> <[EMAIL PROTECTED]>
> >Sent: Friday, August 09, 2002 4:53 PM
> >Subject: RE: [PHP] Can I perform a PHP script from a form but stay on the
> >same page afterwards?
> >
> >
> >> > -Original Message-
> >> > From: DonPro [mailto:[EMAIL PROTECTED]]
> >> > Sent: Friday, August 09, 2002 5:34 PM
> >> > To: php list
> >> > Subject: [PHP] Can I perform a PHP script from a form but stay on the
> >> same
> >> > page afterwards?
> >> >
> >> > Hi,
> >> >
> >> > I have a form where the user can change a value ion a text box and
> >> then
> >> > click on a button which will update a table in a MySQL database.  I
> >> assume
> >> > that the only way to do this is to have the button POST the form value
> >> to
> >> > my
> >> > script which updates the MySQL table.
> >> >
> >> > However, once updated (whether the update is successfull or not), I
> >> need
> >> > to
> >> > remain or return to the same page that the form is on.
> >> >
> >> > Can this easily be done?
> >> >
> >> >
> >> [Cesar Aracena]
> >>
> >> Sure. All you have to do is point the form's action to $PHP_SELF and the
> >> play a little with the *IF* and *ELSE IF* statements.
> >>
> >> >
> >> > --
> >> > 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
> >
>
> --__-__-__
> eat pasta
> type fasta
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


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




[PHP] How can I strip the code from HTML pages to extract the contents of a HTML page.

2002-08-28 Thread Charles Fowler

This may be an interesting challenge for someone or has it been done
before

Can some one help me.

I am looking for a laboursaving method of extracting the contents of a
web page (Text only) and dumping the rest of the html code.

I need the contents to rework the pages and put the contents into flat
file database. Large but only two columns of data. Simple to work with
(no need for DB) - They are just alot of links on a links page.

Scripts would be welcome.

Ciao, Carlos





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


Re: [PHP] How can I strip the code from HTML pages to extract thecontents of a HTML page.

2002-08-29 Thread Charles Fowler

I was looking into stripping HTML files that contain alot of links. I
was trying to avoid the manual way of data entry. The contents i need
are the name of the link (plain text which sits out side the HTML code)
and all the a href tags. I would like the a href  (ie.the hyperlink)
tags to be displayed on the HTML output as plain text. All other HTML
tags would be kept in place.

The reason why I am doing this is that I am placing a link's name and
the http:// link in to flat files, where they can be updated just by
appending to them. The srcipt that I have does the rest.

I have looked into the functions suggested but do find the concepts and
use of the opperators to strip the HTML involved esoteric and tricky.

¬¬Chuck¬¬



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


Re: [PHP] and or statement

2002-08-29 Thread Charles Fowler


 PHP and MYSQL Web Development manual by Welling and Thompson states 
that logical operators are as follows:
___
Operator    Name   
Use
Result
___
!   
NOT   !$b
Returns true if $b is false
and vice versa
&&   
AND  $a &&
$b   Returns true
if both $ a and $b are true; otherwise false
| |   
OR
$a | | $b   Returns
true if either $ a or $b
are true; otherwise false
and  
AND  $a and $b   
Same as && but with lower precedence
or  
OR    $a
or $b  Same as | |
but with lower precedence
___
Just wanted to touch on the matter of the little fact that " and " and
" or " can be used in PHP but the order of precedence.
Hope this is helpful
¬¬Chuck¬¬

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