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. Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment 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.