randini Posted December 16, 2013 Share Posted December 16, 2013 I am trying to make a page so my affiliates can enter their paypal email address in and it saves it in the database. I already have the fields added to the database the only problem I have is getting the variable from the form to the next .php file so it saves it. Here is what I have tried.... $paypal = $_GET['paypal']; // does not work so I tried the next line $paypal = $_POST['paypal']; // does not work so I tried the next line $ca->assign('paypal', $paypal); // does not work either It could be that one of the lines above does work and I just have the query for the database wrong. Here is what I wrote to make it save it in the database.... mysql_query("UPDATE tblclients SET paypal_email = $paypal WHERE id=".$ca->getUserID()); Also, just so you can see everything, here is the form code I am using.. <form class="form-horizontal" method="post" action="affiliate_user_save.php"> <fieldset class="control-group"> <div class="control-group"> <label class="control-label" for="paypal">PayPal Email:</label> <div class="controls"> <input type="text" name="paypal" id="paypal" value="{$paypal}" /> </div> </div> </fieldset> <input class="btn btn-primary" type="submit" name="save" value="{$LANG.clientareasavechanges}" /> </form> Any help would be great. I have posted this one other time but it was deleted by someone. If you are the someone that deleted this, please at least tell me why I can't post this. Of course it may have just been a computer glitch lol. 0 Quote Link to comment 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.