I am setting up a small site for personal use. It consists of a form that transfers inputed values to an html template. The ouput is code that i can use to quickly post on a website. In the template i have the following code:
I want to replace the url with a variable:
image1 being the field that the url would be entered into. I have done it outside the switch statement and it works fine. Any suggestions?
Code:
<?php $images = $_POST["myRadioButton"];
switch ($images)
{
case 1:
echo '<img src="http://i43.tinypic.com/29z3eyo.jpg">';
break;
case 2:
echo '<img src="http://i43.tinypic.com/29z3eyo.jpg">
<img src="http://i43.tinypic.com/29z3eyo.jpg">';
break;
case 3:
echo '<img src="http://i43.tinypic.com/29z3eyo.jpg">
<img src="http://i43.tinypic.com/29z3eyo.jpg">
<img src="http://i43.tinypic.com/29z3eyo.jpg">';
break;}
?>
Code:
$_POST["image1"];
Comment