Jump to content

everyxthing

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

everyxthing's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [!--quoteo(post=353388:date=Mar 9 2006, 03:09 PM:name=joecooper)--][div class=\'quotetop\']QUOTE(joecooper @ Mar 9 2006, 03:09 PM) [snapback]353388[/snapback][/div][div class=\'quotemain\'][!--quotec--] post the line 23 here [/quote] <body> The result of the calcuation is <?php echo"$_result ?> </body> </html>
  2. okay thanks now it says line 23 has some thing wrong with it.
  3. [!--coloro:#CC33CC--][span style=\"color:#CC33CC\"][!--/coloro--]OK so I am a college student who is going to school for web design and we are learning like php and my sql and all that stuff. I was doing my home work and its like we have to make a calculation thing and when I got done with I got a Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in F:\Students\redulac\javascript\hwweek6\calculate.php on line 2 could some one please tell me where I went wrong and help me fix it. here is the code and then the one after that is whats calling it [!--colorc--][/span][!--/colorc--] <?PHP if ($_POST['vall' =="";] || ($_POST 'val2' =="" || ($_POST 'calc' ==)) {header("Location: calculate_form.html"); exit; } if ($_POST['calc' == "add"]{$result = $_POST['vall' + $_POST['val2']) elseif ($_POST['calc' =="subtract"]{$result = $_POST['vall'- $_POST]['val2']) elseif ($_POST['calc' =="mutiply"]{$result = $_POST['vall' * $_POST['val2']) elseif ($_POST['calc' =="divide"]{$result = $_POST['vall' / $_POST['val2']) ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Calcuation</title> </head> <body> The result of the calcuation is <?php echo"$_ result"; ?>; </body> </html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Calculation Form</title> </head> <body> <form action="calculate.php" method="post"> <p> Value 1: <input name="vall" type="text" id="vall" size="10"> </p> <p> Value 2: <input name="val2" type="text" id="val2" size="10"> </p> <p> Calculation</p> Add</p> <p><input name="calc" type="radio" value="add"></p> <br> <p><input name="subtract" type="radio" value="subtract"> subtract </p> <p><input name="multiply" type="radio" value="multiply">multiply</p> <p> <input name="divide" type="radio" value="divide"> divide</p> <p> <input type="submit" name="Submit" value="Calculate"></p> </form> </body> </html>
×
×
  • 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.