I cannot get this to work. I am sure it is something basic. I am new to PHP but I know that if I dont return this data the right way, the form will not work.
I cannot enclose this in php tags, or I get
And I am not sure why.Parse error: parse error, unexpected '<' in C:\DEV\xampp\htdocs\drupal\joshadd\reg.php on line 5
Here is the code (a piece of it...) that I am talking about. You will see at the end of this form. I need to populate:
Code: Select all
<input id="custom_1[M]" name="custom_1[M]" type="hidden" value=$month>
</select>
<input id="custom_1[d]" name="custom_1[d]" type="hidden" value=$day>
</select>
<input id="custom_1[Y]" name="custom_1[Y]" type="hidden" value=$year>What am I doing wrong? I really appreciate your input.
The form:
Code: Select all
<?PHP
<form action="http://192.168.1.30/drupal/index.php?q=civicrm/profile/edit&gid=1&reset=1" method="post" name="Edit" id="Edit">
<div><input name="_qf_default" type="hidden" value="Edit:cancel" />
<input name="postURL" type="hidden" value="http://www.ulem.org/profile_sent!" />
<input name="cancelURL" type="hidden" value="http://www.ulem.org/profile_cancelled!" />
<input name="errorURL" type="hidden" value="http://www.ulem.org/error_page!" />
</div>
<script type="text/javascript" src="./modules/civicrm/js/Common.js"></script>
<div id="crm-container" lang="en" xml:lang="en">
<td><select class="form-date required" id="birth_date[M]" name="birth_date[M]">
<option value="">-month-</option>
<option value="1">Jan</option>
<option value="2">Feb</option>
<option value="12">Dec</option>
</select> <select class="form-date required" id="birth_date[d]" name="birth_date[d]">
<option value="">-day-</option>
<option value="1">01</option>
<option value="31">31</option>
</select> <select class="form-date required" id="birth_date[Y]" name="birth_date[Y]">
<option value="">-year-</option>
<option value="1906">1906</option>
<option value="1907">1907</option>
</select>
<option value="">- select -</option>
<option value="1000">Alabama</option>
<option value="1001">Alaska</option>
<option value="1052">American Samoa</option>
<option value="1002">Arizona</option>
</select></td></tr>
<input name="custom_10" type="text" value="" id="custom_10" class="form-text" /></td></tr><tr><td class="label"><label for="custom_11">Best Time to Contact?</label></td>
<td><select size="5" multiple="multiple" name="custom_11[]" id="custom_11" class="form-select">
<option value="1">Morning</option>
<option value="2">Afternoon</option>
<option value="3">Evening</option>
<option value="4">Any Time</option>
</select></td></tr><tr>
<td class="label"><label for="custom_7">Race</label></td><td><select size="5" multiple="multiple" name="custom_7[]" id="custom_7" class="form-select">
<option value="1">Black / African American</option>
<option value="2">Latino / Latina</option>
<option value="3">White / Caucasian</option>
<option value="4">Asian</option>
<option value="5">Other</option>
</select></td></tr><tr>
<td class="label"><label for="custom_8">Other Race</label></td><td><input name="custom_8" type="text" value="" id="custom_8" class="form-text" /></td></tr><tr><td class="label">
<label>Gender</label></td><td><input value="1" type="radio" id="qf_2bd588" name="gender" /><label for="qf_2bd588">Female</label> <input value="2" type="radio" id="qf_166521" name="gender" /><label for="qf_166521">Male</label>
$day = date(d);
$month = date(m);
</td><td> <input id="custom_1[M]" name="custom_1[M]" type="hidden" value=$month>
</select> <input id="custom_1[d]" name="custom_1[d]" type="hidden" value=$day>
</select> <input id="custom_1[Y]" name="custom_1[Y]" type="hidden" value="2006">
</select></td></tr></table><div class="messages help"><center>Once you submit this form, this window will close.</center></div></fieldset></div><div class="crm-submit-buttons"><input class="form-submit default" name="_qf_Edit_next" value="Save" type="submit" /> <input class="form-submit default" name="_qf_Edit_cancel" value="Cancel" type="submit" /></div>
</script>
</form>
?>Train