Click here to Skip to main content
15,890,512 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
AnswerRe: How to Compile a .PHP File Pin
Luc Pattyn14-May-11 11:09
sitebuilderLuc Pattyn14-May-11 11:09 
QuestionBLDMAKE ERROR: Can't find any RVCT installation. Pin
Raj Aryan 100110-May-11 5:03
Raj Aryan 100110-May-11 5:03 
AnswerRe: BLDMAKE ERROR: Can't find any RVCT installation. Pin
Uilleam23-Jul-11 15:17
Uilleam23-Jul-11 15:17 
QuestionExecuting PHP script without leaving the page Pin
AmbiguousName3-May-11 5:03
AmbiguousName3-May-11 5:03 
AnswerRe: Executing PHP script without leaving the page Pin
enhzflep3-May-11 5:09
enhzflep3-May-11 5:09 
AnswerRe: Executing PHP script without leaving the page PinPopular
enhzflep3-May-11 6:39
enhzflep3-May-11 6:39 
QuestionTo use or not to use Pin
astra.20123-May-11 0:10
astra.20123-May-11 0:10 
QuestionPHP Form help Pin
Dave McCool30-Apr-11 8:54
Dave McCool30-Apr-11 8:54 
Hi,

I have a form that I am creating for my website, and its for people to use if they find a butterfly or moth and cannot identify it. Basically what I want is for the user to fill in the form and if they have an image to send, select an image and send the message. Code I have:

<form action="mailer.php" method="post" name="form1" id="form1" style="margin:0px; font-family:Verdana, Arial, Helvetica, sans-serif;font-size:11px; width:300px;" onsubmit="MM_validateForm('from','','RisEmail','subject','','R','verif_box','','R','message','','R');return document.MM_returnValue"><br />
<br />
Your Name:<br /><br />
<input name="name" type="text" id="name" style="padding:2px; border:1px solid #CCCCCC; width:180px; height:14px; font-family:Verdana, Arial, Helvetica, sans-serif;font-size:11px;" value="<?php echo $_GET['name'];?>"/><br />
<br /><br />
<br /><br />
<br />
Your e-mail:<br /><br />
<input name="from" type="text" id="from" style="padding:2px; border:1px solid #CCCCCC; width:180px; height:14px; font-family:Verdana, Arial, Helvetica, sans-serif;font-size:11px;" value="<?php echo $_GET['from'];?>"/><br />
<br /><br />
<br /><br />
<br />
Stage:<br /><br />
<select name="stage"><br />
<option value="Caterpillar">Caterpillar</option><br />
<option value="Pupa">Pupa</option><br />
<option value="Cocoon">Cocoon</option><br />
<option value="Adult">Cocoon</option><br />
<option value="Leaf Mine">Leaf Mine</option><br />
<option value="Leaf Mine Vaccated">Leaf Mine (Vaccated)</option><br />
</select><br /><br />
         <br /><br />
         Method:<br /><br />
<select name="method"><br />
<option value="UV Light Trap">UV Light Trap</option><br />
<option value="MV Lamp">Mercury Vapour Lamp</option><br />
<option value="Tungsten Light">Tungsten Light</option><br />
<option value="Actinic Light">Actinic light</option><br />
<option value="Household Bulb">Household Bulb</option><br />
<option value="Camping Lamp">Camping Lamp</option><br />
<option value="Infrared">Infrared Light</option><br />
<option value="LED Lights">LED Lights</option><br />
<option value="Carlights">Car Headlights</option><br />
<option value="Lighted Window">Attracted to Lighted Window</option><br />
<option value="Streetlight">At street light</option><br />
<option value="Security light">At security light</option><br />
<option value="Torch">Found via torchlight</option><br />
<option value="Dead Road">Found dead on road</option><br />
<option value="Spider Web">Found in Spider Web</option><br />
<option value="Nighttime">Night time observation</option><br />
<option value="Daytime">Daytime Observation</option><br />
<option value="Hibernating">In Hibernation</option><br />
<option value="Beaten">Beaten from vegetation</option><br />
<option value="Dusking">Found while dusking</option><br />
<option value="Netted">Netted</option><br />
<option value="Birdseed">Found in Bird Seed Bag</option><br />
<option value="Fruit/Veg">Found inside a fruit or vegetable</option><br />
<option value="Pheromone">Attracted via pheramone lures</option><br />
<option value="Feeding signs">Feeding signs</option><br />
<option value="Fish">Found inside a fish</option><br />
<option value="Indoors">Found Indoors</option><br />
<option value="Tree trunk">Found on Tree Trunk</option><br />
<option value="Wall">Found on Wall</option><br />
<option value="Other">Other Method</option><br />
</select><br /><br />
         <br /><br />
         Country:<br /><br />
<input name="country" type="text" id="country" style="padding:2px; border:1px solid #CCCCCC; width:180px; height:14px;font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;" value="<?php echo $_GET['subject'];?>"/><br />
         <br /><br />
         <br /><br />
         Town/City:<br /><br />
<input name="town/city" type="text" id="town/city" style="padding:2px; border:1px solid #CCCCCC; width:180px; height:14px;font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;" value="<?php echo $_GET['subject'];?>"/><br />
         <br /><br />
         <br /><br />
         Habitat:<br /><br />
