Question

Need JavaScrpt Code Sample to Validate Form Date Field

Asked by: pzozulka

Greetings,

I have a web form that is emailed to us once it is filled out. It also has a date field, that needs to be validated somehow to not allow input of any days within 3 days from now. So the min. date field acceptable should be 10/06/08 (3 days from now). I was pointed to a great link below, but unfortunately I have no experience with AJAX or JavaScript for that matter. So I have no idea how to implement this. I downloaded the AJAX library with all the .js files, and uploaded them to my server. The only problem is to implement it. The web form code is posted below. If anyone can provide a code sample to implement this that would be great.

Any other ways (code samples) to validate my date field are also welcome.

http://www.frequency-decoder.com/2006/10/02/unobtrusive-date-picker-widgit-update/

<!DOCTYPE html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Contact domain Court Reporters</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<SCRIPT language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
 
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
 
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
 
}
//-->
</SCRIPT>
<STYLE type="text/css">
<!--
 
.style4 {font-family: Arial, Helvetica, sans-serif}
 
a:link {
 
        color: #FFFFFF;
 
}
 
a:visited {
 
        color: #FFFFFF;
 
}
.style7 {color: #000000}
.style9 {
	color: #FFFFFF;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
}
.style13 {font-size: 26px}
.style14 {
	color: #999999;
	font-size: 14;
	font-style: italic;
}
.style15 {font-size: 10px}
 
-->
</STYLE>
 
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style17 {color: #CC3333}
-->
</style>
</HEAD>
 
<BODY bgcolor="3e5368" text="#FFFFFF">
        <table width="756" border="0">
  <tr>
    <td width="292"><img src="../images/logo.gif" width="149" height="56"></td>
    <td width="454"></td>
  </tr>
</table>
 
 
        <table width="955" height="844" border="0" cellpadding="10">
          <tr>
            <td width="183" valign="top"><p><font color="#FFFFFF" size="2" face="Arial, Helvetica, sans-serif"><a href="../">www.domain.com</a></font></p>
                <table width="170" border="1" bordercolor="#DBD9CD" bgcolor="#DBD9CD">
                  <tr>
                    <td width="130" bordercolor="#878884" bgcolor="#8AABC9"><span class="style4"><a href="client_home.html">Home</a></span> </td>
                  </tr>
                  <tr>
                    <td bordercolor="#878884" bgcolor="#8AABC9"><span class="style4"><a href="services.html">Services</a></span> </td>
                  </tr>
                  <tr>
                    <td bordercolor="#878884" bgcolor="#8AABC9"><span class="style4"><a href="support.html">Support</a></span> </td>
                  </tr>
                  <tr>
                    <td bordercolor="#878884" bgcolor="#8AABC9"><span class="style4"><a href="training.html">Training</a></span> </td>
                  </tr>
                  <tr>
                    <td bordercolor="#878884" bgcolor="#8AABC9"><span class="style4"><a href="contact.html">Contact</a></span> </td>
                  </tr>
                  <tr>
                    <td bordercolor="#878884" bgcolor="#8AABC9"><span class="style4"><a href="../repository">On-Site Repository</a></span> </td>
                  </tr>
                  <tr>
                    <td bordercolor="#878884" bgcolor="#8AABC9"><span class="style4"><a href="http://www.domaintt.com">Trial Technology </a></span> </td>
                  </tr>
                  <tr>
                    <td bordercolor="#878884" bgcolor="#8AABC9"><span class="style4"><a href="https://web.domain.com/attorney/">domainWeb<font face="Symbol">&#0153;</font> </a></span> </td>
                  </tr>
                  <tr>
                    <td bordercolor="#878884" bgcolor="#8AABC9"><span class="style4"><a href="http://www.webdocument.net/domainreporting">domainE-Repository<font face="Symbol">&#0153;</font> </a></span></td>
                  </tr>
                </table>
              <p>&nbsp;</p></td>
            <td height="324" align="center">
            
            <p class="style9"><span class="style13">Schedule a Deposition</span></p>
            <p class="style9"><a href="../web/attorney.htm">Already have a <strong>domainWeb&#8482;</strong> account?</a></p>
            <p class="style9">OR</p>
            <p class="style9">Fill out the form below:</p>
            <table width="813" height="1094" border="0" align="center" background="../Images/sheduledepo1100.gif">
              <tr>
                <td width="807" height="1090" align="left" valign="top"><table width="804" height="1031" border="0">
                  <tr>
                    <td height="974" colspan="2" valign="top">
                    
                    <form action="scheduleform-process.php" method="post">
                      <p align="center">&nbsp;</p>
                      <table width="764" height="926" border="0" align="center" cellpadding="1">
                        <tr>
                          <td width="249"><span class="style9">Request Type:</span></td>
                          <td width="497"><span class="style9">
                      <select name="RqstType" size="1" class="style7" id="RqstType">
                              <option selected>New</option>
                              <option>Change</option>
                              <option>Cancellation</option>
                              <option>Confirmation</option>
                          </select>
                          </span></td>
                        </tr>
                        <tr>
                          <td class="style9">Deposition Date:</td>
                          <td><span id="sprytextfield1">
                          <input name="JobDate" type="text" class="style7" id="JobDate" size="40">
                          <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span> (mm/dd/yyyy) </td>
                        </tr>
                        <tr>
                          <td class="style9">&nbsp;</td>
                          <td><span class="style17">Deposition date must be at least 3 days from today.</span></td>
                        </tr>
                        <tr>
                          <td class="style9">Time Zone:</td>
                          <td><span class="style9">
                            <select name="TimeZone" size="1" class="style7" id="TimeZone">
                              <option selected>Pacific Time (PST)</option>
                              <option>Mountain Time (MST)</option>
                              <option>Central Time (CST)</option>
                              <option>Eastern Time (EST)</option>
                            </select>
                          </span></td>
                        </tr>
                        <tr>
                          <td class="style9">Deposition Time:</td>
                          <td><span class="style9">
Start Time:
    <span id="sprytextfield7">
    <input name="StartTime" type="text" class="style7" id="StartTime" size="21">
    <span class="textfieldRequiredMsg"></span></span>
End Time:
<input name="EndTime" type="text" class="style7" id="EndTime" size="21">
                          </span></td>
                        </tr>
                        <tr>
                          <td class="style9">Ordered By:</td>
                          <td valign="middle" class="style9">First Name:
                            <span id="sprytextfield5">
                            <input name="OrderedByFirstName" type="text" class="style7" id="OrderedByFirstName">
                            <span class="textfieldRequiredMsg"></span>                            </span> 
                            Last Name: 
                            <span id="sprytextfield6">
                            <input name="OrderedByLastName" type="text" class="style7" id="OrderedByLastName">
                            <span class="textfieldRequiredMsg"></span></span></td>
                        </tr>
                        <tr>
                          <td class="style9">Attorney:</td>
                          <td valign="middle" class="style9">First Name:
                            <input name="ContactFirstName" type="text" class="style7" id="ContactFirstName"> 
                          Last Name: 
                          <input name="ContactLastName" type="text" class="style7" id="ContactLastName">                          </td>
                        </tr>
                        <tr>
                          <td class="style9">Phone: </td>
                          <td valign="middle"><input name="ContactPhone" type="text" class="style7" id="ContactPhone" size="66"></td>
                        </tr>
                        <tr>
                          <td class="style9">Mobile: <span class="style15">(Required for after-hour depositions)</span></td>
                          <td valign="middle"><input name="ContactMobile" type="text" class="style7" id="ContactMobile" size="66"></td>
                        </tr>
                        <tr>
                          <td class="style9">Fax Number: <span class="style15">(to send confirmation)</span></td>
                          <td valign="middle"><span id="sprytextfield8">
                          <input name="ContactFax" type="text" class="style7" id="ContactFax" size="66">
                          <span class="textfieldRequiredMsg"></span></span></td>
                        </tr>
                        <tr>
                          <td class="style9">E-mail: <span class="style15">(to send confirmation)</span></td>
                          <td valign="middle"><span id="sprytextfield2">
                          <input name="ContactEmail" type="text" class="style7" id="ContactEmail" size="50">
                          <span class="textfieldRequiredMsg"></span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
                        </tr>
                        <tr>
                          <td class="style9">Firm Name:</td>
                          <td valign="middle"><span id="sprytextfield9">
                            <input name="FirmName" type="text" class="style7" id="FirmName" size="66">
                          <span class="textfieldRequiredMsg"></span></span></td>
                        </tr>
                        <tr>
                          <td><span class="style9">Deposition Location:</span></td>
                          <td><table width="426" border="0">
                            <tr>
                              <td width="161"><span class="style9">Location Name: </span></td>
                              <td width="255"><span id="sprytextfield10">
                                <input name="LocName" type="text" class="style7" id="LocName" size="40">
                              <span class="textfieldRequiredMsg"></span></span></td>
                            </tr>
                            <tr>
                              <td><span class="style9">Address:</span></td>
                              <td><span class="style9">
                                <input name="LocAddress" type="text" class="style7" id="LocAddress" size="40">
                              </span></td>
                            </tr>
                            <tr>
                              <td><span class="style9">City:</span></td>
                              <td><span class="style9">
                                <input name="LocCity" type="text" class="style7" id="LocCity" size="40">
                              </span></td>
                            </tr>
                            <tr>
                              <td><span class="style9">State: </span></td>
                              <td><span class="style9">
                                <input name="LocState" type="text" class="style7" id="LocState" size="40">
                              </span></td>
                            </tr>
                            <tr>
                              <td class="style9">Zip:</td>
                              <td><input name="LocPostCode" type="text" class="style7" id="LocPostCode" size="40"></td>
                            </tr>
                            <tr>
                              <td class="style9">Phone:</td>
                              <td><input name="LocPhone" type="text" class="style7" id="LocPhone" size="40"></td>
                            </tr>
                          </table></td>
                        </tr>
                        <tr>
                          <td><span class="style9">Deponent 1:</span></td>
                          <td><span id="sprytextfield11">
                            <input name="Witness1" type="text" class="style7" id="Witness1" size="66">
                          <span class="textfieldRequiredMsg"></span></span></td>
                        </tr>
                        <tr>
                          <td><span class="style9">Deponent 2:</span></td>
                          <td><input name="Witness2" type="text" class="style7" id="Witness2" size="66"></td>
                        </tr>
                        <tr>
                          <td><span class="style9">Deponent 3:</span></td>
                          <td><input name="Witness3" type="text" class="style7" id="Witness3" size="66"></td>
                        </tr>
                        <tr>
                          <td class="style9">Expert Type:</td>
                          <td><span class="style9">
                            <select name="ExpertType" size="1" class="style7" id="ExpertType">
                              <option selected>Not an expert witness</option>
                              <option>Accident &amp; Injury</option>
                              <option>Business &amp; Financial</option>
                              <option>Civil Litigation</option>
                              <option>Construction &amp; Architecture</option>
                              <option>Criminal Litigation</option>
                              <option>Medical &amp; Psychological</option>
                              <option>Patent Infringement</option>
                              <option>Science &amp; Engineering</option>
                            </select>
                          </span></td>
                        </tr>
                        <tr>
                          <td><span class="style9">Case Name:</span></td>
                          <td><span id="sprytextfield12">
                            <input name="CaseName" type="text" class="style7" id="CaseName" size="66">
                          <span class="textfieldRequiredMsg"></span></span></td>
                        </tr>
                        <tr>
                          <td align="left"><span class="style9">Case #:</span></td>
                          <td><input name="CauseNo" type="text" class="style7" id="CauseNo" size="66"></td>
                        </tr>
                        <tr>
                          <td class="style9">Additional Services:</td>
                          <td><table width="426" border="0">
                            <tr>
                              <td class="style9"><input name="Video" type="checkbox" class="style9" id="Video" value="Video Checked"> 
                                Video 
                                <input name="Interpreter" type="checkbox" id="Interpreter" value="Interpreter Checked">
                                Interpreter<span class="style14">, 
                                <span id="sprytextfield4">
                                <input name="Language" type="text" class="style14" id="Language" size="25">
                              </span>                              </span></td>
                            </tr>
                            <tr>
                              <td class="style9"> <input name="GreenCopy" type="checkbox" id="GreenCopy" value="GreenCopy Checked">
                              GreenCopy&#8482; PDF* ($40 Discount)</td>
                            </tr>
                            <tr>
                              <td class="style9"><input name="RealTime" type="checkbox" class="style9" id="RealTime" value="Real-Time Checked"> 
                                Interactive Real-time</td>
                            </tr>
                            <tr>
                              <td class="style9"><input name="Expedite" type="checkbox" class="style9" id="Expedite" value="Expedite Checked">
                              Expedite/Trial Date<span id="sprytextfield3">
                              <input name="TrialDate" type="text" class="style14" id="TrialDate" size="26">
                              </span></td>
                            </tr>
                          </table></td>
                        </tr>
                        <tr>
                          <td class="style9">Sign up for <strong>domainWeb&#8482;</strong>?</td>
                          <td valign="top"><label>
                            <input type="radio" name="domainWeb" value="Yes" id="domainWeb_0">
Yes</label>
                            <input type="radio" name="domainWeb" value="No" id="domainWeb_1">
                            <label>No</label></td>
                        </tr>
                        <tr>
                          <td height="77"><input name="ScheduledDate" type="hidden" id="ScheduledDate" value="<?php echo date("Y-m-j H:i:s");?>"></td>
                          <td><input name="submit" type="submit" class="style7" id="submit" value="Submit">
                          <input name="reset" type="reset" class="style7" id="reset" value="Reset"></td>
                        </tr>
                      </table>
                    </form>                    </td>
                  </tr>
                  <tr>
                    <td width="765" height="51" valign="top"><div align="center"><img src="../Images/sheduledepotree.gif" width="343" height="36" border="0" usemap="#Map"></div></td>
                    <td width="29" valign="top">&nbsp;</td>
                  </tr>
                </table>                
                </td>
              </tr>
              </table>
            </td>
          </tr>
            </table>
          <P><FONT color="#FFFFFF" size="1" face="Arial, Helvetica, sans-serif">&copy; 2008 
  domain Court Reporters</FONT></P>
       
<map name="Map"><area shape="rect" coords="2,3,364,45" href="../PDF Files/domainEarthSmallPC08.pdf" target="_blank">
</map><script type="text/javascript">
<!--
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "date", {format:"mm/dd/yyyy"});
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2", "email");
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "none", {isRequired:false, hint:"Trial Date"});
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "none", {isRequired:false, hint:"Language"});
var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5", "none");
var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6");
var sprytextfield7 = new Spry.Widget.ValidationTextField("sprytextfield7");
var sprytextfield8 = new Spry.Widget.ValidationTextField("sprytextfield8", "none");
var sprytextfield9 = new Spry.Widget.ValidationTextField("sprytextfield9");
var sprytextfield10 = new Spry.Widget.ValidationTextField("sprytextfield10");
var sprytextfield11 = new Spry.Widget.ValidationTextField("sprytextfield11");
var sprytextfield12 = new Spry.Widget.ValidationTextField("sprytextfield12");
//-->
</script></BODY>
 
