Dark_Archon Posted June 26, 2008 Share Posted June 26, 2008 i need a submit form that if you type in 1234 in the submit form, the link in the code changes from http://link.com/ to http://link.com/1234. Quote Link to comment https://forums.phpfreaks.com/topic/111985-solved-easy-submit-question/ Share on other sites More sharing options...
mmarif4u Posted June 26, 2008 Share Posted June 26, 2008 You can use GET for this to pass value to URL. On submission use URL to pass on the specified form. Quote Link to comment https://forums.phpfreaks.com/topic/111985-solved-easy-submit-question/#findComment-574806 Share on other sites More sharing options...
Dark_Archon Posted June 26, 2008 Author Share Posted June 26, 2008 i'm like kinda new to the whole php thing. and i've been searching google and everything forever. i thought it'd be an easy html problem. i need to like see something to understand. Quote Link to comment https://forums.phpfreaks.com/topic/111985-solved-easy-submit-question/#findComment-574807 Share on other sites More sharing options...
dannyb785 Posted June 26, 2008 Share Posted June 26, 2008 I'm pretty sure you'd need to change your .htaccess file to convert something like domain.com/1234 to domain.com/view.php?code=1234 kinda like myspace. I don't think it's something you can do just entirely in html without anything else. Once the .htaccess file is modified, you can do what was said where you'd have a form with a GET method Quote Link to comment https://forums.phpfreaks.com/topic/111985-solved-easy-submit-question/#findComment-574809 Share on other sites More sharing options...
mmarif4u Posted June 26, 2008 Share Posted June 26, 2008 the link in the code changes from http://link.com/ to http://link.com/1234. The link will be in the form to show in the web page OR it is in the address bar. Explain a bit. Quote Link to comment https://forums.phpfreaks.com/topic/111985-solved-easy-submit-question/#findComment-574812 Share on other sites More sharing options...
dannyb785 Posted June 26, 2008 Share Posted June 26, 2008 the link in the code changes from http://link.com/ to http://link.com/1234. The link will be in the form to show in the web page OR it is in the address bar. Explain a bit. I dont know that you can go from http://link.com/ to http://link.com/1234 with just a GET form alone. Quote Link to comment https://forums.phpfreaks.com/topic/111985-solved-easy-submit-question/#findComment-574826 Share on other sites More sharing options...
Dark_Archon Posted June 26, 2008 Author Share Posted June 26, 2008 i feel like javascript or something could do it. idk i feel like im making more complicated than it is. i dont have a database set up or anything. just a ftp. like i wish i could draw it out. haha i have a flash picture viewer that displays a slidshow. kinda like photobucket has, and the link i want to be changed is in the html code in the flash slidshow. and the link is where the pictures are coming from. so if you were to type 567 in the submit thing and hit enter, the url in the html code would change to http://site.com/567. so i just wanna be able to change the url in the code. im not trying to redirect or anything, Quote Link to comment https://forums.phpfreaks.com/topic/111985-solved-easy-submit-question/#findComment-574831 Share on other sites More sharing options...
mmarif4u Posted June 26, 2008 Share Posted June 26, 2008 so if you were to type 567 in the submit thing and hit enter, the url in the html code would change to http://site.com/567. If i am not mistaken,the url will always be the same like : http://site.com Now after this you can add your variable input from form to the url. $variable=$_POST['link']; $new_url="/".$variable; Quote Link to comment https://forums.phpfreaks.com/topic/111985-solved-easy-submit-question/#findComment-574836 Share on other sites More sharing options...
Dark_Archon Posted June 26, 2008 Author Share Posted June 26, 2008 yeah the link never changes, just the /1234 but im new to the whole php game. i wouldnt know how to set up the code or anything. :/ Quote Link to comment https://forums.phpfreaks.com/topic/111985-solved-easy-submit-question/#findComment-574847 Share on other sites More sharing options...
mmarif4u Posted June 26, 2008 Share Posted June 26, 2008 Sorry you can use GET instead of POST. Quote Link to comment https://forums.phpfreaks.com/topic/111985-solved-easy-submit-question/#findComment-574852 Share on other sites More sharing options...
dannyb785 Posted June 26, 2008 Share Posted June 26, 2008 This isn't php. You CAN use php however.. whatever page your form goes to(if <form action=process.php and method="POST"> and the <input type=text name=goto>) make a file called "process.php": <?php header("Location: $_POST[goto]"); ?> booyah. one line of php code. if that doesnt work for some reason, do: <?php header("Location: http://www.mydomain.com/$_POST[goto]"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/111985-solved-easy-submit-question/#findComment-574853 Share on other sites More sharing options...
Dark_Archon Posted June 26, 2008 Author Share Posted June 26, 2008 i know what that codes doing danny, but i dont even know how to set it up to get it to work. :/ if anyone has aim and could help me get this done, that'd be nice. :] or if it'd be easy here. Quote Link to comment https://forums.phpfreaks.com/topic/111985-solved-easy-submit-question/#findComment-574861 Share on other sites More sharing options...
dannyb785 Posted June 26, 2008 Share Posted June 26, 2008 are we supposed to just guess your aim sn? Why didn't you try out my code? I gave you the info for the form page and the process form page. That's all you need. Quote Link to comment https://forums.phpfreaks.com/topic/111985-solved-easy-submit-question/#findComment-574866 Share on other sites More sharing options...
Dark_Archon Posted June 26, 2008 Author Share Posted June 26, 2008 aha sn: thats jewishhh but i would try your code if i knew how to set it up with the submit and everything. i new to all this. i understand it, but yeah. thanks allot btw Quote Link to comment https://forums.phpfreaks.com/topic/111985-solved-easy-submit-question/#findComment-574868 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.