Jump to content

Add ip log + send to a new page


Html

Recommended Posts

What do you mean check and store the email that was removed from posting?  All you're doing is trying to list the records that are in a table.  Do you mean you want to skip records that have an email address that you blocked or something, so that existing posts in your database that were made with that email no longer appear?

Link to comment
Share on other sites

The point in this is to get the email restricted. Where is the email going to be stored? In the email table. So the forum form will validate that the email can't be used.

Link to comment
Share on other sites

And you want to validate the email, when, when you display existing posts?  Wouldn't it make more sense to do that when someone creates a post so that you don't allow them to create it in the first place?  I'm trying to figure out why you're doing anything at all on a page which displays data from the database instead of the pages that add the data to the database.

This is still aside from the fact that thee code you showed is not even getting the forum posts at all, it's only getting the email list and that's all.

Link to comment
Share on other sites

Do it one step at a time in separate php page.

1)inserting email if it does not exist

Select query where email = email supplied, use count of rows, if greater than zero it exists, no need to add to email table.

Else INSERT query to add into email table.

2) validate block status use SELECT query to get blocked status of current email provided if true stop/end/terminate, else store, show whatever.

Edited by dsonesuk
Link to comment
Share on other sites

I don't know what to do get the result. I thought that by having the code Select from email, using the the other option, what ever it is called now, I don't remember, on the previous page, https://www.w3schools.com/sql/func_mysql_isnull.asp

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...