Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > PHP

Reply
 
LinkBack Thread Tools
Old July 20th, 2009, 04:30 AM   #1
WebForumz Member
 

Join Date: Apr 2008
Location: USA
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 galahad3 is on a distinguished road
PHP calendar not updating date of event

Hi, have a strange issue with a custom PHP calendar not updating the date of an event, although other fields are updated without any problems. because of this, users cannot change the day / date the event appears on in the calendar after they've posted the event. Any ideas?

The code in my event_edit.php is as follows:

<?php
$event=mysql_fetch_assoc(mysql_query("SELECT id,project,site,name,description,DATE_FORMAT(date, '%d/%m/%Y') AS date,days FROM events WHERE id=".$_REQUEST['e']));
$sites=mysql_query("SELECT id,CONCAT(name,' (',number,')') AS name FROM sites WHERE project=".$event['project']." ORDER BY name");
?> <div id="Content-Header">Edit Event - <?php echo $event['name']; ?></div>
<div id="Content-Body">
<link rel="stylesheet" href="/inc/css/light.datepicker.css" type="text/css" media="screen">
<script src="/inc/js/jquery-latest.js"></script>
<script src="/inc/js/jquery.datePicker.js"></script>
<script>
$(document).ready(function(){ $('#idDate').datepicker(); });
</script>
<form action="./" method="post" onsubmit="return chkFormSite();">
<table>
<tr><th><label for="idName">Event Title</label></th></tr><tr><td><input id="idName" name="name" type="text" value="<?php echo $event['name']; ?>" /></td></tr>
<tr><th><label for="idDate">Event Date</label></th></tr><tr><td><input id="idDate" name="date" type="text" value="<?php echo $event['date']; ?>" /></td></tr>
<tr><th><label for="idDays">Event Duration (days)</label></th></tr><tr><td><input id="idDays" name="days" type="text" value="<?php echo $event['days']; ?>" /></td></tr>
<tr><th><label for="idClient">Site Name</label></th></tr><tr><td><select id="idSite" name="site"><option value="0"></option><?php while($site=mysql_fetch_array($sites)) { echo "<option value=\"{$site['id']}\""; if(isset($event['site']) AND $event['site']==$site['id']) echo " selected=\"selected\""; echo ">{$site['name']}</option>"; } ?></select></td></tr>
<tr><th style="font-weight:normal;"><label for="idDesc">Description</label></th></tr><tr><td><textarea id="idDesc" name="desc" cols="5" rows="4"><?php echo $event['description']; ?></textarea></td></tr>
</table>
<input type="submit" name="update" value="Update Event" /> or <a href="../">Cancel</a> or <a href="../delete/" onclick="if(!confirm('Are you sure want to delete this event? There is no undo.')) return false;">Delete</a>
</form>

</div>
galahad3 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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
Date function, display last date two months back. VegaLA Classic ASP 2 June 9th, 2009 04:42 PM
Outlook Calendar event that's submits through php form ckling PHP 0 July 10th, 2008 01:22 PM
"Self-updating" Calendar - How? Scotalia Your Design and Layout 4 May 11th, 2008 09:03 AM
Changing date format in date picker AdRock JavaScript 1 August 1st, 2006 01:16 PM
EVENT: SPARK - Flash Event Flasher Flash and ActionScript 0 November 15th, 2005 06:08 AM


Search Engine Optimization by vBSEO 3.2.0 RC8