</HTML>

                                  
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:

Select allOpen in new window

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-10-03 at 08:57:42ID23785491
Tags

PHP, JavaScript

Topics

JavaScript

,

Asynchronous Javascript and XML (AJAX)

,

PHP Scripting Language

Participating Experts
1
Points
500
Comments
7

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Greeting Cards
    I'm looking for help to modify a CGI script (by bignosebird.com) for sending virtual greeting cards, so that it will run from my web site on a tripod server. They use a proprietary mail program and I'm not able to figure out what are the necessary changes.
  2. colors picker!
    I'm wondering if there is a way to add a colors picker to my form (something similar to those available in MS office) so when the user selects one of the colors its number will be stored in the database!!
  3. Trying to add a javascript popup color picker to a field in my …
    Hi my field in my page is uniquely reference by the intCounter and im trying to add the javascript popup to it but i cannot figure out the document.forms.....part of where to change the code for my unique referenced field I have <input name="BGCOLOR_<%=intCounte...
  4. greeting repeat visitors with javascript
    How can I write a greeting for visitors who have previously visited today? It has to reset at midnight each day. First time they visit it sets a cookie that expires at midnight, next time it detects the cookie and triggers a greeting. I know the logic but don't know how to p...
  5. Color Picker
    Question on Color Picker project. I've managed to work out some custom items with the original color picker "Color Jack" but I have some additional requirements that I'm having trouble with. 1. I need to get the hex value into a field at real time below the color ...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: dereshPosted on 2008-10-03 at 11:34:07ID: 22636688

