bas7320 Posted January 12, 2008 Share Posted January 12, 2008 How would you generate a button that links to a URL rather than using hyperlinked text in a PHP page? Quote Link to comment https://forums.phpfreaks.com/topic/85696-generating-a-button-that-links-to-a-url/ Share on other sites More sharing options...
revraz Posted January 12, 2008 Share Posted January 12, 2008 Use a image or a submit button. Quote Link to comment https://forums.phpfreaks.com/topic/85696-generating-a-button-that-links-to-a-url/#findComment-437355 Share on other sites More sharing options...
bas7320 Posted January 12, 2008 Author Share Posted January 12, 2008 what is the PHP code in the button that will reference the URL and direct to it? Quote Link to comment https://forums.phpfreaks.com/topic/85696-generating-a-button-that-links-to-a-url/#findComment-437359 Share on other sites More sharing options...
revraz Posted January 12, 2008 Share Posted January 12, 2008 Look up FORM for HTML. Quote Link to comment https://forums.phpfreaks.com/topic/85696-generating-a-button-that-links-to-a-url/#findComment-437361 Share on other sites More sharing options...
phpSensei Posted January 12, 2008 Share Posted January 12, 2008 what is the PHP code in the button that will reference the URL and direct to it? What??? ? <?php $URL = "http://www.google.com"; echo '<form name="form1" id="form1" method="post" action="$URL"> <input type="submit" name="Submit" value="Submit" /> </form>'; ?> Action would be where the URL should go to, and $URL is the LINK. Quote Link to comment https://forums.phpfreaks.com/topic/85696-generating-a-button-that-links-to-a-url/#findComment-437362 Share on other sites More sharing options...
Uzm Posted January 12, 2008 Share Posted January 12, 2008 Erm, you can do like this: <?php echo "<input type=\"button\" onClick=\"parent.location='URL'\" value=\"GO TO URL\">"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/85696-generating-a-button-that-links-to-a-url/#findComment-437510 Share on other sites More sharing options...
revraz Posted January 12, 2008 Share Posted January 12, 2008 That would be Java Quote Link to comment https://forums.phpfreaks.com/topic/85696-generating-a-button-that-links-to-a-url/#findComment-437528 Share on other sites More sharing options...
psychowolvesbane Posted January 12, 2008 Share Posted January 12, 2008 <a href="index.php">Home</a> Quote Link to comment https://forums.phpfreaks.com/topic/85696-generating-a-button-that-links-to-a-url/#findComment-437585 Share on other sites More sharing options...
phpSensei Posted January 13, 2008 Share Posted January 13, 2008 <a href="index.php">Home</a> Irrelevant, and made no sense. Quote Link to comment https://forums.phpfreaks.com/topic/85696-generating-a-button-that-links-to-a-url/#findComment-437590 Share on other sites More sharing options...
revraz Posted January 13, 2008 Share Posted January 13, 2008 That's exactly what he said he didn't want to do. People don't read anymore. <a href="index.php">Home</a> Quote Link to comment https://forums.phpfreaks.com/topic/85696-generating-a-button-that-links-to-a-url/#findComment-437611 Share on other sites More sharing options...
twostars Posted January 13, 2008 Share Posted January 13, 2008 That would be Java Javascript* Quote Link to comment https://forums.phpfreaks.com/topic/85696-generating-a-button-that-links-to-a-url/#findComment-437733 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.