Jump to content

Recommended Posts

I am posting from a form to a database ..

 

form :

 

<form method="post" action="scripts/adsense_go.php">
<input type="hidden" name=id value=<? echo $rows['id']; ?>>

<textarea class=edittext name=code>
<? echo $rows['code']; ?>
</textarea>

<br>

<input type="submit" name="submit" value="submit">


</form>

 

it is posting fine, although the code variable is a javascript little snippet and it does not seem to be posting to the next page ..

 

the page the form posts to:

 

//convert all the posts to variables:

   $id = $_POST['id'];
   $code = $_POST['code'];

   echo "$id,$code";

 

 

so the ID comes through but the code from the text area does not .. however if I type regular text  into the text area that does get passed over ..

 

is there a certain way i need to pass javascript or code snippets ?

 

I am making sure I can do this b4 I write the rest of the script which will update my database .. the javascript is adsense.

 

Link to comment
https://forums.phpfreaks.com/topic/132309-solved-form-posting-help/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.