39,319 Topics
| |
<?php if(isset($_SESSION['id']) ) { ($_SESSION['id']) { //echo "you're login"; } echo "<form action='upload.php' enctype='multipart/form-data' method='post'> <br>Qr Code: <p><input type='file' name='file' > <p><input type='submit' value='Upload' name='submit'> </form>"; } ?> <?php $statusMsg = ''; // File upload path $targetDir = "qr_code/"; $fileName = basename($_FILES["file"]["name"]); $targetFilePath = $targetDir . $fileName; $fileType = pathinfo($targetFilePath,PATHINFO_EXTENSION); … | |
Can someone or anybody help me on how to auto calculate total price in the table? Please see the image below: ![Please take some time to see Image.png](https://static.daniweb.com/attachments/4/cabbe5092985551aefff1784794b148e.png) Here's my code (I will included only the code that I used in the Image: HTML: <div class="col-12"> <div class="col drop"> <table … | |
Hi guys, On my website that I'm creating I would like to add a personal profile. Where each user who is logged in can change their details, upload an profile picture and change their password or username. Are there any good youtube videos or tutorials that are around to help … | |
i have form., in that form i have input field and confirm button., i just want to change the confirm button color if input has some value otherwise the button will be normal., i have tried many method but didnt work.. please help me to fix that problem | |
I need help..Even after doing extensive research and youtube videos.. I can't seem to get this. This is just for a hypothetical situational based project i'm doing to demonstrate the functionality of storing fake credit card info in a mySQL database from a PHP file. The goal is: Once a … | |
Hi, I try to update a table through a list with checkboxes , but still this error message appear:"SQLSTATE[HY093]: Invalid parameter number: parameter was not defined" this my source code: the script checkbox.html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico"> <meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0"> <!-- jQuery … | |
I’m trying to modify a web script where a drop-down works successfully. How can another drop-down field appear only after a selection has been made from the first drop-down list? Here’s the current code: <?php if ($pt->page == 'category' && $pt->show_sub == true) { ?> <div class="pull-right col-md-3 no-padding-left"> <select … | |
Hello I just want to ask for some help regarding with the undefined index error. The image are uploaded / stored in database but the image cant store in folder directory. Please can someone help me. This is for my project. Thank you guys in advance. | |
Hi ... how can i have url seo friendly from database ?? Example: localhost/myshop/product.php? id = 95 Or: https://www.myshop.it/product.php?id=95 I have done several tests with .htccess but it doesn't work. I would like to have as follows: https://www.myshop.it/product.php/shoes-armani Or: https://www.myshop.it/shoes-armani tbl_product +-------------+----------------+-----+----------------+ | p_id |p_name | p_name_friendly| +-------------+----------------------+----------------+ | 95| … | |
deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in <b>Unknown</b> on line <b>0</b><br /> <br /> <b>Warning</b>: Cannot modify header information - headers already sent in <b>Unknown</b> on line <b>0</b><br />. Please the … | |
I am trying to display something on web pages that show this in the url: "sub__" for example: ...com/videos/category/1/sub__536. It was suggested I try this code: $page = basename($_SERVER['PHP_SELF']); if ($page=="....") { echo Hello World; } elseif ($page=="....php") { Some Other code... } but I don't know where to place … | |
This php has subcategory code on line 149 and 215 https://pastebin.com/zgbELKJf can you tell me if this file outputs a subcategory page? | |
I am looking forward for all my problem to be solved on this platform | |
Hi, everybody. I write bots and decided to share my experience of writing bots on the [Chat API] platform, maybe it will be interesting to someone We’ll tell you how to write a simple bot on PHP using API WhatsApp. A demo bot will react on commands of ordinary Whatsapp … | |
I have a issue with the code below what I am trying to get the image from gifts table with matching the user_gifts id with the gifts_id but can not seam to get it right anyone god any ideas thanks. public function get_my_gifts($user_id) { global $db; $my_gifts = []; $get_my_gifts … | |
I'm trying to figure out why the regex code below gives me two different results, depending on where I use it. [A-Z]{0,1}[a-z]{2,}[:] **On phpliveregex.com, the above regex code matches the following:** narrator: Narrator: **When used in preg_match, the above regex code matches the following:** narrator: Narrator: NARRATOR: PS I'm not … | |
$query = "INSERT INTO TB_RADIOLOGI (ID_PASIEN, ID_PENDAFTARAN, TGL_PERMINTAAN, JENIS_PERMINTAAN) VALUES(?, ?, ?, ?);"; foreach($_POST['JENIS_PERMINTAAN'], reverse_tanggal($_POST['TGL_PERMINTAAN']) as $idx=>$val){ $params = array($_POST['ID_PASIEN'], $_POST['ID_PENDAFTARAN'], $val ); //--disini input id_pasien=0001 sesuai contoh di form sqlsrv_query($GLOBALS['conn'], $query, $params); } there is an error : Parse error: syntax error, unexpected ',' in Please help | |
Hi, I need your help. I am a newbie in PHP and my update statement is not working despite seeing all the values from the console. My code for the bootstrap modal file: <!----------------------------------- modal begin --------------------------------------> <div class="modal fade" id="editmodal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div … | |
hey guys, i was wondering, is there any other way to hide .php extensions without using .htaccess? Instead of: [url]http://www.example.com/index.php[/url] Visitors to your site will see: [url]http://www.example.com/index/[/url] my webhost does not support the .htaccess thingy. :yawn: :@ | |
hi every body Who to do send data to php mvc with ajax? | |
i need code for insert multiple rows into database please help me | |
$sql = "SELECT cl_id, cl_name, cl_service_description, cl_contact, cl_dept,status, expiry_date from contract_list"; $result = $conn-> query($sql); if($result->num_rows > 0) { while($row = $result-> fetch_assoc()) { echo "<td>$row[cl_id]</td>"; echo "<td>$row[cl_name]</td> "; echo "<td> $row[cl_service_description]</td>"; echo "<td>$row[cl_dept]<td>"; echo"$row[status]"; echo "<td>$row[cl_contact]</td>"; echo "<td>$row[expiry_date]</td>"; echo "<td></td>"; echo "<td><div class=table-data-feature>"; echo "<button class='item' data-toggle='tooltip' data-placement='top' title='send'>"; … | |
<?php require('cns.php'); $conn = mysqli_connect("localhost", "root", "", "cns"); if ($conn-> connect_error) { die ("Connection failed:". $conn-> connect_error); } $sql = "SELECT cl_id, cl_name, cl_service_description, cl_contact, cl_dept,status, expiry_date from contract_list"; $result = $conn-> query($sql); if($result->num_rows > 0) { while($row = $result-> fetch_assoc()) { echo "<td>$row[cl_id]</td>"; echo "<td>$row[cl_name]</td>"; echo "<td> $row[cl_service_description]</td>"; echo … | |
Please let me give more details $datetime1 = new DateTime($orderdate); $datetime2 = new DateTime($currdate); $interval = date_diff($datetime1, $datetime2); $interval->format('%m months'); $months_diff = $interval->format('%m months'); for($i = 1; $i <=($months_diff+1); $i++){ $totalFees = $fees + $totalFees; | |
Hi there, I have been a developer since 1999 but I was in an auto accident and have a severe traumatic brain injury which hasn't helped me write php code at all...LOL But I'm still here and trying. I need some help with file uploading in php. It's giving me … | |
Hello. My name is Eben and I'm a beginner in php. I've been getting this error message "Notice: A non well formed numeric value encountered in C:\wamp64\www\Project\FeePayment.php on line 145". This is the code; for($i = 1; $i <=($months_diff+1); $i++){ $totalFees = $fees + $totalFees; Please I need help. | |
[ { "regionCode": "0", "": { "amount": "291377681.35999995", "kwh": "5589027.089364664", "numberOfPay": "43876" } }, { "regionCode": "3", "AZARE Region": { "amount": "13494424.550000023", "kwh": "286885.42398979055", "numberOfPay": "3863" } }, { "regionCode": "7", "BAUCHI Region": { "amount": "55739882.11", "kwh": "1297297.378804144", "numberOfPay": "11199" } }, { "regionCode": "5", "BUKURU Region": { "amount": "77074190.08000007", … | |
| I have a problem to do price data and i don't know to insert it into the coding this is question ![Screenshot_2021-09-23_015318.png](https://static.daniweb.com/attachments/4/7cc52f3407b6a914f395c8aaa4644c69.png) this is the coding that i have made <?php $page_title = 'Yoho Express!'; include ('includes/header.html'); ?> <form action="q2.php" method="post"> <p><h1><fieldset><legend>Enter your information in the form below:</legend></p></h1> <p><b>Departure day:</b> … |
Good morning, i have a section in a php page as per code: <div class="container section" id="afterHeader"> <div class="row"> <div class="tabs movies"> <a class="style1">1^ WEEK</a> <ul> <li><a href="#thu">GIO</a></li> <li><a href="#fri">VEN</a></li> <li><a href="#sat">SAB</a></li> <li><a href="#sun">DOM</a></li> <li><a href="#mon">LUN</a></li> <li><a href="#tue">MAR</a></li> <li><a href="#wed">MER</a></li> </ul I would need to replace the part <ul> </ul> … | |
Hi, I've been trying to troubleshoot this iframe issue all day. I need help. First, the issue is an iframe on the frontpage is to load a php script for an Video ad. Second the frontpage is a php search script. Now, when you visit the frontpage initially everything is … |
The End.