justice1 Posted September 27, 2009 Share Posted September 27, 2009 I have a web form created in front page for example <a shape="rect" href="mailto:example.com/[email protected]" shape="rect">example.com/update-mail.htm on it is a field called eMail. I want to pass data to this field via the URL. I have tried <a shape="rect" href="mailto:example.com/[email protected]" shape="rect">example.com/[email protected] but although I didn't get an error, it didnt appear to populate the field. Do I need to do something else ? Also if I wanted to pass two fields - what would the syntax be. Link to comment https://forums.phpfreaks.com/topic/175697-problem-pass-data-via-the-url/ Share on other sites More sharing options...
mrMarcus Posted September 27, 2009 Share Posted September 27, 2009 you would use $_GET, and put the following in the <input> tag: <input value="<?php echo (isset ($_GET['oldaddress']) ? $_GET['oldaddress'] : ''); ?>" /> where oldaddress holds the value you want to retrieve. Link to comment https://forums.phpfreaks.com/topic/175697-problem-pass-data-via-the-url/#findComment-925856 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.