39,321 Topics

Member Avatar for
Member Avatar for ChrisJ

I'm trying to modify a web script. Currently, upon uploading a video, in the upload Form, among other things, the uploader chooses a sub-category and enters tags and then submits/uploads. I'd like the sub-category that is selected, to also be searchable as a keyword. Presently, the 'videos' table has a …

Member Avatar for AndrisP
0
75
Member Avatar for SimonIoa

Hello i have a Ionic Angular project with PHP as backend. I created a search for users but in order for the project to run more faster i put a LIMIT of 20 users in the php function that calls the users and call the next 20 with an Angular …

Member Avatar for rproffitt
0
52
Member Avatar for skymhine

<?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); …

Member Avatar for skymhine
0
85
Member Avatar for yadao200011

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 …

Member Avatar for k99rs
0
1K
Member Avatar for stokie-rich

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 …

Member Avatar for cpptutslv
0
267
Member Avatar for vinothini_2021

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

Member Avatar for AndrisP
0
44
Member Avatar for Nicole_17

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 …

Member Avatar for Dani
0
172
Member Avatar for Trabelsi

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 …

Member Avatar for chiu
0
261
Member Avatar for ChrisJ

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 …

0
44
Member Avatar for wellho188

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.

Member Avatar for rproffitt
1
48
Member Avatar for Adolfo_1

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| …

Member Avatar for Dani
0
203
Member Avatar for Umar code

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 …

Member Avatar for Dani
0
47
Member Avatar for ChrisJ

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 …

Member Avatar for Dani
0
31
Member Avatar for ChrisJ

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?

Member Avatar for Dani
0
46
Member Avatar for Umar code
0
20
Member Avatar for hAPIcat

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 …

5
1K
Member Avatar for WpgnGaming

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 …

Member Avatar for pritaeas
1
93
Member Avatar for marmelade7

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 …

Member Avatar for Reverend Jim
0
81
Member Avatar for radhika_3

$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

Member Avatar for AndrisP
0
56
Member Avatar for naimake

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 …

1
30
Member Avatar for opjjuly

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: :@

Member Avatar for mervin_2
0
848
Member Avatar for javi2015
0
71
Member Avatar for sudharshan9xweb
Member Avatar for emiliolorenzo30

$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'>"; …

0
24
Member Avatar for emiliolorenzo30

<?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 …

0
43
Member Avatar for Kojo_3

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;

Member Avatar for pritaeas
0
25
Member Avatar for safost56

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 …

Member Avatar for pritaeas
0
20
Member Avatar for Kojo_3

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.

Member Avatar for rproffitt
1
42
Member Avatar for Issah_1

[ { "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", …

Member Avatar for Dani
0
34
Member Avatar for Shazz_1

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> …

0
139

The End.