you should not depend on data validation that is done on client side, you should do validation on the server with php script:

addiming that name of the date input field is "data" and method = POST

<?php

$date = strftime($_POST['date'],time());

if($date < 259200) // 259200 is number of seconds for 3 days
  echo "date entered is not 3 days from now!";

?>

 

by: pzozulkaPosted on 2008-10-03 at 17:58:57ID: 22639047

Hey deresh, that looks like a good solution as well. I don't mind using server side validation via php at all. Just not too familiar with php. Anyway, I'll give it a try on Monday, and I'll let you know, thanks for your response.

 

by: pzozulkaPosted on 2008-10-06 at 09:07:01ID: 22651529

I have attached the server side php script that emails the form. I inserted your code all the way at the top, was this the correct place to insert it?

Anyways it sort of worked. It gave me the error message, but it displayed it on the Thank You page, and emailed it out anyway.

<?
 
$JobDate = strftime($_POST['JobDate'],time());
 
if($date < 259200) // 259200 is number of seconds for 3 days
  echo "Date entered is not 3 days from now!";
 
// Post value declarations
 
$RqstType = $_POST["RqstType"];
 
$JobDate = $_POST["JobDate"];
 
$TimeZone = $_POST["TimeZone"];
 
$StartTime = $_POST["StartTime"];
 
