Current location: Hot Scripts Forums » General Web Coding » HTML/XHTML/XML » Need help with a code


Need help with a code

Reply
  #1 (permalink)  
Old 10-25-09, 07:01 PM
athlyt17 athlyt17 is offline
Newbie Coder
 
Join Date: Oct 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Need help with a code

So what I want is this:

A code that creates a text field that the viewer can put text into, then a button underneath it to submit that text into another code and redirect to a new url.

Like this

Code:
Enter your user ID here
(Button would be here)

In this particular instance, I want this button to take the user's ID (which they entered) and put it into another code, the post that code as a reply to a forum.

Can someone help me with this please?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 10-26-09, 09:02 AM
therocket954's Avatar
therocket954 therocket954 is offline
Community Liaison
 
Join Date: Jul 2007
Location: Michigan, USA
Posts: 334
Thanks: 2
Thanked 8 Times in 8 Posts
What server side language are you using? (PHP / ASP / etc.) Once they submit the form, you'll need a server-side language to "handle" the data. For example, with PHP you could do:

page1.php:
PHP Code:

<form action="page2.php" method="post">
Username: <input type="text" name="user_name">
<
br />
<
input type="submit" value="Continue" />
</
form
page2.php:
PHP Code:

<?php
$user_name 
$_POST['user_name'];
?>
Your username was <?php echo $user_name?>.
__________________
--Eric Allison
Twitter: http://www.twitter.com/Eric_Allison
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 10-27-09, 06:05 AM
athlyt17 athlyt17 is offline
Newbie Coder
 
Join Date: Oct 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Maybe I should be more specific lol.

What I want is essentially a "train". (SPUKO.com - Get Myspace Mobster Adds, Mafia Wars Adds, Vampire Adds for reference)

where the viewer can enter their myspace user ID into the field, click submit, which will ultimately add their link to add them (along with a small image, otherwise their profile avatar) to the train.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 10-27-09, 09:22 AM
therocket954's Avatar
therocket954 therocket954 is offline
Community Liaison
 
Join Date: Jul 2007
Location: Michigan, USA
Posts: 334
Thanks: 2
Thanked 8 Times in 8 Posts
I avoid those games like the plague so I'm not too familiar with that particular situation But if you still use a server language to process the inputs, you can insert them into a list (or train?).... A database would also make things MUCH easier, especially if you want to build a list from multiple people's input.

Do a Google search for PHP / MySQL tutorials... that would be a good start.
__________________
--Eric Allison
Twitter: http://www.twitter.com/Eric_Allison
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 10-27-09, 05:57 PM
athlyt17 athlyt17 is offline
Newbie Coder
 
Join Date: Oct 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks a ton, I'll try that.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 10-27-09, 06:44 PM
ruteckycs's Avatar
ruteckycs ruteckycs is offline
Coding Addict
 
Join Date: Jul 2009
Posts: 377
Thanks: 6
Thanked 10 Times in 10 Posts
SOunds like you want a shoutbox.
__________________
This post was created with 100% recycled electrons.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks

Tags
button, field, form, input, text


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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Match code in link with code with one in file and extract line peuplarchie PHP 3 10-24-09 02:23 AM
Freeze columns in a table Rita Negi Script Requests 1 09-01-09 09:23 AM
OTO Redirect Code Placement Tony S. HTML/XHTML/XML 7 07-25-09 10:31 AM
Need captcha for html+php contact form sujata_ghosh PHP 6 03-22-09 04:46 PM
Explanation of Code... Please davidk19380 Perl 1 02-26-06 02:50 PM


All times are GMT -5. The time now is 06:40 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.