this question has answer here:
- php parse/syntax errors; , how solve them? 12 answers
ive been around trying fix code still error
parse error: syntax error, unexpected 'userfirstname' (t_string), expecting ',' or ';' in /home/crosswayprinting/public_html/ztest2/functions/shop.php on line 66
here's code btw whats mistake :/ ?
<?php if($user_home->is_logged_in()){ echo ' <div class="row"> <div class="col-lg-8 col-lg-offset-2"> <h2 class="section-heading">place order</h2> <div class="text-center" style="input, select, textarea{ color: #000; }"> </div><br> <form role="form" class="usertrans" method="post"> <input type="hidden" value="orderinsert" name="act_usertrans"> <div class="form-group"> <label for="typeofservice">select type of service</label> <select id="typeofservice" class="form-control" name="typeofservice"> <option value="tarpaulin">tarpaulin</option> <option value="rush id">rush id</option> <option value="photocopy">photocopy</option> <option value="graphic layout">graphic layout</option> <option value="invitation">invitation</option> <option value="panaflex">panaflex</option> <option value="signages">signages</option> <option value="stickers">stickers</option> <option value="sintra board">sintra board</option> <option value="large format photo">large format photo</option> <option value="pvc id">pvc id</option> <option value="lamination">lamination</option> <option value="bag tags">bag tags</option> <option value="notary public">notary public</option> <option value="scan">scan</option> </select> </div> <div class="form-group"> <label for="templateselect">template selection</label> <select id="templateselect" class="form-control" name="templateselect"> <option value="own made template">own made template</option> <option value="pre-made template">pre-made template</option> </select> </div> <div class="form-group"> <label for="text">more details order</label> <input type="text" class="form-control" id="orderdetails" name="orderdetails"> </div> <div class="form-group"> <label for="text"> customer name</label> <input type="text" value=" <?php echo $row['userfirstname']; ?> " class="form-control" id="customer" name="customer"> </div> /* code btw makes error, trying
echo customer's name , make passive or uneditable textbox can register orderlist whom ordered */
<button type="submit" class="btn btn-default usertrans">submit</button> </form> '; } else{ echo ' <center> please login place order </center> ';} ?>
get rid of echo statements wrapping html. there's no need, escape out of php interpreter , print html. won't error when you're doing <?php echo $row['userfirstname']; ?>
....something this:
<?php if($user_home->is_logged_in()){ ?> <div class="row"> <div class="col-lg-8 col-lg-offset-2"> <h2 class="section-heading">place order</h2> <form role="form" class="usertrans" method="post"> <input type="hidden" value="orderinsert" name="act_usertrans"> <div class="form-group"> <label for="typeofservice">select type of service</label> <select id="typeofservice" class="form-control" name="typeofservice"> <option value="tarpaulin">tarpaulin</option> <option value="rush id">rush id</option> <option value="photocopy">photocopy</option> <option value="graphic layout">graphic layout</option> <option value="invitation">invitation</option> <option value="panaflex">panaflex</option> <option value="signages">signages</option> <option value="stickers">stickers</option> <option value="sintra board">sintra board</option> <option value="large format photo">large format photo</option> <option value="pvc id">pvc id</option> <option value="lamination">lamination</option> <option value="bag tags">bag tags</option> <option value="notary public">notary public</option> <option value="scan">scan</option> </select> </div> <div class="form-group"> <label for="templateselect">template selection</label> <select id="templateselect" class="form-control" name="templateselect"> <option value="own made template">own made template</option> <option value="pre-made template">pre-made template</option> </select> </div> <div class="form-group"> <label for="text">more details order</label> <input type="text" class="form-control" id="orderdetails" name="orderdetails"> </div> <div class="form-group"> <label for="text"> customer name</label> <input type="text" value=" <?php echo $row['userfirstname']; ?> " class="form-control" id="customer" name="customer"> <!-- above won't give error --> </div> <button type="submit" class="btn btn-default usertrans">submit</button> </form> </div> </div> <?php } else { ?> <!-- not use center tags when you're using bootstrap framework --> <!--<center> please login place order </center>--> <div class="text-center"> please login place order </div> <?php } ?>
also what's going on inline styles? that's not how works:
<div class="text-center" style="input, select, textarea{ color: #000; }">
just move css somewhere else. can't use targeted selectors within style=""
tag, relevant css.
Comments
Post a Comment