Hi, When I was trying to create the IT Request Form and testing it out, I got some problems during the testing. The home page (index.blade.php) ended up getting an error called "Undefined offset: 1", maybe due to the table database problem. ![0TyCAu.png](/attachments/large/4/8730ed8f11be3f5ed672376eee11d83f.png) The checkboxes in the Request Form (requestForm.blade.php) should not be all checked, instead the user has to select a checkbox option. ![0Tyvyx.png](/attachments/large/4/338e30d7d03b784fd3c723e1bf5d80fb.png) Is there a way to fix the form? My IT Request Form project: https://drive.google.com/file/d/1Vpif_1Cxm-Kkw-4_5ZKYt-Tjd1IWJB9_/view?usp=sharing *Please note that the data I entered when testing is fictional (not real).

Member Avatar
+0 forum 0

I'm doing both SELECT and UPDATE queries using named placeholders. But course data from the database doesn't populate form, as expected. The database table row records don't populate, each time I try to edit a course in the browser. I connect to the database usining PDO. And I do SELECT and UPDATE queries using named placeholders. The following is my "modify-course.php": <?php // configuration require("../includes/config.php"); //select a particular admin by id $admin_id = isset($_GET["admin_id"]) ? $_GET["admin_id"] : ''; $stmt = $pdo->prepare("SELECT * FROM admin WHERE admin_id=:admin_id"); $stmt->execute(['admin_id' => $admin_id]); $admin = $stmt->fetch(); # get admin data if (!$admin) { header("Location: …

Member Avatar
+0 forum 0

Hello! I have a problem with a MySQL database that I haven’t been able to solve no matter how much I tried, either with internet guides or with free tools. I really don’t want to pay hundreds of dollars to a company so please, if anyone knows of a solution, help me because I’m desperate. I was running XAMPP 7.1.22 where I had said database and I decided to install XAMPP 7.2.10 without backing up the database. After that, the site wasn’t working so I figured the problem was the database. And indeed PHPMyAdmin wouldn’t recognize it. I reinstalled the …

Member Avatar
+0 forum 0

I send payments to my users regularly. But sometimes the user enter a PayPal email address that cannot receive money from other PayPal users. They just can receive money from their website. How can I check for this and show an error to the user? Do I need to use PayPal IPN, or API? And how?

Member Avatar
+0 forum 0

This the code in products <?php require_once("inc/header.php"); require_once("inc/navbar.php"); /* if user is logged in then only allow the user to view the page */ if (!isset($_SESSION['id'])){ echo "<h1 class='text-center text-upper text-bs-primary'>please login to view your cart <a class='text-black' href='login.php'>Login</a></h1>"; exit(); } else{ $user_id = $_SESSION['id']; } $carts = $db->FetchAll("*","cart","user_id='$user_id' AND active='y'","`id` DESC"); if (empty($carts)) { echo "<h1 class='text-center text-bs-primary text-25 text-upper'>your cart is empty <a class='text-black' href='products.php'>Go Shop</a></h1>"; exit(); } ?> <div class="container padding-10"> <div id="cart-container-main"> <div class="text-center text-20 text-bold" id="cart-message"></div> <table class="table"> <th>Product image</th> <th>Product detail</th> <th>Price</th> <th>Tax</th> <th>Subtotal</th> <th>Remove</th> <tr> <?php $cod= 0; $main_subtotal = 0; $main_shipping_charge = …

Member Avatar
+0 forum 0

heY guys :) recently I'm on web project which I use MySQL, bootstrap, PHP and Javascript. For this I have generated successfully dynamical forms using PHP. I'm using mysqli commands. I used dynamic forms if it not used I have to create hundred of html pages. So by doing this I could reduce everything to one page. Right so far I'm facing problem 'inserting data to through this dynamic forms'. Exactly I know as I use generate dynamic forms I need dynamic generating code to insert data to database. If not as I mentioned above again I have to create …

Member Avatar
+0 forum 0