$EndTime = $_POST["EndTime"];
 
$ScheduledDate = $_POST["ScheduledDate"];
 
$OrderedByFirstName = $_POST["OrderedByFirstName"];
 
$OrderedByLastName = $_POST["OrderedByLastName"];
 
$ContactFirstName = $_POST["ContactFirstName"];
 
$ContactLastName = $_POST["ContactLastName"];
 
$ContactMobile = $_POST["ContactMobile"];
 
$ContactPhone = $_POST["ContactPhone"];
 
$ContactFax = $_POST["ContactFax"];
 
$ContactEmail = $_POST["ContactEmail"];
 
$FirmName = $_POST["FirmName"];
 
$LocName = $_POST["LocName"];
 
$LocAddress = $_POST["LocAddress"];
 
$LocCity = $_POST["LocCity"];
 
$LocState = $_POST["LocState"];
 
$LocPostCode = $_POST["LocPostCode"];
 
$LocPhone = $_POST["LocPhone"];
 
$Witness1 = $_POST["Witness1"];
 
$Witness2 = $_POST["Witness2"];
 
$Witness3 = $_POST["Witness3"];
 
$ExpertType = $_POST["ExpertType"];
 
$CaseName = $_POST["CaseName"];
 
$CauseNo = $_POST["CauseNo"];
 
