39,316 Topics

Member Avatar for
Member Avatar for vivosmith

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 …

Member Avatar for vivosmith
0
1K
Member Avatar for tundewoods

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

Member Avatar for diafol
0
6K
Member Avatar for rotten69

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 …

Member Avatar for diafol
0
733
Member Avatar for garyjohnson

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

Member Avatar for diafol
0
3K
Member Avatar for vivosmith

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 …

Member Avatar for vivosmith
0
358
Member Avatar for mistryrak440

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?

Member Avatar for jkon
0
190
Member Avatar for Sophia_1

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 …

0
111
Member Avatar for Webville312

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 …

0
324
Member Avatar for janicemurby

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 …

Member Avatar for janicemurby
0
316
Member Avatar for Acurapassion

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

Member Avatar for cereal
0
524
Member Avatar for brianbabu

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 …

Member Avatar for cereal
1
175
Member Avatar for lightningrod66

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 …

Member Avatar for Ryan Mark
0
5K
Member Avatar for MissMolly

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 …

Member Avatar for MissMolly
0
219
Member Avatar for mexabet

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>"; } } ?> …

Member Avatar for mexabet
0
328
Member Avatar for Bensirpent07

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?

Member Avatar for Bensirpent07
0
170
Member Avatar for Hephaestus

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 …

Member Avatar for Pablo_3
0
440
Member Avatar for muralibobby2015

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 …

Member Avatar for mehul.jadav
0
134
Member Avatar for SimonIoa

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 …

Member Avatar for SimonIoa
0
247
Member Avatar for Sophia_1

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.", …

Member Avatar for Sophia_1
0
1K
Member Avatar for muralibobby2015

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

Member Avatar for diafol
0
1K
Member Avatar for MissMolly

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 …

Member Avatar for cereal
0
132
Member Avatar for bLuEmEzzy

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!

Member Avatar for pritaeas
0
213
Member Avatar for AntonyRayan

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?

Member Avatar for diafol
0
229
Member Avatar for ramsiva

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 …

Member Avatar for diafol
0
193
Member Avatar for MissMolly

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'])) { …

Member Avatar for diafol
0
227
Member Avatar for stephen_UK

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 …

0
118
Member Avatar for janicemurby

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 …

Member Avatar for diafol
0
355
Member Avatar for dhooley

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 …

Member Avatar for diafol
0
767
Member Avatar for Stefce

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 …

Member Avatar for Stefce
0
299
Member Avatar for ramsiva
Member Avatar for broj1
0
313

The End.