I have a script for product Invoice which save details of sold product, but it do not update stock quantity when any product sale. Product quantity in stock remain the same which should decrease.. here is the code to save invoice details using for each loop : <?php function saveInvoice( array $data){ if( !empty( $data ) ){ global $con; $count = 0; if( isset($data['data'] )){ foreach ($data['data'] as $value) { if(!empty($value['product_id'] ))$count++; } } if($count == 0)throw new Exception( "Please add atleast one product to invoice." ); return [ 'success' => true, 'uuid' => $uuid, 'message' => 'Demo Purpose I …

Member Avatar
+0 forum 0

Hey everyone i am just asking for a little bit off help if thats fine how can i make 11 fetch scripts into 1 script please [database ](https://i.imgur.com/BTGQF1P.png) i like to make this menu to display the coins i know you can do it but i dont know how since am not pro <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist"> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">Pick a coin</a> <div class="dropdown-menu"> <a class="dropdown-item" id="pills-btc-tab" href="#pills-btc" role="tab" data-toggle="pill" aria-controls="pills-btc"><img src="https://i.imgur.com/h2bZxBg.png" width="23" height="23"> Bitcoin</a> </div> </ul> fetch from mysqli i have btc here but i like to get every …

Member Avatar
+0 forum 0

echo '<td><a href="details.php?id=' . $row['ServerName'] . '">' . $row['ServerName'] . '</a></td>';--> it's working as expected( but it always display the one table value without any matching criteria hence i am trying with if condition as below) if($row['ServerName']=='DataBase')<< curly start brace>> echo '<td><a href="db.php?id=' . $row['ServerName'] . '">' . $row['ServerName'] . '</a></td>'; <<curly end brace>> -- this above if condition code not working as expected ( updated << curly start brace due to upload issue) i am trying to use if condition if particular pattern match like below where as if i click on Test(under server Name column) if category matches …

Member Avatar
+0 forum 0

<?php session_start(); if (!isset($_SESSION['id'])) { header('location:login.php'); } ?> <?php $nameErr = $emailErr = $usernameErr = $DateOfBirthErr = $departmentErr = $ageErr = $fileToUploadErr = $fileToUploadErrr = $fileToUploadErrrr = $fileToUploadErrrrr = $fileToUploadErrrrrr = "" ; $name = $email = $username = $DateOfBirth = $department = $age = $fileToUpload = $filename = $file = ""; include_once 'connect.php'; $id = $_GET['id']; $query = mysqli_query($mysqli,"select * from `users` where userid ='$id'"); $row = mysqli_fetch_array($query); //set a default variable to hold the original value if $_POST is not triggered $name = $row['name']; $username = $row['username']; $email = $row['email']; $DateOfBirth = $row['Date_of_birth']; $department = $row['department']; $age = …

Member Avatar
+0 forum 0

I have the following code where I can get the field names from a table in a select box. How can I display the contents of a field when it is selected. Thanks! <?php $host = 'localhost'; $port = '3306'; $server = $host . ':' . $port; $user = 'root'; $password = ''; $link = count($t_tmp = explode(':', $server)) > 1 ? mysqli_connect($t_tmp[0], $user, $password, '', $t_tmp[1]) : mysqli_connect($server, $user, $password); if (!$link) { die('Error: Could not connect: ' . mysqli_error($link)); } $database = 'mydb'; mysqli_select_db($link, $database); $query = 'select * from mytable'; $result = mysqli_query($link, $query); if (!$result) { …

Member Avatar
+0 forum 0

I'd like to get all of a mysql table's col names in a select box, and display the selected column name in a table. I just want to select one column at a time to display it in a single column table. I am assuming this can be done with a single query for all columns because they all will be displayed in the same table format. What I did so far is this: <html> <head> </head> <body> <table id="tbresult"> <tr> <th>Column</th> </tr> <?php include ("config.php"); $sql = "SHOW COLUMNS FROM mytable"; $result = mysqli_query($conn,$sql); while($row = mysqli_fetch_array($result)){ echo "<tr><td>" …

Member Avatar
+0 forum 0

Hi This question or similar were 4 years ago has already been asked but in my situation did not help. I have codeigniter project. in my employee database I have TINYINT field status. if 1 employee is active otherwise inactive. my form is in bootstrap modal. here is switch button code: <div class="onoffswitch3"> <input type="checkbox" name="status" class="onoffswitch3-checkbox" id="myonoffswitch3" data-format="Y-m-d" required > <label class="onoffswitch3-label" for="myonoffswitch3"> <span class="onoffswitch3-inner"> <span class="onoffswitch3-active"><span class="onoffswitch3-switch" id="onoffswitch3-switch">Active</span></span> <span class="onoffswitch3-inactive"><span class="onoffswitch3-switch" id="onoffswitch3-switch">Inactive</span></span> </span> </label> </div> question is how can I get value of switch either it is 1 or 0. ( on form when I am clicking switch …

Member Avatar
+0 forum 0

Greetings to everyone, I am working as a freelance web developer, i have more than 4 years experience in osclass scripts. I am working in the osclass scripts for the past 4 years and have created nearly 67 sites in osclass, and have created many plugins, cuztomized themes, plugin cuztomizations according to the clients need. I saw many of the post was unanswered here regarding the osclass scripts, so i make this new topic those who are wandering for a good programmer for their osclass script, reply me here if you need my support, thanks.

Member Avatar
+0 forum 0

Hello! I'm learning to program. I'm watching courses on how to create blogs in "laravel". I created an admin panel with the function of adding the article "form html". it is: title, description, text field - name is "section" I would like to add a button to add another "section". after clicking "add" will appear again: title, description, text field. after adding a few sections and publishing the article, each section would be a separate "row" with a class of 100% to be visible on the whole page. moving the mouse would move to the next section. unfortunately I do …

Member Avatar
+0 forum 0

I have two values in my code one is from a SQL Server query echo to the screen as formattedNum10d my second value is stored in a MySQL database and echo to the screen as formattedNum10f. In a seperate column i would like to subtract foramattedNum10f from formattedNum10d and echo the result but everything i have tried does not work any help would be greatly appreciated. $sql10d="SELECT SUM (CASE WHEN FFP.SINVOICE.NUM_0 Like '%SCR%' THEN (0 - (FFP.SINVOICE.AMTATIL_0 - FFP.SINVOICE.AMTTAX_0)) ELSE (FFP.SINVOICE.AMTATIL_0-FFP.SINVOICE.AMTTAX_0) END) FROM FFP.BPCUSTOMER, FFP.SINVOICE INNER JOIN FFP.SINVOICEV ON FFP.SINVOICE.NUM_0 = FFP.SINVOICEV.NUM_0 WHERE FFP.SINVOICEV.PJT_0='' AND FFP.SINVOICE.BPR_0 = FFP.BPCUSTOMER.BPCNUM_0 AND ((FFP.SINVOICE.ACCDAT_0>='$day01')) …

Member Avatar
+0 forum 0

> this is php code for get value while ($row = $activeRiders->fetch(PDO::FETCH_ASSOC)){ $rider_name = $row['RiderName']; $longitude = $row['CurrentLongitude']; $latitude = $row['CurrentLatitude']; $locations[]=array( $rider_name, $latitude, $longitude ); } $markers = json_encode( $locations ); > Jquery function $(document).ready(function() { $('#map').height($('.page-container').height()); $( window ).resize(function() { $('#map').height($('.page-container').height()); }); <?php echo "var markers=$markers;\n"; ?> > Initialize Map map = new GMaps({ el: '#map', lat: 24.8615, lng: 67.0099, zoom: 12, zoomControl : true, zoomControlOpt: { style : 'SMALL', position: 'TOP_LEFT' }, circleOptions: { fillColor: '#ffff00', fillOpacity: 1, strokeWeight: 5, clickable: false, editable: true, zIndex: 1 }, panControl : false, streetViewControl : false, mapTypeControl: false, overviewMapControl: false, …

Member Avatar
+0 forum 0

Hi, I'm trying to create and save breadcrumbs from recursive function. I manage to display hierarchical tree using recursive function. but I'm I am having hard time creating breadcrumb and save them one by one to my database. here is my table cat_id parent_id title 10 0 shoes 11 0 clothes 12 10 socks 13 11 long-sleve 14 11 T-shirts ... My desire output is like this: Home > Category1 > item Home > Category1 > item Home > Category1 > item Home > Category2 > item Home > Category2 > item Any idea thanks..

Member Avatar
+0 forum 0

I have 2 tables; first table Book, having book id and chapters. The second table points having studentid, bookid and hw-points for the students. I need to get results like below tabular format. Chapter 1 Chapter 2 Chapter 3 Book 1 sum of c1/B1 sum of c2/B1 sum of c2/B1 Book 2 sum of c1/B2 sum of c2/B2 sum of c2/B2 Points-table id userid BookId homeworkPoints 2 1308 673 250 3 2631 674 200 4 2631 627 175 5 2631 675 50 6 2631 647 50 7 2631 681 50 8 2631 638 50 Book-Table id Book-Id Chapter-Id 673 1 …

Member Avatar
+0 forum 0

Hi Dynamic Dependent Select Box last one not working Bank,State,District is working branch ont working please check below code Please help. index.php <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style type="text/css"> .select-boxes{width: 280px;text-align: center;} select { background-color: #F5F5F5; border: 1px double #FB4314; color: #55BB91; font-family: Georgia; font-weight: bold; font-size: 14px; height: 39px; padding: 7px 8px; width: 250px; outline: none; margin: 10px 0 10px 0; } select option{ font-family: Georgia; font-size: 14px; } </style> <script src="jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#country').on('change',function(){ var countryID = $(this).val(); if(countryID){ $.ajax({ type:'POST', url:'ajaxData.php', data:'country_id='+countryID, success:function(html){ $('#state').html(html); $('#city').html('<option value="">Select District</option>'); } }); }else{ $('#state').html('<option value="">Select Bank</option>'); $('#city').html('<option value="">Select State</option>'); …

Member Avatar
+0 forum 0

[Click Here](http://www.acchajob.com) if (isset($_POST['createresume'])) { $university = $_POST['university']; $frommon = $_POST['frommon']; $tomon = $_POST['tomon']; $lavel = $_POST['lavel']; $courtitle = $_POST['courtitle']; $eduinfo = $_POST['eduinfo']; $typeskill = $_POST['typeskill']; $lavelskill = $_POST['lavelskill']; $skilldetails = $_POST['skilldetails']; $langskill_1 = mysqli_real_escape_string($con, $_POST['langskill_1']); $langskill_2 = mysqli_real_escape_string($con, $_POST['langskill_2']); $langskill_3 = mysqli_real_escape_string($con, $_POST['langskill_3']); $langskill_4 = mysqli_real_escape_string($con, $_POST['langskill_4']); $langskill_5 = mysqli_real_escape_string($con, $_POST['langskill_5']); $langskill_6 = mysqli_real_escape_string($con, $_POST['langskill_6']); $langdetails = mysqli_real_escape_string($con, $_POST['langdetails']); $jobposition = $_POST['jobposition']; $fromMon = $_POST['fromMon']; $toMon = $_POST['toMon']; $compname = $_POST['compname']; $addinfoexp = $_POST['addinfoexp']; $infohobby = $_POST['infohobby']; $reftype = $_POST['reftype']; $refname = $_POST['refname']; $refinfo = $_POST['refinfo']; $Filename = rand(1000,100000)."-".$_FILES['Filename']['name']; $file_loc = $_FILES['Filename']['tmp_name']; $file_size = $_FILES['Filename']['size']; $file_type = $_FILES['Filename']['type']; $folder="uploads/"; …

Member Avatar
+0 forum 0

hello everyone , i have follwoing table structure check_id(pk) | user_id(fk) | check_in_time( timestamp ) | check_out_time( timestamp ) | is_checked_out(0 or 1) | checked_by | family_id now i want to calculate average of all checkIn and checkOut of user per day and then plot these data in graph this is what i have tried so far SELECT DAYNAME(check_in_checkout_time.check_in_time) as a ,DAYNAME(check_in_checkout_time.check_out_time) as b , ROUND(AVG(MINUTE(TIMEDIFF( DATE_FORMAT(check_out_time, "%h:%i:%s") , DATE_FORMAT(check_in_time, "%h:%i:%s") ))),0) as timediff FROM check_in_checkout_time WHERE check_in_checkout_time.checked_by =? this give result as a: wednesday b : wednesday timdiff: 14 and so on but does not give avgerage of all …

Member Avatar
+0 forum 0

Programming Buddies, Looking at this youtube channel, do you think as a beginner in php (starting at php 7), the channel is good for me to learn php 7 (and no previous version to avoid learning deprecated stuffs) and pdo of php 7 ? Check his php series and then kindly comment. Thank You! <a href="https://www.youtube.com/channel/UC1WxZFhq56xs1oxXH-XveSQ">Clever Techie - YouTube</a>[<a href="https://www.youtube.com/channel/UC1WxZFhq56xs1oxXH-XveSQ" target="_blank" title="New Window">^</a>] PS - You are welcome to recommend channels and video and text tuts apart from recommending php.net, phptherightway.com and lynda's and tutorials.point.com

Member Avatar
+0 forum 0

hello, i have one table in sql server and i made a form to editing this table from. so when i click edit in the table .. it takes me to the editing form with the chosen id .. what i need is to show all other feildes in the form that related to the chosen id ???!! any help ?

Member Avatar
+0 forum 0

Good afternoon all, The issue I am having is that when POST data values are looped through inside the while loop as each record is compared with the POST data and the database record for any changes. For this test the data from the post is exactly correct. The if statment compares the data and displays this as not eaual when it is? What I can see is happening from what I can see is that the out data when output is not in sync, but not sure how to resolve this example The data output fot the first loop …

Member Avatar
+0 forum 0

I am trying to put a post feed on the homepage but I am with difficulties on it. I think my query it might be wrong, but I want to pick the username from 'blabs' table and see if that 'username' from the same table is the user or the user's friends. So to be clear, what I want is to add this 3 tables from db: * users (to pick the profile picture, which is recorded as 'profile') * blabs (to pick all the info from it: username, blabs and date) * friends_request (to check if in 'blabs' table …

Member Avatar
+0 forum 0

/* initialize the calendar -----------------------------------------------------------------*/ var date = new Date(); var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear(); /* selects the events to load in the calendar -----------------------------------------------------------------*/ $.ajax({ url: 'process.php', type: 'POST', data: 'type=fetch', async: false, success: function(response){ json_events = response; } }); $('#calendar').fullCalendar({ //events: [{"id":"14","title":"New Event","start":"2015-01-24T16:00:00+04:00","allDay":false}], events: JSON.parse(json_events), utc: true, defaultView: 'agendaWeek', header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, editable: true, droppable: true, slotDuration: '00:30:00', timezone: 'local', eventReceive: function(event){ var title = event.title; var start = event.start.format("YYYY-MM-DD[T]HH:mm:SS"); $.ajax({ url: 'process.php', data: 'type=new&title='+title+'&startdate='+start+'&zone='+zone, type: 'POST', dataType: 'json', success: function(response){ event.id = response.eventid; …

Member Avatar
+0 forum 0

Hello I am facing a problem while creating a view in MySQL, I tried all the possible solutions I got from internet but was failed. actually I have two **tables 1** is for installment schedule which contains a planned schedules and the **table 2** contains all installment payment which has been paid tables are as follows **Installment Schedule Table** +------------------+---------------+--------------------+--------+---------+--------------------+ | InstallmentName | InstallmentSr | ScheduleDate | Amount | PayStat | PayDate | +------------------+---------------+--------------------+--------+---------+--------------------+ | 12th Installment | 12 | 11/3/2017 00:00:00 | 9565 | 0 | 12/3/2017 00:00:00 | | 11th Installment | 11 | 10/3/2017 00:00:00 | 9585 …

Member Avatar
+0 forum 0

I'm trying to do use X-editable to do inline editing instead of having textboxes and such, I'm editing labels that I would like to send in a post method to update the values in the database. Is there anyway to send any kind of data within the <form> besides using <input>? I'm trying to use labels, spans, and such to keep the design/layout of a card. I've looked around but haven't find anything that's actually working except using <input> which is what im trying to avoid.

Member Avatar
+0 forum 0

Controller: function addblogs() { $this->load->library('form_validation'); $this->form_validation->set_error_delimiters('<br /><span class="error"> ','</span>'); $this->form_validation->set_rules('blog_title','Blog Title'); $this->form_validation->set_rules('description','Blog Description'); $this->form_validation->set_rules('category_id','Category Name','required'); $this->form_validation->set_rules('position','Position'); if($this->form_validation->run()== FALSE) { $data['categorylist']=$this->blogs_model->categories_dropdown(); $data['mainpage']='blogs'; $data['mode']='add'; $this->load->view('templates/template',$data); } else { $this -> blogs_model -> insertblogs(); $this->flash->success('<h2>blogs Added Successfully!</h2>'); redirect('blogs'); } } Model: function categories_dropdown() { $this->table = 'categories'; $this->where('status',1); $categorylist=$this->dropdown('category_id','category_name'); return $categorylist; } function insertblogs() { $options = $this->input->post('category_id'); $array = explode(",", $options); print_r($array); exit(); $data=array( 'category_id'=>$array, 'blog_title'=>$this->input->post('blog_title'), 'description'=>$this->input->post('description'), 'position'=>$this->input->post('position') ); $this->db->insert('blogs',$data); } View: <div id="main"> <div class="full_w"> <div class="h_title"> <div class="lefttitle fl"> Add Blogs </div> <div class="rightbutton fr"> <a class="button cancel" href="<?php echo site_url()?>/blogs">Cancel</a> </div> </div> <?php $form_attributes = array('name'=>'adds', 'id'=>'adds', 'enctype' => …

Member Avatar
+0 forum 0

The End.