39,323 Topics
| |
Hi All, I havefollowing code and getting error "Parse error: syntax error, unexpected 'elseif' (T_ELSEIF) in C:\xampp\htdocs\SMR\index.php on line 13". Wehen i remove elseif and keep only if it just checks the first condition and ignor the second. When i put back elseif i get error. Please to fix this … | |
I have two MySQL tables, which I want to SELECT using a single PDO query and positional placeholders. I've been going through similar questions here to find a solution, but none seems to match the issues I'm having. The following code is the section of my script: <?php // query … | |
I have created a php form that connects to a MySQL database. This is working fine however I have added validation and this doesn't appear to be working correctly and still posts to the results to the database regardless of if they are validated or not. Any ideas? | |
This question specifically relates to PHP's Memcached library when specifying a server key and adding multiple keys at once. **Question one**: Is it true that PHP's setMultiByKey() doesn't take advantage of the memcached server's native support for setting multiple keys at once, but that the logic is on PHP's side … | |
function username_exists($username){ global $db; $sql = "SELECT 'username' FROM users WHERE 'username' = '$username'"; $result = mysqli_query($db, $sql); confirmquery( $result ); if (mysqli_num_rows($result) > 0) { return true; }else { return false; } } if(username_exists($username)){ $error['username'] = 'Username already exists'; } | |
Hi Everyone, I'm harshadgowda and i'm new to this forum. | |
please if anyone could tell me, how it would be possible, i want to save the content of a uploaded word document in database field with php, no problem with encrypted file like ( ´V z2Ö<Ö<ôÿÿÿÿÿÿ·üü?????ÿÿÿÿSSS8‹DÏLS¥9à1) as it shows if you open a word document in a browser. just want … | |
**my functions.php file** <?php function confirmquery( $result ){ global $db; if(!$result){ die("OUERY FAILED .".mysqli_error($db)); } } function redirect($location){ return header("Location:". $location); } function is_admin($username = ''){ global $db; $sql = "SELECT user_role FROM users WHERE username = '$username'"; $result = mysqli_query($db, $sql); confirmquery( $result ); $row = mysqli_fetch_array($result); if ($row['user_role'] … | |
function username_exists($username){ global $db; $sql = "SELECT 'username' FROM users WHERE 'username' = '$username'"; $result = mysqli_query($db, $sql); confirmquery( $result ); if (mysqli_num_rows($result) > 0) { return true; }else { return false; } } if(username_exists($username)){ $error['username'] = 'Username already exists'; } | |
I have set up for users online but some users showing always online . can you help anyone this my code ![zzz.png](https://static.daniweb.com/attachments/4/810ade1e5592a68b47aee955adb8de8f.png) <?php if ($Row->logged_in == '0') { if ($Row->last_login != '0000-00-00 00:00:00') { ?>Last Login : <?php echo date('d M Y ,H:i A', strtotime($Row->last_login)); } else { echo "<span … | |
I want a secured and server side way of interacting with two different servers namely SERVER A and SERVER B and i want database details and queries done on server B without reveling this database details to server A but yet server A functions based on responses it got from … | |
I'm trying to redirect user to "**userinfo.php**" after successful registration, but the browser terminates the redirection because it goes into endless loops. Moreover, I need your insight on if the script is secure or not. I need your help, please. Thanks. The following is the "**register.php**" script: <?php // include … | |
Please Help me. I am coding PHP using below code but out put is not perfect. i am also attach output picture below. <?php require_once 'core.php'; include_once("../fpdf182/fpdf.php"); $pdf = new FPDF(); $pdf->AddPage(); $pdf->setFont("Arial","B",16); $orderId = $_POST['orderId']; $sql = "SELECT orders.order_id, orders.order_date, customer.customer_name, customer.customer_mobile, orders.sub_total, orders.vat, orders.total_amount, orders.discount, orders.grand_total, orders.paid, orders.due, … | |
I Couldn't get $_POST['photo'] while echo. how can i rectify it. The method is post action="" if(isset($_POST['btn_submit'])){ extract($_POST); if(is_uploaded_file($_FILES['photo']['tmp_name'])){ $temp=$_FILES['photo']['tmp_name']; $file=time()."-".$_FILES['photo']['name']; move_uploaded_file($temp,"uploads/".$file); $file_sql.="photo='$file',"; } $rs=mysqli_query($con,"INSERT INTO details set name='$name',email='$email',aadhar_number='$aadhar_number',$file_sql room_no='$room_no',age='$age',phone_number='".$_GET['mob_no']."',address='$address'"); echo $_POST['photo']; | |
I want my users to be logged out automatically after30 minutes of inactivity. I also want to have all sessions destroyed. This is my login.php i have set cookies but does not work. if (isset($_POST['member_login'])) { $username = isset($_POST['username']) ? $_POST['username'] : ""; $password = md5(isset($_POST['password']) ? $_POST['password'] : ""); … | |
Hi Guys, I am new here I found this forum very well managed this is very satisfactory. I am new in affiliate marketing as well and want to create affiliate website and was looking for solution with data API. Could anyone help me in this regard, I found a solution, … | |
Hello, I'm a not a programmer at all and when I tried to build a LibraryBox for my school I didn't know it was a discontinued project. So I'm here with my MR3020 version 3 (the one that is not supported anymore by the project...) and I managed with my … | |
Hi All, How can i set the session time out in PHP if the user stays inactive for a certain time in a web page.Please help me to solve this.. Thanks | |
Hi, first of all let me thank anyone willing to help out with this. Jquery / Ajax update Span or Div by ID without refreshing page <?php } $select = $DatabaseCo->dbLink->query("select sh_id from shortlist where to_id='" . $Row->matri_id . "' and from_id='" . $user_id . "'"); if (mysqli_num_rows($select) == 0) … | |
Guys, I need your help. I need a Content Management System for creating an online investment platform. I want to create a website like www.wazobiaking.cash Thanks for you help. | |
I'm having this kind of error tho I already fixed the old issue but still i dont know why I am getting this error. **Please be reminded that I am currently newbie ug PHP and I am self studying** <?php session_start(); $con = mysqli_connect('localhost',); mysqli_select_db($con, 'user');; $s = "select * … | |
I'm struggling to build a PHP registration script using PDO prepared statements with positional placeholders. But the MySQL queries don't execute. `var_dump();` doesn't display any error. Please, I need your help to fix this. Your time and input are much appreciated in advance. Thanks. **register.php:** <?php // include configuration file … | |
Greetings to everyone, I am working as a freelance web developer, i have more than 4 years experience in osclass scripts. I am working in the osclass scripts for the past 4 years and have created nearly 67 sites in osclass, and have created many plugins, cuztomized themes, plugin cuztomizations … | |
I am a nyophyte to PHP, and I've seen this answered so many different ways that it is confusing. I have a combobox that is dynamically populated from a MySQL table ACTIVE in a database AIRCRAFT. Based on the selected AIRCRAFTREGISTRATION value from the combobox, I want to find and … | |
I have a website in laravel [instazood](https://www.iinstazood.com/) I want to apply limit clause with eager loading. I tried many other ways made r and d but could not get any solution. function fetchData() { $user = new User; $data = $user->with('comments'=>function($query){ $query->where('status',5); $query->limit(1); })->get(); } | |
I want to rewrite my URL from example.com/page/pipe?test to example.com/page/pipe/test My concept is just to remove the? at the end of the page and replace it with a / And I have written a rule to remove the .php extension of my files. below is what code looks like #REMOVE … | |
Hello guys i'm using [batflat](https://github.com/sruupl/batflat/blob/master/inc/core/lib/Image.php) for a small project. The thing is want to save/display webP images too, How can it enabled/possible?. I try **imagecreatefromwebp** without luck. Any idea/help will be awesome. Gracias! /** * Saves image * * @param string $path Path to location * @param string $type Filetype … | |
Hi all I'm trying to put together a room hire site, to be used by the lettings clerks, for our local Quaker meeting house and I've hit a couple of problems. I have an HTML form that, using data from a MySQL database and some JSON and JavaScript, when a … | |
Hello I have a simple for and PHP that uploads multiple images to a file. The problem is I want these images to be resized when they are uploaded. Does anyone know of a simple way to resize these images with PHP? I am not a professional so further explaining … | |
I am good in different languages, that is: Java, python, C#, VB.NET, php, javascript I have been programming for a while now it's about 2 and half years but the issue is when I focus on one language I tend to concentrate on it more than the others which leads … |
The End.