Newbie Question - Client Side Script Language

Newbie Question - Client Side Script Language

am 25.09.2007 22:55:30 von antonio.cuartas

Hi all,

Ok... PHP is a server side scripting language but what about the
client side???

Can I use PHP on the client side as well (for example to validate some
form fields) or do I need to use something like JavaScript??? What are
the alternatives???

Thanks in advance!!!

Re: Newbie Question - Client Side Script Language

am 25.09.2007 23:12:12 von Good Man

antonio.cuartas@gmail.com wrote in news:1190753730.097971.27070@
22g2000hsm.googlegroups.com:

>
> Hi all,
>
> Ok... PHP is a server side scripting language but what about the
> client side???
>
> Can I use PHP on the client side as well (for example to validate some
> form fields) or do I need to use something like JavaScript??? What are
> the alternatives???

Javascript is a client side language. This is what you need to 'validate'
form fields. It is my duty to remind you that server-side validation must
be performed whether or not you use any client-side validation.

You cannot use PHP on the client side; PHP runs on a server.

Re: Newbie Question - Client Side Script Language

am 26.09.2007 00:06:56 von gosha bine

antonio.cuartas@gmail.com wrote:
> Hi all,
>
> Ok... PHP is a server side scripting language but what about the
> client side???
>
> Can I use PHP on the client side as well (for example to validate some
> form fields) or do I need to use something like JavaScript??? What are
> the alternatives???
>
> Thanks in advance!!!
>

As long as your client is html-based (i.e. browser), javascript is the
only option. Running php on the client requires php to be installed
there (sounds logical, huh?), which is not the case for most clients.


--
gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok

Re: Newbie Question - Client Side Script Language

am 26.09.2007 01:18:07 von Michael Fesser

..oO(antonio.cuartas@gmail.com)

>Ok... PHP is a server side scripting language but what about the
>client side???
>
>Can I use PHP on the client side as well (for example to validate some
>form fields)

In theory - yes. In practice - no.

To run PHP scripts in a browser it would require a plugin. In fact such
plugins exist, but they are more or less experimental and usually not
installed on any user machine.

>or do I need to use something like JavaScript??? What are
>the alternatives???

There's only JS.

Micha

Re: Newbie Question - Client Side Script Language

am 26.09.2007 21:13:21 von dejan

On Sep 25, 10:55 pm, antonio.cuar...@gmail.com wrote:
> Hi all,
>
> Ok... PHP is a server side scripting language but what about the
> client side???
>
> Can I use PHP on the client side as well (for example to validate some
> form fields) or do I need to use something like JavaScript??? What are
> the alternatives???
>
> Thanks in advance!!!

You can use AJAX (JavaScript). AJAX can send some string to php page
which return if form field is valid or invalid.

Re: Newbie Question - Client Side Script Language

am 26.09.2007 22:30:08 von Steve

"gosha bine" wrote in message
news:fdc0ru$jc9$1@registered.motzarella.org...
> antonio.cuartas@gmail.com wrote:
>> Hi all,
>>
>> Ok... PHP is a server side scripting language but what about the
>> client side???
>>
>> Can I use PHP on the client side as well (for example to validate some
>> form fields) or do I need to use something like JavaScript??? What are
>> the alternatives???
>>
>> Thanks in advance!!!
>>
>
> As long as your client is html-based (i.e. browser), javascript is the
> only option. Running php on the client requires php to be installed there
> (sounds logical, huh?), which is not the case for most clients.

oh man! gosha, you propensity toward blanket, incorrect statements is even
more pronounced than my 'polemic needs'!!!

let's see, BESIDES javascript, there's vb script, tck/tl, java applets,
activex, etc., etc.

Re: Newbie Question - Client Side Script Language

am 27.09.2007 03:00:54 von ragearc

xD Wow steve you're really in the mood for flaming man

Re: Newbie Question - Client Side Script Language

am 27.09.2007 03:03:21 von luiheidsgoeroe

On Thu, 27 Sep 2007 03:00:54 +0200, RageARC wrote:

> xD Wow steve you're really in the mood for flaming man
>

Damn, he's off cnntp again...
Care to quote correctly what he said?
--
Rik Wasmus