Guest Posted February 6, 2004 Share Posted February 6, 2004 I'm using an older snapshot of osCommerce so much of this may have changed, but I thought I would ask if anyone else has tried this. I searched the forums but couldn't find any one trying to do this specifically. I have a Flash animation where I want users to come and sign up for the newsletter. I only want their name and email address, but I thought I would go ahead and create an account for them in the process. I created and tested a form that basically just submits the info to to /catalog/create_account_process.php and it seems to work just fine. Basically all I had to do is make all the required fields that I didn't need into hidden fields.. simple stuff, but it worked... <form name="account_edit" method="post" action="http://URL/catalog/create_account_process.php"> <input type="hidden" name="action" value="process"> <input name="password" type="hidden" value="nopassword"> <input name="confirmation" type="hidden" value="nopassword"> <input name="street_address" type="hidden" value="null null"> <input name="city" type="hidden" value="metropolis"> <input name="state" type="hidden" value="NA"> <input name="postcode" type="hidden" value="00000"> <input name="country" type="hidden" value="US"> <input name="telephone" type="hidden" value="1111111111"> <input name="newsletter" type="hidden" value="1"> <input type="text" name="firstname"> <input type="text" name="lastname"> <input type="text" name="email_address"> <input name="submit" type="submit"> </form> Now, I tried to recreate this simple form in Flash and I'm running into a problem. It seems to pass through all the variables except <input type="hidden" name="action" value="process"> which is obviously important because it tell the page to process the info. My thinking is that it may have to be a hidden field for create_account_process.php to recognize it, but I have to make it into a text field in flash. I know this is an unsual setup, but has anyone else tried anything like this? Is there a better way to go about doing it? Is there something special about the create_account_process.php page that won't allow me to attempt what I am attempting? Thanks for any help or insight. RT Link to comment Share on other sites More sharing options...
blueline Posted February 6, 2004 Share Posted February 6, 2004 It's actually really simple. Just change your code in your create_account php file to allow eithe a POST 'action' variable OR a GET 'action' variable. Then when you call the php file from flash just call create_account.php?action=process HTH -Chris Chris Sullivan Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.