39,320 Topics
| |
I am trying to generate an Excel file from PHP. I tried copying code from various sources on the internet, but they give me an error "Fatal error: Cannot redeclare class PHPExcel in ....../PHPExcel.php on line 44". My code is as follows: <?php // include PHPExcel require_once 'PHPExcel.php'; error_reporting(E_ALL); ini_set('display_errors', … | |
i am in some confusion.what i am trying to do is:- i have a form in multiples can posted in smae input field as shown name attribute is taken as array- `<input type="text" class="form-control" placeholder="Enter" name="a[]">` now this input can duplicated on clicking add more button and input area is … | |
hi all ive tried different things to solve this like remove any white space in php but i cant seem to get rid of this error can anyone suggest anything please. <?php include("connect.php"); ?> <?php // define variables and set to empty values $usernameErr = $emailErr = $passwordErr = $sexErr … | |
Good day, I just returned to my old subject, Computer Science. And i really need your help, i already start up a little codings but with this problem in loading up subjects. i just give you my project [https://drive.google.com/file/d/0B5qSnjDxuNSnTEZUUXRwWDdUcU0/view?pref=2&pli=1](null) hopely someone could do a big refreshing to my language skill. | |
Hi all, How to send messaaage to phone number from website using PHP...need urgent help. | |
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'])) { … |
The End.