Hi all, I am very new to PHP and MYSQL and have a class assignment I need help with. I am trying to make a page with an HTML form that will update my MYSQL database. You can view my pages online here: [URL="http://baileyjumper.aisites.com/Scripting-Week7/homework4/exercise-five.php"]http://baileyjumper.aisites.com/Scripting-Week7/homework4/exercise-five.php[/URL] I need help with the "Edit" section, if you look online. Here is the code for my Edit page: [CODE=PHP] <?php $hostname = "localhost";//host name $dbname = "baileyjumper_imd203";//database name $username = "baileyjumper_imd";//username you use to login to php my admin $password = "chris4ever";//password you use to login //CONNECTION OBJECT //This Keeps the Connection to the Databade …

Member Avatar
Member Avatar
+0 forum 19

if its possible please give me instructions Thank you in advance

Member Avatar
Member Avatar
+0 forum 6

hi, i have installed XAMPP, but i would like to run my localhost from another computer..

Member Avatar
Member Avatar
+0 forum 10

I would like to fill in the empty spaces of a csv column and its in one column using phpexcel I have added a demo for your viewing: The flow check B2 is its not empty go the next B3 if B3 is empty take value from B2. Here is demo: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> </head> <body> <table width="200" border="1"> <tr> <td>Apple</td> </tr> <tr> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> </tr> <tr> <td>Banna</td> </tr> <tr> <td>&nbsp;</td> </tr> </table> <p>&nbsp;</p> <p>The final outcome</p> <table width="200" border="1"> <tr> <td>Apple</td> </tr> …

Member Avatar
Member Avatar
+0 forum 4

Without going into each of the products pages and setting sidebar to appear on left, how can I code it into the woocomerce product single page using php? http://www.mabridalplus.com/?product_cat=bridal-wear

Member Avatar
Member Avatar
+0 forum 4

I have a unix timestamp for each cooment in my database. I want to output the user date and time depending on their location, or timezone. How do I do that properly?

Member Avatar
Member Avatar
+0 forum 3

hi, I am stuck trying to figure out how to build a table to display agents names, (that I already have, mysql table etc...) but now I need to add columns dynamicaly. I need to add (programs in witch agents are enroled, and a status of the program ( in-progress, not-done, etc). The part that I can figure out is where would I save the status of the agent in the program. I have enroled-agents table: (id, name, email) displays a basic mysql-php-html table; then I have programs table: (id, name, description, avaiable-status) When i place them together, where how …

Member Avatar
Member Avatar
+0 forum 4

I have a database of pictures, and votes. The pictures database has up_votes and down_votes culomns. I want to create a system using MySQL to get hot and trending pictures just like 9Gag. How can I do that?

Member Avatar
Member Avatar
+0 forum 13

I have a table called `volume_issue` that looks like this: +----+-------------------------------------------------------+-----------------+-----------+---------------------+ | id | url | journal_title | issn | volume_issue | +----+-------------------------------------------------------+-----------------+-----------+---------------------+ | 1 | https://www.ajol.info/index.php/asan/issue/view/17048 | Africa Sanguine | 1560-8646 | Vol 19, No 2 (2018) | | 2 | https://www.ajol.info/index.php/asan/issue/view/16693 | Africa Sanguine | 1560-8646 | Vol 19, No 1 (2017) | +----+-------------------------------------------------------+-----------------+-----------+---------------------+ I am trying to extract all records associated with the urls listed in the variable url and insert them in a table known as `citations`. The code i am using to do this lookw like this: <?php $query1 = "SELECT * FROM volume_issue where …

Member Avatar
Member Avatar
+0 forum 10

Hello everyone. I have a string that looks like this (Mango, fruits, and), (Maize, cereals, and), (Mango juice, beverages, and) I would like to convert the above string using php to something similar to this: (Mango[fruits]) AND (Maize[cereals]) AND (Mango juice[beverages]) How can i achieve this in php. I have looked at PHP string replace, substr functions but cannot figure out how to use them to solve my problem. Thanking you in advance

Member Avatar
Member Avatar
+0 forum 27

I have a function that I need help with. The purpose of the function is to sort an array of objects by field. This function was using the PHP function create_function which is now deprecated in PHP 7.2. I've been trying to rewrite the function, but the results return null. Any help in figuring out what's wrong is greatly appreciated. function _list_sort(&$objects, $on, $order = 'ASC') { usort($objects, function(&$a,&$b) use($on, $order) { return ($order === 'DESC') ? strcmp($a[$on],$b[$on]) : strcmp($a[$on],$b[$on]); }); }

Member Avatar
Member Avatar
+0 forum 1

I have css animation for preloader. I need help to update content smoothly without redirecting page, using following functions $(window).on("popstate", function() { }); window.history.pushState({path: ""},"",""); Update link & content of next page after preloader progressbar animation ends `webkitTransitionEnd ` without redirecting to page. Need help to complete following functions function changeUrl() { } function updateContent() { } ## Html/CSS/Js code (jsfiddle links) ## [after adding 'loading' class to body tag](https://jsfiddle.net/cnv1drx8/1/) ([Full Window](https://fiddle.jshell.net/cnv1drx8/1/show/)) [after removing 'loading' class from body tag](https://jsfiddle.net/v3arfeum/1/) ([Full Window](https://fiddle.jshell.net/v3arfeum/1/show/))

Member Avatar
Member Avatar
+0 forum 3

Hello, I am looking for a new IDE. I am currently using netbeans to develop a website in php/mysql. I like a lot of things about netbeans, but I don't like that it doesn't come with built in compilers/debuggers. You have to manually go and add/link them on a language-by-language basis. This isn't too bad in theory, but sometimes it doesn't work like it should, which can cause a huge headache. I had a hell of a time getting a debugger to work for php. I am now adding javascript/jquery to the website, and discovered that the debugger I already …

Member Avatar
Member Avatar
+0 forum 3

Hi, I am a legacay (cobol) developer and wants to learn how to build websites. For this I decided to do a little project for myself. The site would be a places/travel tracker kind. It would show a certain map (ex, London, Taiwan, Greenland). Then you can click on a city on the map which will show pictures/videos/comments of you in that city. Map changes color for the city you have visited or maybe a pin. I have search the web and mostly there are world tracker. I would want a country based one. So my questions are: 1.) What …

