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>

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

dear Leakbali,
you forgot the " ; " in line 18

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>

Hi Nybuler, thanks for correction :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.