0

I keep getting an unexpected$end parse error on line 32, but that line doesn't exist. I can't seem to find what is causing the problem. This is driving me crazy.

<!doctype html public "-//W3C//DTD HTML 4.0 //EN"> 
<html>
<head>
       <title>Your Output</title>
</head>
<body>
      <h1>Your Output</h1>
<center>

<?

  $basicText = $_REQUEST["basicText"];
  $borderSize = $_REQUEST["borderSize"];
  $borderStyle = $_REQUEST["borderStyle"];
  $sizeType = $_REQUEST["sizeType"];
  
 $theStyle = <<<HERE
  "border-width:$borderSize$sizeType;
  border-style:$borderStyle;
  border-color: green;"
  HERE;

  print "<div style = $theStyle>";
  print $basicText;
  print"</span>";
  
  ?>
  
  </center>
</body>
</html>

Edited by SolidSora: n/a

4
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by leakbali
0

Hi, trying this code

<!doctype html public "-//W3C//DTD HTML 4.0 //EN"> 
<html>
<head>
       <title>Your Output</title>
</head>
<body>
      <h1>Your Output</h1>
<div style="text-align : center">
<?php
  $basicText = $_REQUEST["basicText"];
  $borderSize = $_REQUEST["borderSize"];
  $borderStyle = $_REQUEST["borderStyle"];
  $sizeType = $_REQUEST["sizeType"];
  
 $theStyle = 
  "border-width:$borderSize$sizeType;
  border-style:$borderStyle;
  border-color: green;"

  print "<div style = '".$theStyle."'>";
  print $basicText;
  print"</span>";
  ?>
</div>
</body>
</html>

Note : please do not use <center> tag, it is deprecated.
Good luck

0

It's better to use echo instead of print....For info about it click here

<!doctype html public "-//W3C//DTD HTML 4.0 //EN"> 
<html>
<head>
       <title>Your Output</title>
</head>
<body>
      <h1>Your Output</h1>
<div style="text-align : center">
<?php
  $basicText = $_REQUEST["basicText"];
  $borderSize = $_REQUEST["borderSize"];
  $borderStyle = $_REQUEST["borderStyle"];
  $sizeType = $_REQUEST["sizeType"];
 
 $theStyle = 
  "border-width:$borderSize$sizeType;
  border-style:$borderStyle;
  border-color: green;";
 
  echo "<div style = '".$theStyle."'>";
  echo $basicText;
  echo "</span>";
  ?>
</div>
</body>
</html>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.