$Video = $_POST["Video"];
 
$Interpreter = $_POST["Interpreter"];
 
$GreenCopy = $_POST["GreenCopy"];
 
$Language = $_POST["Language"];
 
$RealTime = $_POST["RealTime"];
 
$Expedite = $_POST["Expedite"];
 
$TrialDate = $_POST["TrialDate"];
 
$domainWeb = $_POST["domainWeb"];
 
// To send HTML mail, the Content-type header must be set
 
$headers  = 'MIME-Version: 1.0' . "\r\n";
 
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
 
// Additional headers
 
$headers .= 'From: support@domain.com <domain Support>' . "\r\n"; // This isn't working (ever) could be host anti-spam thing.
 
// $headers .= 'Cc:' . $EMail . "\r\n"; // Copy to ordering person (removed per request on 7/29/08)
 
$headers .= 'Bcc: pavelz@domain.com' . "\r\n"; // Copy to me as test
 
// Create repository order email
 
$to  = 'rinam@domain.com' . ', '; // note the comma
 
$to  .= 'elenab@domain.com' . ', ';
 
$to  .= 'saquibr@domain.com' . ', ';
 
$to  .= 'nicoleh@domain.com' . ', ';
 
$to  .= 'yavonk@domain.com' . ', ';
 
$to  .= 'jennifers@domain.com';
 
