Jump to content

Dont know php but i need help please


sulak

Recommended Posts

Hello all,

 

I am new here and also new to php but i have an issue and I would like some assistance please.

 

So here it is:

 

I have a site with a guest book but I am gettin a lot of spam since the guest book automatically post the comments.

Guest book comments are also control from my admin backend (so i can edit, approve, delete from there)

the guest book form starts like this: <form name="mygform" action="saveguest.php" method="post">

this means once the data is processed it is control by saveguest.php

 

i would like stop the comments from being posted automatically and has to be approved from my admin area before they are visible on the front end.

 

can someone pls tell me what to change in saveguest.php to avoid comment posting without appoval?

I have attached the file for review. not sure if this is clear enough but as I mentioned before "I am new in this world"

 

thanks in advance

 

 

[attachment deleted by admin]

Link to comment
Share on other sites

for this u can do one small change in the mysql database and create one column with default value of 0 for it to all the messages table in your database..

 

so when ever it is zero u dont display the comment in the site and when the admin approve it the value of the zero should change to 1 and then all it will do..

 

Link to comment
Share on other sites

Dont mean to be a novice here but could you be more specific with details?

as I am not sure how to even get started.

 

here is a pic of the db tables then control the messages...

 

thanks again,

great pics of india on ur blog

 

for this u can do one small change in the mysql database and create one column with default value of 0 for it to all the messages table in your database..

 

so when ever it is zero u dont display the comment in the site and when the admin approve it the value of the zero should change to 1 and then all it will do..

 

[attachment deleted by admin]

Link to comment
Share on other sites

what for you are using the status field??

if it is free u make the default value for the filed to be 0..

 

 

this is what that u are supposed to do..

1) when a new message/comment is entered. u need to enter that in the table and keep the status value as 0 or unpublished..

 

2) when you approve this in the admin panel then if u like this u modify the status value to approved or 1

 

3) to make them visible in the front end just display those messages for which the status is approved or 1..

 

4) if ur using the status for some other thing, then try creating a new field value for this and use it..

 

hope u have got it..

 

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