39,323 Topics
| |
Hi, I have a "check_login" function which checks whether the user is logged in or not and if it isn't, redirects them to "login.php". When I try going to the page whilst logged in, it displays as it should. However, when I'm logged out and I try it, instead of … | |
Hi I want to change my carrier from Php to Java. I have 2 years of experience in php web development like wordpress, joomla tools. There after I changed company there on my company request, I learnt java on my own by seeing tutorials. They assigned me spring project I … | |
Hi, I am new to this concept. I have one master database. and 2 or more client databases. In master database, it has all the clients database username and password, Structure of the all client databases are same. Consider My Master Database is alpha, I have 2 client database , … | |
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! |
The End.