Dark_Archon Posted June 2, 2008 Share Posted June 2, 2008 i'm new to php and would need a easy to understand answer if possible. im looking for a way to be able to enter numbers into a textarea submmit form type thing so that it changes a certain link that i need to be changed. for example: if you put 1234 in the submit form (or w/e) the url would change to http://url.com/lalala/hmm=1234 or if there's a way to to do the same thing, but changing the actual URL of my website (example: http://mywebsite.com/test/1234) so that it makes the numbers, again, http://url.com/lalala/hmm=1234. Link to comment https://forums.phpfreaks.com/topic/108362-simple-php-question/ Share on other sites More sharing options...
DyslexicDog Posted June 2, 2008 Share Posted June 2, 2008 What you are asking for would be achieved with html and the .htaccess file on an apache config. Link to comment https://forums.phpfreaks.com/topic/108362-simple-php-question/#findComment-555509 Share on other sites More sharing options...
Dark_Archon Posted June 2, 2008 Author Share Posted June 2, 2008 how would i go about doing it? even the submit form way would be nice. wouldnt that be easier? is there an easy way to explain that way? Link to comment https://forums.phpfreaks.com/topic/108362-simple-php-question/#findComment-555511 Share on other sites More sharing options...
DyslexicDog Posted June 2, 2008 Share Posted June 2, 2008 You should read about HTML forms and how they work. Link to comment https://forums.phpfreaks.com/topic/108362-simple-php-question/#findComment-555761 Share on other sites More sharing options...
dezkit Posted June 2, 2008 Share Posted June 2, 2008 <?php $page = $_GET["page"]; if (!$page) { include "/home.php"; } else if($page=="1234") { include "test/1234.php"; } else { echo "<b><h1>404 Error</h1></b>"; } ?> index.php?page=1234 is really /test/1234.php Link to comment https://forums.phpfreaks.com/topic/108362-simple-php-question/#findComment-555765 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.