Estoy realizando una lista de usuarios, hasta el momento he hecho insertar usuarios, visualizar y eliminar sin problema, pero al intentar editar usuarios, directamente no actualiza los usuarios, no me aparece ningun error en php ni en mysql, la verdad ya no se que mas mirar. Dejo mi código <?php if (!isset($_POST[‘oculto’])) { header(‘Location: index.php’); ..
Category : pdo
I have the following statement set up. I have replaces a long list of columns with * to make this more readable. FYI – I already know that there are questions similar to this. They use SINGLE select statements with a SINGLE parameter. Somehow this is different. $sql = <<<EOM SELECT * FROM table1 WHERE ..
I am in the process of converting a MySQL platform to MSSQL and in the process I’ve run into some issues, which I’ve been unable to solve. I have the following queries which I am trying to output: $queryDiskOperationLog = "SELECT * FROM Computer"; $queryCpu = "SELECT * FROM Cpu"; $queryGPU = "SELECT * FROM ..
I’m using this class code to insert data into the database: <?php Class User { private $error = ""; public function signup($post) { $data = array(); $data[‘name’] = trim($_POST[‘name’]); $data[’email’] = trim($_POST[’email’]); $data[‘pass’] = trim($_POST[‘pass’]); $pass2 = trim($_POST[‘pass2′]); if(empty($data[’email’]) || !preg_match("/^[0-9a-zA-Z_-][email protected][0-9a-zA-Z_-]+.[0-9a-zA-Z_-]+$/", $data[’email’])) { $this->error .= "Please enter a valid Email <br>"; } if(empty($data[‘name’]) || !preg_match("/^[a-zA-Z]+$/", ..
I want to connect a Postgres database with pooling:true. Can we do it with PHP new PDO option? If not are there any reliable options? I want to pass the below parameters(similar) while establishing the connection: Pooling=true;Minimum Pool Size = 2;Internal Command Timeout = 0;Command Timeout = 0; I cannot find any such details in ..
I got this error ‘Fatal error: Uncaught Error: Class ‘UserController’ not found in /home/dlotjryh/public_html/dashboard/login.php:4 Stack trace: #0 {main} thrown in /home/dlotjryh/public_html/dashboard/login.php on line 4 ‘ just when i upload my file, the page we working fine on my localhost, I checked the php verion, they are both 7.2 <?php include_once ‘classLoader.php’; ?> <?php $userC = ..
I am trying to generate a unique String with a function. feed the output into a different function that checks a database with PDO to see if that String of characters already exists and then parse it to be entered into a database using PDO. IF for some reason the query comes up positive the ..
error form I am stucking on this error for hours ,and i still didn’t figure out. I am trying to to get this lab soon. Your helps would be appreciated. Thank you guys. //controllers/chirp.php function post_add() { $chirp_content = safeParam($_POST, ‘chirp_content’, ”); $author = safeParam($_POST, ‘author’, ”); insert($chirp_content,$author); redirectRelative(“index”); } //Models/chirp.php function insert($chirp_content,$author) { global ..
error form I am stucking on this error for hours ,and i still didn’t figure out. I am trying to to get this lab soon. Your helps would be appreciated. Thank you guys. //controllers/chirp.php function post_add() { $chirp_content = safeParam($_POST, ‘chirp_content’, ”); $author = safeParam($_POST, ‘author’, ”); add_chirp($chirp_content,$author); redirectRelative(“index”); } //Models/chirp.php function add_chirp($chirp_content,$author) { global ..
I’m trying to bind variables to a PHP PDO query The variables $breed_var, $species_var & $year_var represent form inputs so they might be integers or empty/null Here’s my code : <?php $breed_var = 11; $species_var = ‘species’; $year_var = 2016; echo "<h1>Test</h1>"; $db_servername = "xxx"; $db_username = "xxx"; $db_password = "xxx"; $db_dbName = "xxx"; $pdo ..