2 buttons one page. 2 scripts
Posted: Tue Jan 19, 2010 3:59 am
hi got a code that I think is in need of 2 buttons...
this is a test so I will not be surprised if it got alot of problems just post if u find and I will correct it
im trying to do so that if u press button1 it will enlarge the "video" and if i press the button2 it will make it smaller. is there a way in php?
this is a test so I will not be surprised if it got alot of problems just post if u find and I will correct it
im trying to do so that if u press button1 it will enlarge the "video" and if i press the button2 it will make it smaller. is there a way in php?
Code: Select all
<?php
$Larger = '50%';
if ($_POST["submit1"])
{
$larger = '50%';
}
if ($_POST["submit2"])
{
$Larger = '92%';
}
?>
<html>
<head>
<title>Movie</title>
<link href="../layout.css" rel="stylesheet" type="text/css">
</head>
<body>
<form action="" method="post" ENCTYPE="multipart/form-data">
<b> </b><input style='width:50%;height:29' type="submit" name="submit2" size="250" value="Större storlek">
</form>
<form action="" method="post" ENCTYPE="multipart/form-data">
<b> </b><input style='width:50%;height:29' type="submit" name="submit1" size="250" value="Mindre storlek">
</form>
<object width="100%" height="100%"><param name="movie" value="http://www.youtube.com/v/sdUUx5FdySs&hl=sv_SE&fs=1&color1=0x402061&color2=0x9461ca"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/sdUUx5FdySs&hl=sv_SE&fs=1&color1=0x402061&color2=0x9461ca" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="100%" height="<?php echo $larger; ?>"></embed></object>
</body>
</html>