Everything posted by morgano
-
Probably really simple.... but
Add something like this to the form (you'll need to complete the code): echo '<select name="image">'; $images = scandir($upload_dir); foreach ($images as $image) { echo '<option value="'.$image.'">'.$image.'</option>'; } echo '</select>'; Anyway hope this helps
- User form, with images
-
ONLINE BOOKING/DIARY SYSTEM
Hi Nik in all honesty probably not; something like this is quite technical and will require a good knowledge of PHP. The only integration with outlook would be email notification of appointments. However if you're focusing on creating a booking system then there's no point bothering with outlook at all. All the appointments should be viewable by a backend accessible by staff only. This would be much more appropriate and professional. If you are looking for someone to do this work then I can be of assistance. I'll send you a PM with further information. Regards James
-
FCK or MCE?
Prefer tinyMCE, just been using it longer and can therefore customise it to my liking better.
-
Another PHP Form query!
If your getting the email but its going to the error page try this... Replace this: With this:
-
Help with php form to add / delete images
You'll need to do the following... 1. Get current order number of the file your deleting 2. Delete the file 3. Loop through all remaining files and check the order number of each 4. If order number is greater than the file you deleted you need to decrease the order number by 1 Cant do the code for you right now but hope it helps you get started.
-
Required field validation not working
if ($message == '') { print "You have not entered any message."; } else { if ($name == '') { print "You have not entered a name, please go back and try again."; } else { if ($from == '') { print "You have not entered an email address, please go back and try again."; } else { $send = mail($to, $subject, $body, $headers); $send2 = mail($from, $subject2, $autoreply, $headers2); if ($send) { header("Location: [url="http://www.website.com/sent.php"%3b%29;"]http://www.website.com/sent.php");[/url] } else { print "There was an error sending your request. Please try contacting us direct at my@email.com"; } } } Above is your current code, as you can see with proper formatting it doesn't contain enough "}" closing brackets. I think the code below should fix your problem. if ($message == '') { print "You have not entered any message."; } else { if ($name == '') { print "You have not entered a name, please go back and try again."; } else { if ($from == '') { print "You have not entered an email address, please go back and try again."; } else { $send = mail($to, $subject, $body, $headers); $send2 = mail($from, $subject2, $autoreply, $headers2); if ($send) { header("Location: http://www.website.com/sent.php"); } else { print "There was an error sending your request. Please try contacting us direct at my@email.com"; } } } } Anyway, you're new to this so I'd recommend you always format your code properly it makes reading easier and allows for you to spot small mistakes better. You could always use if (!empty($message)) { instead of if ($message == '') { Anyway keep coding and have fun
-
Help with an idea
Add each image to the database with the date in unix time format... Then do something like below: //users search $date=$_GET['date']; $date_day = date('d', $date); // Seperate the day into a variable $date_month = date('m', $date); // Seperate the month into a variable $date_year = date('Y', $date); // Seperate the year into a variable $query="SELECT date, filename FROM images ". "ORDER BY date ASC"; $result=mysql_query($query); $num=mysql_num_rows($result); if ($num != '0') { while ($row = mysql_fetch_assoc($result)) { $image_date_day = date('d', $row['date']); // Seperate the day into a variable $image_date_month = date('m', $row['date']); // Seperate the month into a variable $image_date_year = date('Y', $row['date']); // Seperate the year into a variable if ($date_year == $image_date_year) { if ($date_month == $image_date_month) { if ($date_day == $image_date_day) { //OUTPUT IMAGE HERE //OR //PUT IMAGE INTO AN ARRAY AND OUTPUT TOGETHER LATER } } } } } I hope that helps....