Jump to content

jgardonis

New Members
  • Posts

    3
  • Joined

  • Last visited

jgardonis's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. @cyberRobot I'm new to PHP coding your smart/curly quote vs straight quote looks exactly the same to me (minus the color of the text), so I'm sorry but I'm not sure I understand what the difference is in this instance
  2. Thank you all for the very helpful replies! I am intrigued by the idea of shortening the var names. Perhaps it would help if I would explain more on what the PHP is for. I've created HTML forms and I want the user's information that is collected by the fields to be submitted and sent to an email address. As for the idea of shortening the var names, I wanted to be clear and precise because I wasn't sure how specific the var names in PHP had to be. Here's some HTML for the forms if this also helps to understand what I'm trying to accomplish </div> <div class="uacf7-form-284"><label> Full Name* <span class="wpcf7-form-control-wrap" data-name="full-name"><input size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" value="" type="text" name="full-name" /></span> </label> <label> Phone* <span class="wpcf7-form-control-wrap" data-name="tel-838"><input size="40" class="wpcf7-form-control wpcf7-text wpcf7-tel wpcf7-validates-as-required wpcf7-validates-as-tel" aria-required="true" aria-invalid="false" value="" type="tel" name="tel-838" /></span> </label> <label> Email* <span class="wpcf7-form-control-wrap" data-name="your-email"><input size="40" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required wpcf7-validates-as-email" autocomplete="email" aria-required="true" aria-invalid="false" value="" type="email" name="your-email" /></span> </label> <label> Type of property* <span class="wpcf7-form-control-wrap" data-name="Type-of-Property"><select class="wpcf7-form-control wpcf7-select wpcf7-validates-as-required" aria-required="true" aria-invalid="false" name="Type-of-Property"><option value="Lot">Lot</option><option value="Single Family">Single Family</option><option value="Multi-Unit">Multi-Unit</option><option value="Investment">Investment</option><option value="Commercial">Commercial</option></select></span> </label> <label> Property Address* <span class="wpcf7-form-control-wrap" data-name="property-address"><input size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" value="" type="text" name="property-address" /></span> </label> <label> Price Range* <span class="wpcf7-form-control-wrap" data-name="PriceRange"><input size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" value="" type="text" name="PriceRange" /></span> </label> <label> Ideal Number of Bedrooms* <span class="wpcf7-form-control-wrap" data-name="Ideal-Number-of-Bedrooms"><input class="wpcf7-form-control wpcf7-number wpcf7-validates-as-number" max="6" aria-invalid="false" value="0" type="number" name="Ideal-Number-of-Bedrooms" /></span> </label> <label> Ideal Number of Bathrooms* <span class="wpcf7-form-control-wrap" data-name="Ideal-Number-of-Bathrooms"><input class="wpcf7-form-control wpcf7-number wpcf7-validates-as-number" max="6" aria-invalid="false" value="0" type="number" name="Ideal-Number-of-Bathrooms" /></span> </label> <label> Are you preapproved for a mortgage?* <span class="wpcf7-form-control-wrap" data-name="Are-you-preappoved-for-a-mortgage"><span class="wpcf7-form-control wpcf7-radio"><span class="wpcf7-list-item first"><label><input type="radio" name="Are-you-preappoved-for-a-mortgage" value="Yes" /><span class="wpcf7-list-item-label">Yes</span></label></span><span class="wpcf7-list-item last"><label><input type="radio" name="Are-you-preappoved-for-a-mortgage" value="No" /><span class="wpcf7-list-item-label">No</span></label></span></span></span> </label> <div data-id="Pre-approvalAmount" data-orig_data_id="Pre-approvalAmount" data-class="wpcf7cf_group"><label>Pre-Approval Amount <span class="wpcf7-form-control-wrap" data-name="Pre-approvalAmount"><input size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" value="" type="text" name="Pre-approvalAmount" /></span></label></div>
  3. Hi! So I've got I group of php code for a form. Below: <?php $full_name = filter_input[INPUT_POST, 'full_name']; $phone = filter_input[INPUT_POST, 'phone']; $email = filter_input[INPUT_POST, 'email']; $type-of-property = filter_input(INPUT_POST, 'type-of-property’); $property_address = filter_input[INPUT_POST, 'property_address ']; $price_range = filter_input[INPUT_POST, ‘price_range’]; $ideal-number-of-bedrooms = filter_input[INPUT_POST, ‘ideal-number-of-bedrooms’]; $ideal-number-of-bathrooms = filter_input[INPUT_POST, ‘ideal-number-of-bathrooms’]; $are-you-preapproved-for-a-mortgage = filter_input[INPUT_POST, ‘are-you-preapproved-for-a-mortgage’]; if ($are-you-preapproved-for-a-mortgage = yes ) {echo “$Pre-approvalAmount";} $type-of-parking-you-need = filter_input[INPUT_POST, ‘type-of-parking-you-need’]; $expected-timeline-for-buying = filter_input[INPUT_POST, ‘expected-timeline-for-buying’]; $neighborhoods-or-zip-codes-youd-like-to-explore = filter_input[INPUT_POST, ‘neighborhoods-or-zip-codes-youd-like-to-explore’]; $what-do-you-want-the-most-in-your-dream-home = filter_input[INPUT_POST, ‘what-do-you-want-the-most-in-your-dream-home’]; And the only error that's come up consistently is Parse error: syntax error, unexpected token ",", expecting "]" in file on line 2 Errors parsing file. It's confusing because only that line has come up in error, when the formatting seems to be the same as the other lines. Help please
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.