The easiest and safest way to check whether an email address is well-formed is to use the filter_var() function:
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
// invalid emailaddress
}
Additionally you can check whether the domain defines an MX record:
if (!checkdnsrr($domain, 'MX')) ...

Also note that `$query_verify_email = "SELECT * FROM members WHERE Email ='$Email'"; ` is vulnerable to SQL injection

SQL injection is a technique often used to attack data driven applications. This is done by including portions of SQL statements in an entry field in an attempt to get the website to pass a newly formed rogue SQL command to the database (e.g., dump the database contents to the attacker). SQL injection is a code injection technique that exploits a security vulnerability in an application's software. The vulnerability happens when user input is either incorrectly filtered for string literal escape characters embedded in SQL statements or user input is not strongly typed and unexpectedly...

@ I created a function that retrieve and display some data from my database. Now i need to call that function when i press a button. Do i need to put the button in a form? Or do i use javascript onClick and call the php function.

@Alex_ios The danger of most tutorial on the web is that they introduce bad pratice and even worse: vulnerable applications. Which is easy to spot if you know what you are doing, but otherwise that is a hard thing to do

Setting aside for a moment the general spaghetti mess of nested `if` statements, inconsistent code indentation and the total lack of separation of business and presentation logic; - it is full of SQL injection holes (http://bobby-tables.com/) - passwords are stored in the database in plain text - the error suppression `@` operator is not an acceptable way to avoid checking individual return values. - reassigning the entire value of `$_SESSION` is highly likely to destroy other data in the session storage

@DaveRandom NP. You have provided a good tutorial here itself. Thanks for that. And no. But I guess that answer lies in this --> Header redirects require a full URL, Location: file.php is a standards violation and is liable to go wrong .. What does this mean?

@Alex_ios No, that's not the answer you need (I suspect you need mod_rewrite(), you are almost certainly using Apache) - what that means is that the HTTP spec says that Location: headers must be http://full/url/to/file.php instead of just /path/to/file.php. It's a common mistake brought about by the forgiving nature of HTML, and all modern browsers handle it as you would expect, but it's still a standards violation.

And this means --> ^/?regactivate.php$ /progams/phpfiles/regactivate.php [L,QSA] we are telling the system that it should go to /progams/phpfiles/regactivate.php when it is typed like this "http:www.exmaple.com/regactivate.php", right?

@Rikesh Probably going to be difficult. The first includes a database PK, the second doesn't. I know a lot of people do this but I really don't like it, it's really pointless and it brings in a whole bunch of messing around with generating URL slugs that are guaranteed unique. Plus the first looks like it's already rewritten, can't you just alter that rule?

@Eugene No, but those votes were cast before the mod vote. It is very rare that you will see just a single name closing a question, mods (most of the time) shouldn't make unilateral decisions like that.

@Alex_ios OK well the same rule should still work if you put it in the programs folder. Just put RewriteEngine on and then that line above in a file, name it .htaccess and upload it to the /programs folder

Actually maybe quite soon, I want a way to notify the user when the plugin is upgraded as well, and the moment Chrome is kinda crap, it just updates the plugin silently and it just stops working until you refresh the page

@AmbroseBwangatto because you are not used to it. try it a few times and you will find that it's actually much more readable. the first argument is a template. all the arguments following get inserted where it says %s (which means a string).

@pbvamsi It depends. There are few things to check. By default length of LONGTEXT is 4 gb (2^32 - 1). If data exceeds that limit or if actual physical memory is less than 4 gb data won't be inserted properly. Also query might be taking too long and times out. Protocol limitations should be checked also.

This is not complete list, of course. These things came up first. Anyway, I hate these kind of questions.