Jump to content
Html

Add ip log + send to a new page

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?

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

1) everytime someone provide email,  it should be added to email table ONLY if it does not exist already.

2)when a post is made It should check if email exists and its blocked status, IF blocked do not process else continue  to process.

Share this post


Link to post
Share on other sites

^ Right okay, I want something like that. Using the code I have supplied, i want to add to it. So what do I do?

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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.

Loading...

×
×
  • Create New...