Recent content by Rocky1948

  1. R

    Problem with session!

    I have some code that passes some variables using sessions. The program I have written allows the user to choose 2 parameters which I have called event & mood and these are posted ($_POST) and used in the next file to create a query based on these parameters. Everything works OK here, then the...
  2. R

    SYNTAX error: unexpected 'fname' (T_STRING)

    I am trying to write some code to extract some information from a form using PDO. the line that gives the error is: $parms = array( 'fname'=>$fname, 'sname'=>$sname, 'email'=>$email, 'addr'=>$addr, 'phone'=>$phone...
  3. R

    SQLSTATE[42S22]: Column not found: 1054 Unknown column 'name' in 'where clause'

    I'm baffled by this error message This is the line in question: $SearchQuery="SELECT * FROM emp_record WHERE ename LIKE :ename"; I have double checked the database and the variable ename is there. This is the complete file: <?php if (isset($_GET['Search'])) { try{ require_once('db.php')...
  4. R

    Preg_match check for Yes or No

    I am trying to check whether the answer to the option YES or No on a form. I tried this but it doesn't work: if preg_match('~^(?:Yes|no)$~i', $rewd]){ $rewd = mysqli_real_escape_string ($dbc, $trimmed['rewd']); } else{ echo '<p class="error">Please answer Yes or No!</p>'; } Here is the...
  5. R

    PHP Post problem

    I have been updating a website that I run using a program called Site Designer by Coffeecup Software. When using php on this software you have to paste in the php code into a special area and set up the page in a special way. My problem is not specifically regarding that, but the fact that...
Back
Top