Member Avatar
Member Avatar
+1 forum 4

Hi everyone I have a little problem that I'm sure someone here can help me with. I have a web page with a text input field and a couple of submit button. The user would enter something in the text field and then click on one of the buttons. Each button opens a new page. But all of this is pretty standard coding, so I'm trying to do this a bit differently... When the user first arrive at this page, the two button are not visible. The user then enters something, which is checked with PHP, using [CODE]if (isset($_POST['Submit'])) { …

Member Avatar
Member Avatar
+0 forum 5

I am writing a CLI application in PHP and I can't seem to understand why my MySQL Class that uses PDO will not get past the PDO or even error. I have made sure error reporting was enabled in my php.ini. PHP version is 7.1.3 on Windows 10. Here is the MySQL Class. Please note it is not the whole class. <?php namespace App\Database; class MySQL { private $Host; private $DBName; private $DBTable; private $DBUser; private $DBPassword; private $DBPort; private $PDO; private $parameters; private $bConnected = false; public $querycount = 0; function __construct($DBName, $DBTable) { $this->Host = getenv("DATABASE_HOST"); $this->DBPort = …

Member Avatar
Member Avatar
+0 forum 12

Hi Guys. I'm having a serious problem that is holding me back. I have a file which is a user dashboard and this file gets data from another php script file which is called by a user login screen when a user clicks login. The file verify the credentials then if correct that its start to pull some data from the database. The problem is that now there are some users who don't complete their registration process which some stop where they need to make their payments so their accounts are kept with a status of pending which indicate that …

Member Avatar
Member Avatar
+0 forum 5

Dear Friends, I have a string with structure $selectedTime = "2017-02-10 07:00,2017-02-10 08:00,2017-02-11 09:00"; I need to convert it as   {"2017-02-10":[{"start":"07:00"},{"start":"08:00"}],"2017-02-11":[{"start":"09:00"}]} any idea ? please advise asap Thanks Anes

Member Avatar
Member Avatar
+0 forum 1

Hi DW. I'm trying to post data without refreshing the page using the ajax, and its works fine the problem is that on the response I also get the array data that I posted to my php file then at the end of response is the returned data which is echoed from my php file. I post 3 data which are from my form but the problem is that on my response this data is also shown when I do `alert(response);` please check attached image and you will see that on the alert response firstly the array of what I …

Member Avatar
Member Avatar
+0 forum 1

Getting an empty drop-down list by the following code. Trying to fetch names from the department table. Using an oracle Database... <label for="department">Department</label> <select class="form-control" name="deptname" id="deptname"> <option selected disabled></option> <?php $dbUser = "..."; $dbPass = "..."; $dbConn = "(DESCRIPTION = (ADDRESS = (PROTOCOL=TCP)(HOST=...)(PORT=1521))(CONNECT_DATA=(SID=...)))"; $conn = oci_connect($dbUser, $dbPass, $dbConn); $sql = oci_parse($conn,"SELECT Department1.NAME FROM Department1"); oci_execute($sql, OCI_DEFAULT); ?> <?php while (oci_fetch($sql)) { ?> echo '<option value="<?php echo oci_result($sql, 'NAME')?>"></option> <?php }?> </select>

Member Avatar
+0 forum 0

I am developing a inventory management web application using php and mysql. This application will runs on different locations. while any one place disconnect the internet at the time data will be land in local database and when active internet that data automatically synchronizing the remote database. is there way pls let me know. thanks and advance.

Member Avatar
Member Avatar
+0 forum 7

I have spent a lot of time on this question, namely, how to programatically use a PHP script to send a PDF document to the printer without launching the Adobe print dialog that results from using arcord32.exe (the adobe reader). PHP has some useful classes for creating PDF's, i.e., the FPDF library, but printing the created file is a bear. For Windows XP and Windows 7 servers, the one open -source solution which works is to use the PDFBOX java library. Here are the steps. 1) Download the latest java pdfbox binary: http://www.apache.org/dyn/closer.cgi/pdfbox/1.7.1/pdfbox-app-1.7.1.jar and put it in a directory. I …

Member Avatar
Member Avatar
+6 forum 14

Hello, I am trying to prevent my form, from submitting if the file is not an image type file but i keep failing, the array that i am using keeps displaying regardless of the files type. Any help would be grateful. <?php $Manufacturer = $_POST['Manufacturer']; $Brand = $_POST['Brand']; $Model = $_POST['Model']; $Type = $_POST['Type']; $Wheel = $_POST['Wheels']; $Colour = $_POST['Colour']; $Number = $_POST['Gears']; $Brake = $_POST['Brakes']; $Suspension = $_POST['Suspension']; $Gender = $_POST['Gender']; $Age = $_POST['Ageof']; $image = $_FILES["images"]["name"]; $Additional = $_POST['Additional']; include "../include/config.php"; $upload_folder = "./uploads/"; $result=mysqli_query($connection,"SELECT * FROM `Bike` WHERE manufacturer='$Manufacturer'"); //$file="./uploads/".$_FILES["images"]["name"]; //$image = addslashes(file_get_contents($_FILES . '../BikeRegistrationDAO.php')); if($row=mysqli_num_rows($result) > …

Member Avatar
Member Avatar
+0 forum 5

Hello to all, I am trying to execute a mysql query for selecting * rows from the table where user name = [one of the usernames stored in an array]. Ok. Sorry if I am not clear. Now I have an array naming $users[]. I want to select all the users listed in $users[] from a mysql table. Please tell me how can I do that.

Member Avatar
Member Avatar
+0 forum 5

i have been trying to upload image files in to my database but i failed in many ways, the form saves everything except the image files. i am not sure if its the php or the java or the html page, honestly i lost my path. i have included all my pages, any help would mean a lot, thanks!!! <html> <head> <meta charset="utf-8"> <title>PYB Register Bike</title> <link href="bootstrap-3.3.7/dist/css/bootstrap-theme.min.css" rel="stylesheet"> <!--styling css link --> <link href="bootstrap-3.3.7/dist/css/bootstrap.min.css" rel="stylesheet"> <!-- styling css link --> <link href="font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet"> <!-- styling css link --> <link rel="stylesheet" href="../ProtectYourBike.css"> <!-- CSS Reference --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script> <script src="http://malsup.github.com/jquery.form.js"></script> …

Member Avatar
Member Avatar
+0 forum 1

Hello guys, its been some time now i have been strugling with this error, evertime i submit my form it give me this error "Column count doesn't match value count at row 1 " and i cant find a way around this. Any help would be very appreciated!!! <?php if($_POST['phpfunction'] == 'createUser') { createUser(); } if($_GET['phpfunction'] == 'verifyUser') { verifyUser(); } function createUser() { $FirstName = $_POST['firstName']; $LastName = $_POST['lastName']; $AddressLine1 = $_POST['addressLine1']; $AddressLine2 = $_POST['addressLine2']; $PostCode = $_POST['postCode']; $City = $_POST['city']; $Email = $_POST['email']; $Password = $_POST['passWord']; $verificationCode = substr(md5(uniqid(rand(),true)), 16,16); include "../include/config.php"; $sql = "SELECT * FROM `User` …

Member Avatar
Member Avatar
+0 forum 1

I was attempting to store chat logs in a MySQL database where the message field is utf8_general_ci However, when it came across an emoji, it would choke, and the message field would only include text up to the emoji character. I changed the message field to be utf8mb4_general_ci, which seemed to be suggested upon googling, and now emoji characters are replaced in the database with four question mark characters, instead of choking. What is the best way to encode/decode emoji characters so that they can be accurately represented? (Ideally with PHP)

Member Avatar
Member Avatar
+0 forum 6

hi, I am created 3 tables for 1> category 2> subcategory 3> projectdetail In my website folder structure root-index.php, header.php footer.php folder- about -index.php and other files folder - project- index.php folder - err- 404.php In my php page project/index.php i make left column dynamic, i.e call value from table e.g School project ( this is category) and href link is project/School project xyz (subcategory) and href link is project/xyz abc and href link is project/abc College project www yyy I want do like when click on link project/School project It should display that project but id gives me error …

Member Avatar
Member Avatar
+0 forum 22

hi im attempting to update a php srcipt and fixing errors and i have a error in the following block but cannot work out where if($_SERVER['REQUEST_METHOD']=='POST' && isset($_POST['smcomplete'])){ if(empty($_POST['abouth'])) $err_h = $aboutherorhis; elseif(strlen($_POST['abouth'])<6) $err_h = $datashort; else{ ERROR ON THIS LINE>>> $match = ($_POST['matchsame']=='on')?1:0;slBodyType'], $_POST['slHeightfrom'], $_POST['slHeightt $data = array($_POST['rdgender'], $_POST['slagefrom'], $_POST['slageto'], $_POST['slDatingInterest'], mysqli_real_escape_string($link,$_POST['abouth']), $_POST['slMarital'], $_POST['slReligion'], $_POST['slEducation'], $_POST['o'], $_POST['slSmoking'], $_POST['slDrinking'], $match); if(!yourmatch($data, $_SESSION['user_temp'])) $error = $errordata; else{ $_SESSION['memberid'] = $_SESSION['user_temp']; $_SESSION['memberemail'] = $_SESSION['email_temp']; unset($_SESSION['user_temp']); unset($_SESSION['email_temp']); mysqli_close($link); header('Location: '.$base_url.'members/myaccount.php'); exit(); } } } Ive attempted to put $_POST['slHeightt']; in but it doesnt solve error any ideas or solutions much appreciated many thanks …

Member Avatar
Member Avatar
+0 forum 1

I'm using `file_get_contents()` to parse data of a JSON file within a `foreach()` loop onto my page. <?php $url = 'data/gigs.json'; $data = file_get_contents($url); $gigs = json_decode($data, true); foreach ($gigs as $gig) { echo '<tr>'; echo '<td><time>' . $gig['date'] . '</time></td>'; echo '<td>' . $gig['event_venue'] . '</td>'; echo '<td>' . $gig['location'] . '</td>'; echo '<td><a class="btn btn-primary external" href="' . $gig['tickets_url'] . '">Buy</a></td>'; echo '</tr>'; } ?> This works fine and I also want to parse this data onto the homepage, but this time I only want to parse let's say the first 5 records of the JSON array. I …

Member Avatar
Member Avatar
+0 forum 1

The End.