.:.:.:.:RTTP.Mobile:.:.:.:.
[<--back] [Home][Pics][News][Ads][Events][Forum][Band][Search]
full forum | bottom

Web programming help

[views:1660][posts:8]
 _________________________________________________
[Dec 21,2005 2:11pm - the_taste_of_cigarettes ""]
how do I make it so there are a series of input fields that information can be typed into...like let's say something like:

Name
Date
Number

and then it puts it in a file and displays it as a list

like

John Q Gentry
November 5
612626126

Peter Quadro
November 5
2398182908

Jane Seymore
December 6
91991920090

kinda thing?


is this beyond HTML?
 ______________________________________
[Dec 21,2005 2:18pm - the_reverend ""]
that's beyond html.
you need php or something
does your server support php?
 ______________________________________
[Dec 21,2005 2:20pm - the_reverend ""]
make a file, call it phptest.php
inside the file, put
<?php phpinfo(); php?>

and then put it on your server. if you got to http://your url/phptest.php and it works, you are golden and php is loaded.
 _________________________________________
[Dec 21,2005 2:41pm - DreamingInExile ""]
you could just use <? phpinfo(); ?>

because typing "php" over and over and over again gets tedious
 ____________________________________
[Dec 21,2005 2:41pm - infoterror ""]
I would try a Fortran-based solution.
 __________________________________
[Dec 21,2005 2:45pm - litacore ""]
look at the screen real mean

scare into doing what you want
 ____________________________________________________
[Dec 21,2005 3:00pm - menstrual_sweatpants_disco ""]
infoterror said:I would try a Fortran-based solution.


haha
 _________________________________________
[Dec 21,2005 3:42pm - DreamingInExile ""]
infoterror said:I would try a Fortran-based solution.


hahaha, or you could try a Q-Basic-based solution
 __________________________________________
[Dec 21,2005 5:05pm - rumplestiltskin  ""]
If you have php...

code:

<?php

if(isset($_POST['submit']))

{

$name = $_POST['name'];
$name = $name."\n";
$date = $_POST['date'];
$date = $date."\n";
$number = $_POST['number'];
$number = $number."\n\n";

//Change the name of the textfile to whatever you need to. Put it in the same folder as this file.
$ourFileName = "textfile.txt";
$fh = fopen($ourFileName, 'a') or die("Can't open file");

fwrite($fh, $name.$date.$number);

fclose($fh);

echo "<table width=100% height=100% align=center><tr align=center valign=middle><td><font face=arial size=2><b>Entry added. <a href=javascript:history.back()>Go back.</a></b></font></td></tr></table>";

}
else
{
?>
<html>
<head>
<title>Enter some information</title>
</head>
<table width=100% height=100% align=center>
<tr valign=middle align=center>
<td>

<form method="post">
<table width=450 align=center style="border: 1px solid black;" cellspacing=0 border=0>
<tr align=center>
<td bgcolor="#EEEEEE" colspan=2><font face=arial size=2><b>Enter some information:</b></font></td>
</tr>
<td width=450>

<table align=center>
<tr align=center>
<td width=25 align=left><font face=arial size=2>Name:</font></td>
<td><input type="text" name="name"></td>
</tr>
<tr align=center>
<td width=25 align=left><font face=arial size=2>Date:</font></td>
<td><input type="text" name="date"></td>
</tr>
<tr align=center>
<td width=25 align=left><font face=arial size=2>Number:</font></td>
<td><input type="text" name="number"></td>
</tr>
<tr align=center>
<td colspan=2><input type="submit" name="submit" value="Enter Information"></td>
</tr>
</table>
</td>
</tr>
</table>
</form>

</td>
</tr>
</table>
</html>

<?
}
?>




...copy and save that as whatever.php, and create a blank text document and save it as textfile.txt. Upload them both to the same folder on your webserver, and chmod textfile.txt to 777.


Reply
[login ]
SPAM Filter: re-type this (values are 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E, or F)
message

top [Vers. 0.12][ 0.007 secs/8 queries][refresh][