<input name="Habitat" type="text" id="Habitat" style="padding:2px; border:1px solid #CCCCCC; width:180px; height:14px;font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;" value="<?php echo $_GET['subject'];?>"/><br />
         <br /><br />
         <br /><br />
         Habitat Information:<br /><br />
         <br /><br />
<textarea name="Habitat Information" cols="6" rows="5" id="HabitatInformation" style="padding:2px; border:1px solid #CCCCCC; width:300px; height:100px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;"><?php echo $_GET['message'];?></textarea> <br />
<br />
         <br /><br />
         <br /><br />
If you have an image, select it here (JPEG image, max 5MB):<br />
<input type="file" name="datafile" size="40"><br /><br />
<br /><br />
<br />
Type verification image:<br /><br />
<input name="verif_box" type="text" id="verif_box" style="padding:2px; border:1px solid #CCCCCC; width:180px; height:14px;font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;"/><br />
<img src="verificationimage.php?<?php echo rand(0,9999);?>" alt="verification image, type it in the box" width="50" height="24" align="absbottom" /><br /><br />
<br /><br />
<br />
<!-- if the variable "wrong_code" is sent from previous page then display the error field --><br />
<?php if(isset($_GET['wrong_code'])){?><br />
<div style="border:1px solid #990000; background-color:#D70000; color:#FFFFFF; padding:4px; padding-left:6px;width:295px;">Wrong verification code</div><br /> <br />
<?php ;}?><br />
<br />
            Additional Information:<br /><br />
            <br /><br />
<textarea name="message" cols="6" rows="5" id="message" style="padding:2px; border:1px solid #CCCCCC; width:300px; height:100px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px;"><?php echo $_GET['message'];?></textarea> <br />
<br />
<input name="Submit" type="submit" style="margin-top:10px; display:block; border:1px solid #000000; width:100px; height:20px;font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; padding-left:2px; padding-right:2px; padding-top:0px; padding-bottom:2px; line-height:14px; background-color:#EFEFEF;" value="Send Message"/><br />
</form>


What I want is a way to make sure the user has filled in all fields (except the file input field) before sending, to make sure when they press send message, it sends with information on it. Second I want when the user uses the file input to upload a file, it has to be a JPEG with a max size of 5MB. Anyone know how I would do this?
In the end we're all just the same

AnswerRe: PHP Form help Pin
Peter_in_27801-May-11 4:59
professionalPeter_in_27801-May-11 4:59 
GeneralRe: PHP Form help Pin
Dave McCool1-May-11 5:08
Dave McCool1-May-11 5:08 
Questionthe apache service doesn't start Pin
Farhaneh25-Apr-11 20:10
Farhaneh25-Apr-11 20:10 
AnswerRe: the apache service doesn't start Pin
Gerben Jongerius25-Apr-11 20:41
Gerben Jongerius25-Apr-11 20:41 
QuestionAn XML printer thingy Pin
freeluna22-Apr-11 14:23
professionalfreeluna22-Apr-11 14:23 
QuestionClosing a window with button?? Pin
AmbiguousName21-Apr-11 6:00
AmbiguousName21-Apr-11 6:00 
AnswerRe: Closing a window with button?? Pin
Ali Al Omairi(Abu AlHassan)21-Apr-11 15:21
professionalAli Al Omairi(Abu AlHassan)21-Apr-11 15:21 
AnswerRe: Closing a window with button?? Pin
enhzflep3-May-11 6:53
enhzflep3-May-11 6:53 
QuestionHow to open Perl files / Perl Module files in Design Layout Pin
sr15920-Apr-11 19:04
sr15920-Apr-11 19:04 
QuestionFuzzy C Means in PHP Code and My SQL Database, Please Help! Pin
edrianhadinatazz18-Apr-11 19:35
edrianhadinatazz18-Apr-11 19:35 
AnswerRe: Fuzzy C Means in PHP Code and My SQL Database, Please Help! Pin
edrianhadinatazz18-Apr-11 19:38
edrianhadinatazz18-Apr-11 19:38 
GeneralRe: Fuzzy C Means in PHP Code and My SQL Database, Please Help! Pin
User 171649218-Apr-11 22:07
professionalUser 171649218-Apr-11 22:07 
GeneralRe: Fuzzy C Means in PHP Code and My SQL Database, Please Help! Pin
Smithers-Jones19-Apr-11 1:53
Smithers-Jones19-Apr-11 1:53 
GeneralRe: Fuzzy C Means in PHP Code and My SQL Database, Please Help! Pin
edrianhadinatazz28-Apr-11 17:31
edrianhadinatazz28-Apr-11 17:31 
Questioncheckboxes from hell Pin
Joan M13-Apr-11 4:24
professionalJoan M13-Apr-11 4:24 
AnswerRe: checkboxes from hell Pin
Graham Breach13-Apr-11 5:32
Graham Breach13-Apr-11 5:32 
GeneralRe: checkboxes from hell Pin
Joan M13-Apr-11 5:48
professionalJoan M13-Apr-11 5:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.