Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 07-09-2005, 04:42 PM PHP Help
kathie's Avatar
Junior Talker

Posts: 4
Trades: 0
Hi!

I am really stuck on PHP problem...having never used it before my knowledge is extreemly limited - however its working ok with the exception of one field that i need to transfer to a piece of PHP script...


This is the user input field on the form
<input type="text" name="amount" value size="6" maxlength="50">


This is from the php script file.
$amount = echo("amount_input"); (need to get the amount entered on form to appear here)

So that it can be inserted as the variable here...
<input type=hidden name="AMOUNT" value="<?=$amount?>">

I hope this makes some sense..

I would appreciate any help as this has been driving me mad for ages and has become an urgent problem!

Thanks

Ka:-)
kathie is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-09-2005, 05:22 PM
Super Talker

Posts: 116
Trades: 0
base ur script off of this:

input.html

HTML Code:
<form action="script.php" name="number" method="post">
<input type="text" name="amount" value size="6" maxlength="50"><br>
<input type="submit" value="submit">
</form>
script.php

PHP Code:
<?php
$number
=$_POST(amount);
$amount=echo($number);
?>
somefile.html

HTML Code:
<form action="script.php" name="other" method="post">
<input type="hidden" name="AMOUNT" value="<?$amount?>">
</form>
I just wrote that on the spot, so it may have bugs. If anyone sees any, please make the appropriate changes.

Hope that helps
__________________


Please login or register to view this content. Registration is FREE

nasaboy007 is offline
Reply With Quote
View Public Profile Visit nasaboy007's homepage!
 
Old 07-09-2005, 05:53 PM
kathie's Avatar
Junior Talker

Posts: 4
Trades: 0
Thank You - got it working at last!!!


"It should actually be $_POST['amount'].

You're also missing something from the input field it should be as follows: <input type="text" name="amount" value="" size="6" maxlength="50" />"

Thanks for the help!
__________________

Please login or register to view this content. Registration is FREE
Learn and Explore!
kathie is offline
Reply With Quote
View Public Profile
 
Old 07-09-2005, 06:53 PM
Super Talker

Posts: 116
Trades: 0
np

im a newb at php too and i just learned $_POST lol

as for the html form input... i just copied and pasted ur input code so its not my fault
__________________


Please login or register to view this content. Registration is FREE

nasaboy007 is offline
Reply With Quote
View Public Profile Visit nasaboy007's homepage!
 
Old 07-09-2005, 07:54 PM
kathie's Avatar
Junior Talker

Posts: 4
Trades: 0
should have made that quote clear - that was a message from someone else correcting my code LOL!!!

Thanks again!

Must buy a good book on PHP!
__________________

Please login or register to view this content. Registration is FREE
Learn and Explore!
kathie is offline
Reply With Quote
View Public Profile
 
Old 07-10-2005, 06:55 AM
onlyplace4's Avatar
Extreme Talker

Posts: 159
Location: Skegness, Lincolnshire, England
Trades: 0
Why bother with a book - go to http://www.php.net/ and simply download their excellent documentation. Of course, working from a manual is not as easy as being told what to do by a book, but it by far and away the best way to learn as you experiment until you get it right! Thats the way I learned, though, of course, you never really stop learning, and I am learning something new everyday!

If you want a great manual on your desktop go to http://www.php.net/download-docs.php and select the English CHM (first line of downloads - far right). I use that, and apart from looking up a few specialist items from time to time, I use nothing else.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
onlyplace4 is offline
Reply With Quote
View Public Profile Visit onlyplace4's homepage!
 
Old 07-10-2005, 01:57 PM
kathie's Avatar
Junior Talker

Posts: 4
Trades: 0
Thanks will check them out - I find I learn more by experiemening with code design etc...too.
__________________

Please login or register to view this content. Registration is FREE
Learn and Explore!
kathie is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PHP Help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.04706 seconds with 12 queries