$subject = "Schedule a Deposition";
 
$message= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
 
<html xmlns=\"http://www.w3.org/1999/xhtml\">
 
<head>
 
<title>Schedule a Deposition</title>
 
<style type=\"text/css\">font.n{ color:#ffffff; font-size:13px; font-family:arial, helvetica; text-decoration:none;}
 
font.a{ color:006699; font-size:15px; font-family:arial, helvetica;}
 
font.ax{ color:ffffff; font-size:12px; font-family:arial, helvetica; text-decoration: none;}
 
font.b{ color:#000000; font-size:14px; font-family:arial, helvetica; text-decoration:none;}
 
font.bx{ color:#000000; font-size:13px; font-family:arial, helvetica; text-decoration:none; background: white}
 
font.c{ color:#9999cc; font-size:21px; font-family:arial, helvetica;}
 
font.d{ color:#000000; font-size:16px; font-family:arial, helvetica;}
 
font.e{ color:#000000; font-size:12px; font-family:arial, helvetica;}
 
font.f{
 
        color: Red;
 
        font-size: 12px;
 
        font-family:arial, helvetica;
 
        text-decoration:none;
 
        font-style : italic;
 
}
 
BODY, DIV, TD, LAYER { font-size:8.5pt; font-family:arial; font-color:white;}
 
A:link { color:blue; text-decoration:none; }
 
A:visited { color:blue; text-decoration:none; }
 
A:hover, { color:red; text-decoration:none; }
 
A:active { color:red; text-decoration:none; }
 
.style2 {font-size: 14}
 
.style4 {font-family: Arial, Helvetica, sans-serif}
 
.style5 {font-family: Arial, Helvetica, sans-serif; font-size: 14;}
 
.style6 {font-size: 10px}
 
.style7 {font-size: 12px}
 
.style8 {font-size: 14px}</style>
 
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />
 
</head>
 
 
 
<body>
 
 
 
<table width=\"550\" border=\"0\" cellpadding=\"5\" cellspacing=\"5\" bgcolor=\"#9999CC\">
 
  <tr>
 
    <td colspan=\"2\" scope=\"row\"><b>Depo Scheduled</b></td>
 
  </tr>
 
  <tr>
 
    <td align=\"left\" scope=\"row\" bgcolor=\"#9999CC\" width=\"25%\">Request Type: </td>
 
    <td width=\"75%\" bgcolor=\"#FFFFFF\">$RqstType</td>
 
  </tr>
 
  <tr>
 
    <td align=\"left\" scope=\"row\" bgcolor=\"#9999CC\">Job Date: <br /></td>
 
    <td bgcolor=\"#FFFFFF\">$JobDate</td>
 
  </tr>
 
  <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Time Zone: </td>
 
    <td bgcolor=\"#FFFFFF\">$TimeZone</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Start Time: </td>
 
    <td bgcolor=\"#FFFFFF\">$StartTime</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">End Time: </td>
 
    <td bgcolor=\"#FFFFFF\">$EndTime</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Date & Time Scheduled (Mountain Standard Time): </td>
 
    <td bgcolor=\"#FFFFFF\">$ScheduledDate</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Ordered By First Name: </td>
 
    <td bgcolor=\"#FFFFFF\">$OrderedByFirstName</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Ordered By Last Name: </td>
 
    <td bgcolor=\"#FFFFFF\">$OrderedByLastName</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Attorney First Name: </td>
 
    <td bgcolor=\"#FFFFFF\">$ContactFirstName</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Attorney Last Name: </td>
 
    <td bgcolor=\"#FFFFFF\">$ContactLastName</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Phone: </td>
 
    <td bgcolor=\"#FFFFFF\">$ContactPhone</td>
 
  </tr>
 
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Mobile: </td>
 
    <td bgcolor=\"#FFFFFF\">$ContactMobile</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Fax: </td>
 
    <td bgcolor=\"#FFFFFF\">$ContactFax</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Email: </td>
 
    <td bgcolor=\"#FFFFFF\">$ContactEmail</td>
 
  </tr>
 
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Firm Name: </td>
 
    <td bgcolor=\"#FFFFFF\">$FirmName</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Location Name: </td>
 
    <td bgcolor=\"#FFFFFF\">$LocName</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Location Address: </td>
 
    <td bgcolor=\"#FFFFFF\">$LocAddress</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Location City: </td>
 
    <td bgcolor=\"#FFFFFF\">$LocCity</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Location State: </td>
 
    <td bgcolor=\"#FFFFFF\">$LocState</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Location Zip: </td>
 
    <td bgcolor=\"#FFFFFF\">$LocPostCode</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Location Phone: </td>
 
    <td bgcolor=\"#FFFFFF\">$LocPhone</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Deponent1: </td>
 
    <td bgcolor=\"#FFFFFF\">$Witness1</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Deponent2: </td>
 
    <td bgcolor=\"#FFFFFF\">$Witness2</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Deponent3: </td>
 
    <td bgcolor=\"#FFFFFF\">$Witness3</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Expert Type: </td>
 
    <td bgcolor=\"#FFFFFF\">$ExpertType</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Case Name: </td>
 
    <td bgcolor=\"#FFFFFF\">$CaseName</td>
 
  </tr>
  
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Case Number: </td>
 
    <td bgcolor=\"#FFFFFF\">$CauseNo</td>
    
   </tr>
   
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Video: </td>
 
    <td bgcolor=\"#FFFFFF\">$Video</td>
    
      </tr>
 
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Interpreter: </td>
 
    <td bgcolor=\"#FFFFFF\">$Interpreter</td>
    
      </tr>
      
     <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Interpreter Language: </td>
 
    <td bgcolor=\"#FFFFFF\">$Language</td>
 
      </tr>
      
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">GreenCopy: </td>
 
    <td bgcolor=\"#FFFFFF\">$GreenCopy</td>
 
      </tr>
    
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">RealTime: </td>
 
    <td bgcolor=\"#FFFFFF\">$RealTime</td>
    
      </tr>
 
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Expedite: </td>
 
    <td bgcolor=\"#FFFFFF\">$Expedite</td>
    
      </tr>
    
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Trial Date: </td>
 
    <td bgcolor=\"#FFFFFF\">$TrialDate</td>
 
      </tr>
      
    <tr>
 
    <td align=\"left\"  scope=\"row\" bgcolor=\"#9999CC\">Sign up for domainWeb? </td>
 
    <td bgcolor=\"#FFFFFF\">$domainWeb</td>
 
      </tr>
 
</table>
 
</body>
 
</html>";
 
// Mail Repository order using values from above
 
mail($to, $subject, $message, $headers);
 
 
 
// Create confirmation page
 
 
 
echo"<html>
 
<head>
 
<title>Schedule a Deposition</title>
 
<style type=\"text/css\">
 
font.n{ color:#ffffff; font-size:13px; font-family:arial, helvetica; text-decoration:none;}
 
font.a{ color:006699; font-size:15px; font-family:arial, helvetica;}
 
font.ax{ color:ffffff; font-size:12px; font-family:arial, helvetica; text-decoration: none;}
 
font.b{ color:#000000; font-size:14px; font-family:arial, helvetica; text-decoration:none;}
 
font.bx{ color:#000000; font-size:13px; font-family:arial, helvetica; text-decoration:none; background: white}
 
font.c{ color:#9999cc; font-size:21px; font-family:arial, helvetica;}
 
font.d{ color:#000000; font-size:16px; font-family:arial, helvetica;}
 
font.e{ color:#000000; font-size:12px; font-family:arial, helvetica;}
 
font.f{
 
        color: Red;
 
        font-size: 12px;
 
        font-family:arial, helvetica;
 
        text-decoration:none;
 
        font-style : italic;
 
}
 
BODY, DIV, TD, LAYER { font-size:8.5pt; font-family:arial; font-color:white;}
 
A:link { color:blue; text-decoration:none; }
 
A:visited { color:blue; text-decoration:none; }
 
A:hover, { color:red; text-decoration:none; }
 
A:active { color:red; text-decoration:none; }
 
.style1 {
 
        font-size: 12pt;
 
        font-weight: bold;
 
}
 
</style>
 
<meta name=\"robots\" content=\"noindex\">
</head>
 
<body bgcolor=\"#ffffff\" leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>
 
<table cellpadding=2 cellspacing=0 border=0 width=\"780\" bgcolor=\"#ffffff\">
 
<tr>
 
<td rowspan=6 bgcolor=\"#9999cc\" width=48 height=300><font class=c>&nbsp;</font></td>
 
<td rowspan=6 bgcolor=\"#ffffff\" width=10></td>
 
<td colspan=2 valign=middle>
 
<br>
 
<font class=c>Form Submitted</font><br>
 
</td>
 
<td width=\"304\">&nbsp;</td>
 
</tr>
 
<tr>
 
<td colspan=3 valign=top>
 
<hr noshade size=1 color=\"#cccccc\">
<hr noshade size=1 color=\"#cccccc\">
<table width=\"650\" border=\"0\" cellspacing=\"0\" cellpadding=\"15\" bgcolor=\"#EEEEEE\">
 
<tr>
 
  <td height=\"50\">
  <div><font class=\"b\" size=\"1\">Thank you for scheduling a deposition with domain Court Reporters! We will process your form shortly.
 
</font></div>
</td></tr>
</table>
</body>
</html>";
?>

                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
477:
478:
479:
480:
481:
482:
483:
484:
485:
486:
487:
488:
489:
490:
491:
492:
493:
494:
495:
496:
497:
498:
499:
500:
501:
502:
503:
504:
505:
506:
507:
508:
509:
510:
511:
512:
513:
514:
515:
516:
517:
518:
519:
520:
521:
522:
523:
524:
525:
526:
527:
528:
529:
530:
531:
532:
533:
534:
535:
536:
537:
538:
539:
540:
541:
542:
543:
544:
545:
546:
547:
548:
549:
550:
551:
552:
553:
554:
555:
556:
557:
558:
559:
560:
561:
562:
563:
564:
565:
566:
567:
568:
569:
570:
571:
572:
573:
574:
575:
576:
577:
578:
579:
580:
581:
582:
583:
584:
585:

Select allOpen in new window

 

by: pzozulkaPosted on 2008-10-06 at 09:12:51ID: 22651599

Oh and sorry up there is a typo, your code was modified to look like this:

$JobDate = strftime($_POST['JobDate'],time());
 
if($JobDate < 259200) // 259200 is number of seconds for 3 days
  echo "Date entered is not 3 days from now!";

 

by: dereshPosted on 2008-10-06 at 12:07:04ID: 22653268

that was only a example in your script you need to redirect back to form, see code below.

the code stores error in user session so that it can be displayed ona the form page somewhere.

and now it won't send you data until the date is correctly entered.

<?
 
$JobDate = strftime($_POST['JobDate'],time());
 
if($date < 259200) // 259200 is number of seconds for 3 days
{
  $_SESSION['error'] = "Date entered is not 3 days from now!";
  header('Location: http://url_to_page/with_form');
  exit;
}
?>
 
and on the form page somewhere appropriate:
 
<? if(isset($_SESSION['error']): ?>
<span style="color: red;"><?php echo $_SESSION['error']; ?>
<? endif; ?>
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:

Select allOpen in new window

 

by: pzozulkaPosted on 2008-10-06 at 13:28:57ID: 22654129

I cannot access the form anymore. It gives me an error message right away:
Parse error: syntax error, unexpected ':' in /home1/barkleyc/public_html/client/test1.php on line 70
Here is line 70:
<? if(isset($_SESSION['error']): ?>

I tried renaming my form page to .html instead of .php, and that eliminates the error. However when I submit my form, nothing happens, I just get redirected back to the form page, regardless of JobDate. What's causing this behavior?

 

by: pzozulkaPosted on 2008-10-14 at 13:11:14ID: 31502816

Here is the code that worked for me:
<?

$myFieldDate = strtotime($_POST['myFieldDate']);
$newdate = strtotime("+3 day");
if($myFieldDate < $newdate)
{ session_start();
  $_SESSION['error'] = "Please choose different Date!";
  header('Location: http://domain.com/client/test1.php');
  exit;
}?>

On the Form Page itself, all the way at the top:
<? session_start();
?>

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...