Jump to content

Trying to get the variable from a form "post"


randini

Recommended Posts

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated