Okay, so I'm very new to php, im only familiar with java and html. I want to create a simple form that will send the data to me via email or save to a file. whiever is easiest. The data can be kept public doesn't matter. Here is my attempt: HMTL: <form name="carpool" action="submit.php" method="post"> <input name="day" type="text" value="Enter your name here" size="18" maxlength="100"><p></p> Check the days that you are able to drive <b>TO</b> rowing.<p> <LABEL><INPUT TYPE="checkbox" NAME="day" VALUE="Monday"> Monday</LABEL> <LABEL><INPUT TYPE="checkbox" NAME="day" VALUE="Tuesday"> Tuesday</LABEL> <LABEL><INPUT TYPE="checkbox" NAME="day" VALUE="Thursday">Thursday</LABEL> <LABEL><INPUT TYPE="checkbox" NAME="day" VALUE="Friday">Friday</LABEL> <LABEL><INPUT TYPE="checkbox" NAME="day" VALUE="Saturday">Saturday</LABEL> </p> Check the days that you are able to drive <b>FROM</b> rowing.<p> <LABEL><INPUT TYPE="checkbox" NAME="day" VALUE="Monday"> Monday</LABEL> <LABEL><INPUT TYPE="checkbox" NAME="day" VALUE="Tuesday"> Tuesday</LABEL> <LABEL><INPUT TYPE="checkbox" NAME="day" VALUE="Thursday">Thursday</LABEL> <LABEL><INPUT TYPE="checkbox" NAME="day" VALUE="Friday">Friday</LABEL> <LABEL><INPUT TYPE="checkbox" NAME="day" VALUE="Saturday">Saturday</LABEL> </p> <input type="submit" name="submit" value="Submit" /> </FORM> Code (markup): Here is the other phile: <? $filename = 'carpool.txt'; $day = $_POST['day']; if (is_writable($filename)) { if (!$handle = fopen($filename, 'a')) { exit; } if (fwrite($handle, $day) === FALSE) { exit; } fclose($handle); } ?> Code (markup): I really don't have any clue how to use this. I just have my thre files sitting in a folder and When I try to submit on my form, it asks me if I want to download my submit.php file. Not exactly what I'm going for. thanks for reading and extra thanks if you help. my AIM is roarthing2112 if it's easier there.
Sounds like you don't have php installed. Your server doesn't know how to run a .php file. You should fix that first.
yes, thats the problem, you should ask your host to install php. If there is a php interpretor, it shouldn't tell you to download some files which ends with .php
Well I really don't know anything about php, I basically pulled this code from a website and edited the variables until they looked right to me. Should what I posted execute correctly?
you can't run php scripts just like that on your pc download and install XAMPP, put your file in htdocs folder and acces your php file like this: http://localhost/(php file name goes here)
if you dont know how does it look like then .. you can open it in Dreamweaver or attache here will upload some here or you can try some free hosting service to test it.
or you can try a simple with out xampp just install the apache server and see at www.apache.com and do a info list on php
Okay, I got all the files up. hbra-ahs.your-websites.net/ username: carpool password: myspace518 a "?" appears next to the php file so I think it may not be supported. Any idears?
i think its supported there... and it showing blank that may be there is an error in the file. ? is something with document symbol.
its working fine.... http://www.cellfreaks.com/Roar.php http://www.cellfreaks.com/carpool.txt make sure to give write permission to txt file.