39,316 Topics
| |
I input the previous inputted values via php variables into the value section of the input tag, but when I go to modify it and update it to the database, the value still stays the same. Is there anyways to combine the two , so that for instance when a … | |
I am having difficulty formatting the XML response from a php curl xml api for infobip. My code below loops sms to mobile numbers. But i want to format the XML responses to show the messages successfully sent and those that were not successful using a conditional if else statement. … | |
Hey everyone, I have posted a couple of threads looking for a plugin that gives some of the features of CakePHP if not all. However, the threads were going dead. I'm just looking for a good editor that is going to provide me an auto-completion code like HTML helpers, functions … | |
I am trying to allow my users to upload videos to my site and i have the php file upload but it will not work, it worked with images but once i changed it to video it stopped working this is the code <?php $allowedExts = array("mp4", "mov", "avi", "flv","mpg", … | |
Hi, I tried to get this code to work, and the gist is I am trying to allow the user to edit their inputs by allowsing them to edit past submissions. But even after I put "<?php echo ?>" tags in there, it still does not work. It worked perfectly … | |
Most of the email autoresponder provides various types of services, but a customazie autoresponder needed for my cpa business, i am try to make a autoresponder with server scripting language (PHP) , but i dont know how its possiable or not? | |
Hi, tried to save the textbox color T11 based on rating value but unable to save. For example, if the rating=Good, the textbox color T11 =green. But when i click save, T11 color goes back to black and select option goes back to "Please select an option". T11 textbox color … | |
Dear all, So I am trying to run a watir test application. Everything seems to be going well except I need to log each step that happens. I am able to log using the php script, but have not yet figured out how to write to a log file using … | |
at last i got the checkboxes to work and add to database but the only this i need advice on if i refresh the page the selected items disappear how can i solve this the php file is as follows <?php include("config/db_connect.php"); extract($_POST); $check_exist_qry="select * from interests"; $run_qry=mysqli_query($conn,$check_exist_qry); $total_found=mysqli_num_rows($run_qry); if($total_found … | |
"Can't connect to local MySQL server through socket '/tmp/mysqld.sock' (2)" Here's my code: <?php $dbhost=$_POST['dbhost']; // Host name $dbusername=$_POST['dbusername']; // Mysql username $dbpassword=$_POST['dbpassword']; // Mysql password $db_name=$_POST['database']; // Database name $tbl_name=$_POST['tablename']; // Table name $action=$_POST['action']; if($action == 'connect') { if(mysql_connect("$dbhost", "$dbusername", "$dbpassword") == true) { if(mysql_select_db("$db_name") == true) { echo('Connected … | |
my controller function public function destroy($id){ /* Deleting a product */ Product::destroy($id); // 1 way return redirect()->route('product.index'); } I tried using both the methods for deleting but it isn't deleting the records in MySQL although it does return with "true" Is there any configuration am missing? This is the form … | |
I have a form on our website that a user can fill out for custom product. I want the form data to be 1) stored into a mysql database AND after storing said data, 2) email the same data to our sales department. 1) The form data DOES get stored … | |
Hey guys, I have this forloop reading an array: $data = $_POST['data']; foreach ($data as $array) { foreach ($array as $key=>$prices) { $message .= ''.$prices.' '; } $message .= '<br>'; } It currently displays like this: item1 item2 item3 item4 item1 item2 item3 item4 etc Is there any way to … | |
I'm trying to automatically populate a navigation menu based on available categories in the database. As follows is my code: <?php $sidenav = query("SELECT cat_id, cat_name FROM prod_cat ORDER By cat_name LIMIT 20"); if ($sidenav != false) { $sidenav->execute(); while($result = $sidenav->fetch(PDO::FETCH_BOTH)) { echo "<div class='left_button'><a href='/customcms/products/index.php?page=list-product&category={$result['cat_id']}'>{$result['cat_name']}</a></div>"; } } ?> … | |
So I haven't used preg_match too terribly often but I found this example online for parsing a page to get text from div's: preg_match("/<div class=\"topic\">(.*?)<div class=\"content\">(.*?)<\/div>/", $html, $matches); Now everything looks familiar to me and I understand until I see the (.\*?) What role does it play in preg_match? | |
Hey guise, I have a uni assignment; setting up backend code for a tour company website. Everything's gone swimmingly but I've run into issues implementing a system for rating the tour packages. Implementation for the rating system: user clicks rate button, the rating score is added to a running total … | |
hello... i was installed wordpress3.0. from that day i am getting this error when i am open wordpress getting this error. then i reinstalled wamp. but still problem. this is the error [CODE]Apache HTTP Server has encountered a problem and needs to close. We are sorry for the inconvenience. these … | |
Hello the same issue has troubled me in the past. I have a autocomplete script that the user chooses people to send them something. I use to store multiple values in one row. That is the id of the selected people that the user chooses. Thats not the proper thing … | |
Hi everyone, am trying to import excel file to 2 tables using php but unable to do so. The 1st table is Kra (kraid,kra) and 2nd table Kpi (kpiid,kpi,kraid). The foreign key for Kpi is kraid. When i import the file the following message appears "Invalid File:Please upload CSV file.", … | |
hello..... google provided translated code. i want to restrict dropdown languages. i want to show only 5 languages. i tried a lot. anybody help me plz. how to show selected languages.here is the code. displaying all languages in drop down. i want to display only 5 languages...how to do?[CODE]<html> <head> … | |
This code displays the contents of an array in the format: 1 2 3 4 1 2 3 4 etc... $data = $_POST['data']; foreach ($data as $tempone) { foreach ($tempone as $key=>$temptwo) { echo "$temptwo", "\n"; } echo "<br>"; } How can I get those results and use them in … | |
Hi Guys, Do you have any ideas on how to create and read barcodes in PHP? Ive been researching it but still I did'nt get answers. Thank You! | |
Hi In my table , I have date of birth value like 1991/10/21, I want to display that date of birth like: 21/10/1991(Twentynineth October One thousand Nine Hundred Ninety Nine) date of birth in numbers and in Characters also. How to do that, it has to do dynamically? | |
below is my php and html code <div id="entry1" class="clonedInput"> <h3 id="reference" name="reference" class="heading-reference"></h3> <div id="domain_section" class="notranslate"> <div class="form-group"> <label class="col-md-3 control-label label_pro" for="inputDefault">Product:</label> <div class="col-md-6" > <select class="form-control populate select_pro" name="select_pro[]" id="select_pro" data-plugin-selectTwo > <?php //`product_id`, `product_name`, `quantity`, `cat_id`, `banner`, `desc`SELECT * FROM `products` $get_scategory = mysql_query("select * from … | |
This script works fine, but there's a part I'm not sure if there's an easier / better way to do it. The part I'm talking about is commented in the script. Also any general advice on improvements if there are any to be would be cool. <?php if (isset($_POST['submit'])) { … | |
| In this pseudo example I have a table called **carsales** which contains 2 columns called **date** and **make** Every time a salesperson sells a car they enter the date in the **date** column and model of the car for example Ford, Honda, Audi in the **make** column. The required output … |
hi i have a script created for me and im attempting to add user_id so it it gets the userid from the users table so far i have done CREATE TABLE IF NOT EXISTS `checkbox` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(50) NOT NULL, `male` varchar(10) COLLATE utf8_unicode_ci NOT … | |
Ok so im looking to create a simple booking system as part of my Final Year Project. I have a locally hosted mySQL database created and linked to using php. I have created a databse called reservations with 3 tablels (Available, reserves and confirms). Basically what I am looking to … | |
Hello i want to make notification when new message is received, i have a row `seen` with values `0` and `1` if is 0 then its unread else is seen i got this code but when it displays the output shows the number of rows but for example i have … | |
Please help me how to do click button to display select box. at the same time add and remove select box |
The End.