• spam script searches for keywords

    I haven’t done PHP in years. I’m trying to figure out how to write my own anti-spam script that searches the posted $comments for spam keywords. Am I close? PHP Code: $spam = array(“viagra”, “cialis”, “sex”);       if($comments==”$spam”)      {       exit;       }       else {           $mail_fn=mail($myemail,$subject,$message_n,$headers);       } 

    Read More

  • php problems

    Hi, I’m having a few problems with php, still learning how it works. How do I stop a default date of 1970-01-01 being entered into mysql if the page is refreshed, I have tried using the header command but it …

    Read More

  • substr in an array

    This should do the job: PHP Code:     <?php     $dirs = [         “1234567890apples”,         “1234567890apples”,         “1234567890apples”,         “1234567890lemons”,         “1234567890lemons”,         “1234567890pears”         ];     $help = [];     for ($i = 0; $i < count($dirs); $i++) {         $name = substr($dirs[$i], 10);         if (isset($help[$name

    Read More

  • PHP Form, ajax and token question

    Hello, I am, for the first time adding a token to my php form(using also https), but I have a problem. Here is my workflow and where the problem happens: 1)Form shows up in html and a token is generated …

    Read More

  • Pass image and data to php via AJAX

    Hii fellow coders, Sihle here from South Africa, i am developing a website and i am trying to pass data to php via ajax and it works when its just input data from text fields however when i add an …

    Read More

  • Make tr clickable? No <a> (or it needs to be invisible)

    Hello! I am trying to list all data from rows in a table. That works. But what I want is for each row their to be a link specific to the id of the row! PHP Code: <style> body {     font-family: arial;   background-color: #47ccaf;   color: #105949; } </style> <center><strong> …

    Read More

  • PHP And Ajax success response problem

    Hello, I am having a problem and cannot work it out. I will show you partial php code as I do not have an error in the part above this as I simply output each validation errors as “$error[]=”: PHP …

    Read More

  • local address bar for websites which shows only local folders and files?

    That’s possible as you did it in your example. IF There’s no index.htm, index.html or index.php in that folder PLUS you deactivate some security settings of your webspace. (Which is absolutely not recommend). But if you really want to do it that …

    Read More

  • The simplest and the best login method

    I am learning PHP and I am working on writing a tube site script with Bootstrap. I have: domain.com/admin/ (it displays like this in a browser, but it is /admin/index.php) and domain.com/admin/login.php I was looking at quite a lot …

    Read More

  • How to avoid the database_connection on every single script.

    Hello, Is there any way to keep a database connection alive, that I don’t have to open an new mysql connection on every single script page before querying? Maybe Something like a mysql session ? (The reason why this is …

    Read More

Page 1 of 2,48012345»102030...Last »