sniped22 Posted February 18, 2007 Share Posted February 18, 2007 On one page I have a textbox with a submit button, it is POSTing the data to profile.php. on profile.php I have the code as follows: <html> <body> <?php $name = $_POST['name']; echo($name); ?> <object width="425" height="350"><param name="movie" value="<?php $name; ?>"></param><param name="wmode" value="transparent"></param><embed src=" ?>" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object> </body> </html> How can I get the text string of $name to become the value in the <object> tag's value? The code I have now doesn't work with <?php $name; ?> Any help? Do I need to use something other than PHP? Thanks Link to comment https://forums.phpfreaks.com/topic/39077-video-problem/ Share on other sites More sharing options...
marcus Posted February 18, 2007 Share Posted February 18, 2007 Do: <?=$name?> The '=' sign is shorthand for echo. Link to comment https://forums.phpfreaks.com/topic/39077-video-problem/#findComment-188202 Share on other sites More sharing options...
sniped22 Posted February 18, 2007 Author Share Posted February 18, 2007 I tried this, but it still isn't loading. I'll paste my entire source in hope of inspiring some ideas... video.html: <html> <body> <form name="asd" action="profile.php" method="POST"> <input type="text" name="name"> <input type="submit" name="submit"> </body> </html> profile.php: <html> <body> <?php $name = $_POST['name']; ?> <object width="425" height="350"><param name="movie" value="<?=$name?>"></param><param name="wmode" value="transparent"></param><embed src="<?=$name?>" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object> </body> </html> Link to comment https://forums.phpfreaks.com/topic/39077-video-problem/#findComment-188212 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.