Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 10-12-2007, 03:37 PM   #1 (permalink)
Yek
 
T.F's Resident Cool Guy...

Join Date: Aug 2006

Posts: 1,625

Yek is on a distinguished road

Send a message via AIM to Yek Send a message via MSN to Yek Send a message via Yahoo to Yek Send a message via Skype™ to Yek
Default PHP Script

Hi, im hoping someone can help me out.

I need a script that contains a textbox and submit button, the script takes the info entered into the textbox and outputs it in a html page. Im hoping this wont take a good web designer too long and i would be very greatful (iv searched through google and was suprised not to find anything!)

THANK YOU!
Yek is offline  
Old 10-13-2007, 01:43 PM   #2 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,683

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: PHP Script

I can help.

What exactly are you looking to do? Are you trying to make a comments page?
__________________

Need website help? PM me!
CrazeD is offline  
Old 10-14-2007, 08:41 AM   #3 (permalink)
jay_bo's Avatar
 
Ultra Techie

Join Date: Jul 2006

Posts: 898

jay_bo is on a distinguished road

Default Re: PHP Script

i think he means like a shout out box? where people input a message and it appears above
__________________
jay_bo is offline  
Old 10-14-2007, 02:46 PM   #4 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,683

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: PHP Script

Well for comments or a shout box you'll want to have a MySQL database. Do you have access to this?
__________________

Need website help? PM me!
CrazeD is offline  
Old 10-19-2007, 12:12 PM   #5 (permalink)
Yek
 
T.F's Resident Cool Guy...

Join Date: Aug 2006

Posts: 1,625

Yek is on a distinguished road

Send a message via AIM to Yek Send a message via MSN to Yek Send a message via Yahoo to Yek Send a message via Skype™ to Yek
Default Re: PHP Script

Yes (but i dont think it would be needed)

The security of this script is n/a.

i need a form that outputs the data entered into it on another page (prefrebly in a text area) and thats it just input and output
Yek is offline  
Old 10-19-2007, 03:42 PM   #6 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,683

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: PHP Script

a MySQL database will be needed. The PHP script will write the info that you entered into the MySQL database, and then the other page will read it.

Unless you only want the text to be on the page temporarily, a MySQL database is the easiest way.
__________________

Need website help? PM me!
CrazeD is offline  
Old 10-23-2007, 02:19 AM   #7 (permalink)
 
Newb Techie

Join Date: Sep 2004

Posts: 4

sl1pkn0t

Default Re: PHP Script

Here's something that I wrote in a minute or so but I am pretty hammered at the moment but it works just fine...Don't know if it's what you're asking for but here you go.

test.php
PHP Code:
<?php
    
if ($_POST['var']) {
    
header("Location: test2.php?text={$_POST['var']}");
}
?>
<html>
<body>
<form method='POST' action='test.php'>
<textarea rows='5' name='var' >
</textarea>

<p>
<input type='submit' name="submit"  value='submit'>
</form>
</body>
</html>
test2.php

PHP Code:
<?php
    
if ($_GET['text']) {
        echo(
$_GET['text']);
}
?>
Like I said I wasn't quite clear what you were asking for but here you go
sl1pkn0t is offline  
Old 10-27-2007, 05:42 AM   #8 (permalink)
Yek
 
T.F's Resident Cool Guy...

Join Date: Aug 2006

Posts: 1,625

Yek is on a distinguished road

Send a message via AIM to Yek Send a message via MSN to Yek Send a message via Yahoo to Yek Send a message via Skype™ to Yek
Default Re: PHP Script

Thanks, im getting an error however:

Warning: Header may not contain more than a single header, new line detected. in /home/___________/test.php on line 3

Any ideas?
Thanks alot.
Yek is offline  
Old 10-29-2007, 06:35 PM   #9 (permalink)
CrazeD's Avatar
 
Wizard Techie

Join Date: Feb 2006

Location: Maine

Posts: 3,683

CrazeD will become famous soon enough

Send a message via AIM to CrazeD Send a message via MSN to CrazeD
Default Re: PHP Script

So that's what you want?

Try this:

form.php
PHP Code:
<form action="display.php" method="post">
<
textarea cols="20" rows="5" wrap name="text"></textarea>
<
br />
<
input type="submit" name="submit" value="Submit" />
</
form
display.php
PHP Code:
<?php
if (isset ($_POST['submit'])) {
    print 
$_POST['text'];
}
?>
It will only stay there until you close the browser, though, so I'm not sure of what use that is to you.
__________________

Need website help? PM me!
CrazeD is offline  
 
Closed Thread

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Php links mademokid Programming Discussions 2 07-12-2007 10:18 AM
New Site Project - Flash + PHP + MySQL + CSS theone_trent Web Graphics, Design, Digital Images 2 06-30-2007 01:12 PM
Need a good captcha generating php script surut Windows Operating Systems and Software 1 05-26-2007 09:23 AM
PHP captcha script needed iorgus Programming Discussions 2 05-20-2007 01:33 PM
Remote file access w/ IP + PHP? thejeremy Programming Discussions 2 04-04-2007 05:24 PM