tommr Posted March 14, 2011 Share Posted March 14, 2011 I have a form that sends the user info to a database. One field it URL People are entering the url with out the http:// and when they do the script puts my domain infront of the www. Is there a way to preload the form imput field with the http:// or is there a way to strip my url from the results. Quote Link to comment https://forums.phpfreaks.com/topic/230634-preload-form-field-with-http/ Share on other sites More sharing options...
Maq Posted March 14, 2011 Share Posted March 14, 2011 Use the value attribute. Quote Link to comment https://forums.phpfreaks.com/topic/230634-preload-form-field-with-http/#findComment-1187496 Share on other sites More sharing options...
cssfreakie Posted March 15, 2011 Share Posted March 15, 2011 I assume you want to adds this http:// so you can put it in your database and output it correctly later? If so, don't rely on value, since people could accidentally delete it. With some php you can check if the url is like you want it to be, and adjust it accordingly. Quote Link to comment https://forums.phpfreaks.com/topic/230634-preload-form-field-with-http/#findComment-1187654 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.