Reputation: 2741
I am using a drupal site.here is the code I have written in client side
<form method="get">
Email :<input type ="text" name ="email" size ="20"><br />
<button style="width:65;height:25" onClick='email_direction_data()'><b>Send</b></button>
</form>
when I click the button page will refresh.text field is used for enter the email address.I have written below code inside a drupal module file in a function to send an email.
drupal_mail('direction', 'invitation', $_GET['email'] , language_default(), $params);
but the text field content is not going to GET array when I click the button.what is the reason for that?is there any wrong in my code?
Upvotes: 0
Views: 172
Reputation: 27603
You are aware that you have just written the perfect spam-relay, now, have you?
In order to give you a secure and solid solution, I would be writing both a book on basic webdevelopment and drupal development in this answer.
I suggest you take a little more time to get to learn basic webdevelopment, security basics and some initial understanding of Drupal-development.
Upvotes: 0
Reputation: 3070
You need to have an html <input type="submit" />
button, not a <button>
tag.
Upvotes: 3