Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > PHP
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help.

Google
Reply
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 4:00 PM   #1
Pixel McGee
 
Pixel McGee's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Help please for newbie

Grytpype-Thynne <geraldIDONTWANTSPAMbramwell@hotmail.com> wrote in
news:MPG.19937ed178ef5b79896e5@news.individual.net :

> Hi,
>
> I have a membership application form on the Animals in Distress website
> at http://www.animals-in-distress.net/memapp.htm for people to fill in
> then print and send with a cheque, I have been told it is possible to
> have it place the amount in the Amount Enclosed box automatically
> depending on the numbers and costs of memberships.
>
> Can someone point me in the direction of a tutorial or script that

would
> do this, I have not yet delved into php but am going to start.
>
> Thanks
>
> Gerald
>


First, let me say kudos on the subject matter of that site. Very noble
cause indeed. Second, let me be sure I am clear on what you are looking
to do. Someone comes to the site, chooses 1-9 on your membership page and
you would like to have it fill in the "Amount Enclosed" text box
automatically based on what they select?

If so, it is possible but you won't use PHP. PHP is a server side script
and what you are looking to do is client side. You'll need some
Javascript - more specifically the "onchange" javascript event.

Looking at your code it seems you are using a code generating app, like
FrontPage, and I have no idea if an example from me would break that code
or not, since I have never used one of those applications, so I won't try
it. But the "onChange" javascript function is what you need.

HTH,

--
Pixel McGee
"The world is coming to an end. Please log off."
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Advertisements
Old 07-01-2007, 4:00 PM   #2
Grytpype-Thynne
 
Grytpype-Thynne's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Help please for newbie

In article <Xns93C9ADC02D628pixelmcgee@199.45.49.11>,
pixel@nospam.invalid says...
> onchange
>

thanks for your reply and your comment, I asked because I had been given
the following information to the question in another group



Yes, simply make the form page a php e.g. memapp.php and set the action
to
self
e.g.
echo " <form method=\"post\" action=\"$PhP_SELF\">\n";

By passing any variables back to itself via the form call you can then
get
parse the variables and return the result in the shape of the completed
form
with the amount (totaled) etc.

Gerald
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 07-01-2007, 4:12 PM   #3
Grytpype-Thynne
 
Grytpype-Thynne's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Help please for newbie

In article <i35jivcd4et9g7ig3vq0442aj7ro5bgvsu@4ax.com>,
ian@WINDOZEdigiserv.net says...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Whilst lounging around on Thu, 31 Jul 2003 23:02:34 +0100,
> Grytpype-Thynne <geraldIDONTWANTSPAMbramwell@hotmail.com> amazingly
> managed to produce the following with their Etch-A-Sketch:
>
> > In article <Xns93C9ADC02D628pixelmcgee@199.45.49.11>,
> > pixel@nospam.invalid says...
> > > onchange
> > >

> > thanks for your reply and your comment, I asked because I had been
> > given the following information to the question in another group
> >
> >
> >
> > Yes, simply make the form page a php e.g. memapp.php and set the
> > action to
> > self
> > e.g.
> > echo " <form method=\"post\" action=\"$PhP_SELF\">\n";

> ^^^^^^^^^
>
> VERY BAD coding practice.
>
>
> >
> > By passing any variables back to itself via the form call you can
> > then get
> > parse the variables and return the result in the shape of the
> > completed form
> > with the amount (totaled) etc.
> >
> > Gerald

>
>
> echo "<form method=\"post\" action=\"{$_SERVER['PHP_SELF']}\">\n";
>
>
>
> Regards,
>
> Ian
>
> -----BEGIN PGP SIGNATURE-----
> Version: PGP 8.0
>
> iQA/AwUBPymUrWfqtj251CDhEQIqIgCePMbZOEWtiQWeWFYzVAOJcQ Wi7KIAoLcI
> tPzzqqkUyPqbS/kvmWZnm4Jl
> =6wk1

Thanks Ian,

Could you possibly point me in the direction of more info on this or
somewhere I can get a script, as I have not yet started on php.

Gerald
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 07-01-2007, 4:12 PM   #4
Ian.H [dS]
 
Ian.H [dS]'s Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Help please for newbie

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Whilst lounging around on Fri, 1 Aug 2003 18:11:31 +0100,
Grytpype-Thynne <geraldIDONTWANTSPAMbramwell@hotmail.com> amazingly
managed to produce the following with their Etch-A-Sketch:

> Thanks Ian,
>
> Could you possibly point me in the direction of more info on this
> or somewhere I can get a script, as I have not yet started on php.



Gerald,

Have a look on http://www.php.net/ _the_ best reference you'll find
=)

I'll explain my point to clarify anyway:


$PHP_SELF was / is fine if register_globals are enabled.. but this
opens up security concerns as no checks are done to see if the data
has come from say, a GET URL (foo.com?bar=bleh) or if from a POST
method in a form.. or from a cookie, session var etc etc, so as you
can see, this is somewhat insecure (or could be). Defining it as
$_SERVER['PHP_SELF'] means that if I used foo.com?bar=php_self it'd
fail, as that would only be available from $_GET['php_self'].

You can find more indepth explanations on this again, on php.net is
you doa search for "register_globals" and check out the security
comments etc about it =)

Also.. create a .php file with just:


<?php phpinfo(); ?>


Access it via a URL as you would normally, and it'll display a load
of info regarding the server and PHP install. If you scroll down to
the bottom of the page, you'll see lots more $_SERVER[] vars too, to
which you can use in scripts too. As phpinfo() displays the output of
such vars, you can see as to what each would contain too, to help you
know of that's the one you want to use etc etc etc.


HTH.



Regards,

Ian

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0

iQA/AwUBPyqhiWfqtj251CDhEQLwOwCgk9S4362LrjLGe3UHI8sBWx EyqhEAnRsw
at9VHf1T+pOAqvP+KKe8pe1x
=fXxf
-----END PGP SIGNATURE-----

--
Ian.H [Design & Development]
digiServ Network - Web solutions
www.digiserv.net | irc.digiserv.net | forum.digiserv.net
Programming, Web design, development & hosting.
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 07-01-2007, 4:12 PM   #5
Grytpype-Thynne
 
Grytpype-Thynne's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Help please for newbie

In article <i38livskgpfs9n0lrg4teku13hlo5vr1rv@4ax.com>,
ian@WINDOZEdigiserv.net says...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Whilst lounging around on Fri, 1 Aug 2003 18:11:31 +0100,
> Grytpype-Thynne <geraldIDONTWANTSPAMbramwell@hotmail.com> amazingly
> managed to produce the following with their Etch-A-Sketch:
>
> > Thanks Ian,
> >
> > Could you possibly point me in the direction of more info on this
> > or somewhere I can get a script, as I have not yet started on php.

>
>
> Gerald,
>
> Have a look on http://www.php.net/ _the_ best reference you'll find
> =)
>
> I'll explain my point to clarify anyway:
>
>
> $PHP_SELF was / is fine if register_globals are enabled.. but this
> opens up security concerns as no checks are done to see if the data
> has come from say, a GET URL (foo.com?bar=bleh) or if from a POST
> method in a form.. or from a cookie, session var etc etc, so as you
> can see, this is somewhat insecure (or could be). Defining it as
> $_SERVER['PHP_SELF'] means that if I used foo.com?bar=php_self it'd
> fail, as that would only be available from $_GET['php_self'].
>
> You can find more indepth explanations on this again, on php.net is
> you doa search for "register_globals" and check out the security
> comments etc about it =)
>
> Also.. create a .php file with just:
>
>
> <?php phpinfo(); ?>
>
>
> Access it via a URL as you would normally, and it'll display a load
> of info regarding the server and PHP install. If you scroll down to
> the bottom of the page, you'll see lots more $_SERVER[] vars too, to
> which you can use in scripts too. As phpinfo() displays the output of
> such vars, you can see as to what each would contain too, to help you
> know of that's the one you want to use etc etc etc.
>
>
> HTH.
>
>

Thanks again, only a month ago I did not have access to php on the host
but thanks to someone donating hosting to us I have found there are lots
of things I can use. By the way before I started the site for Animals in
Distress I didn't know anything about html.

Gerald
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Featured Websites
Free Space
Free Space
Free Space Free Space
Reply
Tags: ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Newbie needs help tom watson HTML 1 07-01-2007 1:24 PM
Newbie needs help Dave Patton GPS 6 06-25-2007 11:45 PM
Newbie needs help please Stingray Graphics in general 0 06-11-2007 7:19 PM
Newbie needs help! Kai Robinson Graphics in general 4 06-11-2007 7:09 PM
newbie jawsquip Ebay Technical Questions 8 05-30-2007 1:40 AM


Featured Websites




All times are GMT +1. The time now is 12:11 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98