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...
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...
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')...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.