Jump to content

[SOLVED] Kinda Stuck :S


decypher

Recommended Posts

Hey again. I finally got that book and begun to learn it. However When I copied an example out of the book  it doesn't work :S

 

firstly:

 

<html>
<head>
<title>Font Choices</title>
</head>
<body>
<center>
<h1>Font Choices</h1>
<h3>Demonstrates how to read HTML form elements</h3>

<form method = "post"
      action = "bordermaker.php">

<h3>Text to modify</h3>

<textarea name= "basictext"
          rows= "10"
          cols= "40">
Woohoo I'm acutally making a textarea. I have also been able to make
different kind of borders, with diferent fonts and sizes. How good am
I? I bet you're really impressed aren't you.So ner ner ner ner! 
</textarea>

<Table border = 2>
<tr>

<td><h3>Border style</h3></td>
<td colspan = 2><h3>Border Size</h3></td>
</tr>

<tr>
<td>
<Select name = Borderstyle>
<option vale = "ridge">Ridge</option>
<option vale = "groove">Groove</option>
<option vale = "double">Double</option>
<option vale = "inset">Inset</option>
<option vale = "outset">Outset</option>
</select>
</td>

<td>

<Select size = 5
        name = Bordersize>
<option vale = "1">1</option>
<option vale = "2">2</option>
<option vale = "3">3</option>
<option vale = "5">5</option>
<option vale = "10">10</option>
</select>
</td>

<td>
<input type = "radio"
       name = "sizetype"
       value = "px">pixels<br>
<input type = "radio"
       name = "sizetype"
       value = "pt">points<br>
<input type = "radio"
       name = "sizetype"
       value = "cm">centimeters<br>
<input type = "radio"
       name = "sizetype"
       value = "in">inches<br>

</td>
</tr>
</table>

</table>
<input type = "Submit"
       value = "Show me">


</center>
</body>
</html>

 

then...

 

<Html>
<Head>
<Title>Your output</title>
</head>
<body>
<h1>Your Output</h1>
<Center>

<?php

$theStyle = <<<HERE
"border-width:$Bordersize$sizetype;
border-style:$Borderstyle;
border-color:Red"
HERE;

print "<div style = $theStyle>";
print $basictext;
print "</span>";

?>

</center>
</body>
</html>

 

However, like i said it doesn't work...but past examples do so I know php is workin on my computer...Any suggestions?

Link to comment
https://forums.phpfreaks.com/topic/60604-solved-kinda-stuck-s/
Share on other sites

The only thing that appears is the html of 'Your Ouput' shows up but where the php should be it is just blank

 

heres a code that gets the data:

 

<?php
$basictext = $_POST['basictext'];
$theStyle = <<<HERE
"border-width:$Bordersize$sizetype;
border-style:$Borderstyle;
border-color:Red"
HERE;

print "<div style = $theStyle>";
print $basictext;
print "</span>";

?>

 

its not working because you are not asking the php to get data from the form.

Link to comment
https://forums.phpfreaks.com/topic/60604-solved-kinda-stuck-s/#findComment-301498
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.