baser-b Posted October 16, 2018 Share Posted October 16, 2018 echo >>>HEREDOC <table name='AccountInfo'><form method='post' action='<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>' enctype='multipart/form-data'> <tr><th><span class='fieldname'>Username:</span></th><td><?php echo $user; ?></td></tr> <tr><th><span class='fieldname'>Password:</span></th><td><input type='password' size='16' name='pass' value='<?php echo $pass; ?>'></td></tr> <tr><th><span class='fieldname'>First Name:</span></th><td><input type='name' size='16' maxlength='16' name='fname' value='<?php echo $fname; ?>'></td></tr> <tr><th><span class='fieldname'>Last Name:</span></th><td><input type='name' size='16' maxlength='16' name='lname' value='<?php echo $lname; ?>'></td></tr> <tr><th><span class='fieldname'>Email:</span></th><td><input type='email' maxlength='20' name='email' value='<?php echo $email; ?>'></td></tr> <tr><th><span class='fieldname'>Phone:</span></th><td><input type='tel' maxlength='10' name='phone' value='<?php echo $phone; ?>'></td></tr> <tr><th><span class='fieldname'>Title:</span></th><td><input type='title' maxlength='16' name='title' value='<?php echo $utitle; ?>'></td></tr> <tr><th><span class='fieldname'>Company:</span></th><td><input type='text' maxlength='20' name='company' value='<?php echo $company; ?>'></td></tr> <tr><th><span class='fieldname'>Website:</span></th><td><input type='url' maxlength='20' name='website' value='<?php echo $website; ?>'></td></tr> <tr><th><span class='fieldname'>Mailing Address:</span></th><td><input type='address' maxlength='30' name='snailmail' value='<?php echo $snailmail; ?>'></td></tr></table> <tr><td><input type='submit' value='Save Info'></td></tr></form></div><br> <h3>Upload/Edit Account Photo</h3> <table name='UploadPhoto'><form method='post' action='<?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?>' enctype='multipart/form-data'> <tr><th>Select a Photo:</th><td><input type='file' name='image'></td><td><input type='submit' value='Save Photo'></td></tr></form></div><br></center> HEREDOC; I keep getting this error: [16-Oct-2018 12:05:16 UTC] PHP Parse error: syntax error, unexpected '>>' (T_SR) in /home/iqy0804tq6fq/public_html/portal/account.php on line 247 There is no whitespace, I can't figure out why '>>' all of a sudden causes an error. Quote Link to comment Share on other sites More sharing options...
cyberRobot Posted October 16, 2018 Share Posted October 16, 2018 You'll want to review the syntax for heredoc. Hint: it doesn't use greater than. Here's an example from the manual:http://php.net/manual/en/language.types.string.php#example-46 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.