joda Posted September 29, 2009 Share Posted September 29, 2009 So,here is my question: I have this web address https://cpanel2.eutelnet.rs:2096 where I have to fill out all the text boxes and login. But,I wish to make the login some simple. In the e-mail text box I must to put the complete mail address like this: [email protected] I wish to make another page with a login form where I can put only the user name and the system should alone put the "@yahoo.com" together with the user name. Here is the code what I use from another page of mine to login on this page https://cpanel2.eutelnet.rs:2096 but I have to put the full e-mail address... <form action="https://cpanel2.eutelnet.rs:2096/login/" method="POST"> <input type="hidden" name="login_theme" value="cpanel"> <b>Login</b> <input type="text" name="user" autocomplete="off" size="16"> <input type="password" name="pass" size="16"> ><input type="submit" value="Login" class="input-button"> <input type="hidden" name="goto_uri" value="/"> </form> I need somehow the variable "user" put together with the strings "@yahoo.com" so I can send to login page the whole "user" with the "@yahoo.com" Have somebody some idea? Quote Link to comment https://forums.phpfreaks.com/topic/175996-solved-how-to-change-the-content-of-a-variable/ Share on other sites More sharing options...
Alex Posted September 29, 2009 Share Posted September 29, 2009 You can do this with JavaScript, however a better alternative would be to alter what you have on the receiving php file. Instead of like: $user = $_POST['user']; make it: $user = $_POST['user'] . '@yahoo.com'; Quote Link to comment https://forums.phpfreaks.com/topic/175996-solved-how-to-change-the-content-of-a-variable/#findComment-927362 Share on other sites More sharing options...
.josh Posted September 29, 2009 Share Posted September 29, 2009 so what happens when the user doesn't have an @yahoo.com address? You would need to in your query that checks the user name, instead of doing ...where user = '$username' you would do ...where user like '{$username}%' Quote Link to comment https://forums.phpfreaks.com/topic/175996-solved-how-to-change-the-content-of-a-variable/#findComment-927367 Share on other sites More sharing options...
joda Posted September 29, 2009 Author Share Posted September 29, 2009 When you click on this link: https://cpanel2.eutelnet.rs:2096/login/ then you can see a web page with a log in option on some hosting server. On this server I have a web page and some E-mail address. So,if I wish to log in to my web mail I have all the time go to this page and write in my full mail address and password. I got an idea to design on my own page a log in field so I can direct write in my user name and password and so directly log in to my web mail.But,the problem is does the server didn't support other log in option just from the site below... So, I try to figure out some option how to send to the server the user name and password from my site which is on the same server to. Have someone some idea? Quote Link to comment https://forums.phpfreaks.com/topic/175996-solved-how-to-change-the-content-of-a-variable/#findComment-927373 Share on other sites More sharing options...
joda Posted October 1, 2009 Author Share Posted October 1, 2009 Thanks to all of you, I solved my problem with java script,here is the link: http://www.phpfreaks.com/forums/index.php/topic,271129.0.html Great work. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/175996-solved-how-to-change-the-content-of-a-variable/#findComment-928090 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.