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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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