Hello, This is PHP. Help me understand this code: if($selectDB == true){ $query = "INSERT INTO recruitment (ID, nama, jenis_kelamin, tanggal_lahir, nohp, email, alamat, provinsi, kota, zip, status_nikah, jumlah_tanggungan, agama, file_attachment, cover_letter) VALUES (NULL, '$nama', '$jenis_kelamin', '$tanggal_lahir', '$nohp', '$email', '$alamat', '$provinsi', '$kota', '$zip', '$status_nikah','$jumlah_tanggungan','$agama','$file_attachment', '$cover_letter');"; // "INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country) // VALUES ('Cardinal', 'Tom B. Erichsen', 'Skagen 21', 'Stavanger', '4006', 'Norway');"; $simpan = mysqli_query($connect, $query); echo "save - ".$simpan; if(!$simpan){ echo 'failed'; }else{ echo 'success'; } } I wonder why $simpan = '' ? 1simpan - failed? What did I do wrong?

Member Avatar
+0 forum 0

**HELLO GUYS!** I'm Sergey Romanenko a web-developer with strong will for learning and researching new technologies and architectural solutions. I like creating and using specialised tools for making development processes as efficient as possible. Let me introduce my pet project - Flextype! Flextype is Open Source, fast and flexible file-based Content Management System. That's Easy to install, upgrade and use. Flextype provides amazing API's for plugins, themes and core developers! **FEATURES** Simple Easy to install, upgrade and use. No installation needed, just copy files to your server! Fast Flextype is realy fast and lightweight! No database required, flat files only! …

Member Avatar
+1 forum 0

I'm working on the application where I want to calculate the total late hours of an employee from a set of records between the employee timing shift? Example Of Employee Time Shift Shift Start: 01:00:00 Shift End: 09:00:00 Php Code // example 1 error_reporting('0'); $time1 = "01:00:00"; $time2 = "09:00:00"; date_default_timezone_set('Asia/Karachi'); echo "Time difference: ".get_time_difference($time1, $time2)." hours<br/>"; function get_time_difference($time1, $time2) { $date = date('h:i:s a', time()); $time1 = strtotime("1/1/1980 $time1"); $time2 = strtotime("1/1/1980 $time2"); $totalshifttime = ($time2 -$time1) / 3600; $totallate= $totalshifttime - $date ; return $totallate; }? Let's support if ABC employee clock in at 2 pm then should …

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

I installed this php with captcha email form on my website --> http://reusableforms.com/d/d4/php-email-form-with-captcha I have it working. :) But there are two things that I want to change. (1) I want to change the color of the submit button. I have semi done that with the following code: .btn { background: rgba(77, 56, 36, .75); border: 1px solid #271c16; color: #c3db74; } .btn:hover, .btn:active, .btn:visited { background-color: rgba(196, 227, 64, .65); border: 3px solid #c7d8e8; box-shadow: 1px 1px 21px #271c16; color: #271c16; } What is not working is when the form returns with an incorrect captcha entry then the button …

Member Avatar
+0 forum 0

The following code is erroring on the connection string line 5 it used to work but then i had to move the sql server to another box and now it fails have i forgotten to do something on the sql server or is there error in my code my error is Fatal error: Uncaught PDOException: SQLSTATE[08001]: [Microsoft][ODBC Driver 11 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [53]. in C:\xampp\htdocs\dailysales\includes\CPeriodOrdersJson.php:5 Stack trace: #0 C:\xampp\htdocs\dailysales\includes\CPeriodOrdersJson.php(5): ->('sqlsrv:Server=F...', 'LocalAdmin', 'CrispyCrackers') #1 {main} thrown in C:\xampp\htdocs\dailysales\includes\CPeriodOrdersJson.php on line 5 <?php include("sqlcalendar.php"); $db = new PDO("sqlsrv:Server=FFP-X3DB\X3;Database=FFP_WebServices", "LocalAdmin", "CrispyCrackers"); $row=$db->prepare("FFP_WebServices.dbo.WEBSERV_PERIOD_ANNUAL_FIGURES_CUMMULATIVE_SELECT"); $row->execute();//execute …

Member Avatar
+0 forum 0

Hi Everyone, I am new to using cURL I have a client website I am working on... They have a password script that automatically creates a new password - what they would like to do now is automatically log the user in - using the automatic password and the users email address. The password script is working perfectly and I have the email & password variables available - $moefEmail & $moefPassword I just need help with editing the two cURL scripts to automatically log the user in I have found the following two articles that detail the process, But I …

Member Avatar
+0 forum 0

Hi All, I want to select specific drop down option to a selected post, for example the post is on Honda Fit, the the Drop Down should select Honda Fit automatically. The below code works fine but shows all posts instead of selecting specific to a post, e.g. select guid from wp_posts where guid='$_GET['guid'] and post_type='product' , I know it in a query logic but when i implement the query, the metabox just keeps loading and does nothing. Code responsible for fetching the drop down list: automotive_admin_help_message(__("This setting allows you to associate a WooCommerce product with a listing and show …

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

Hi guys! I have a problem with login into the system. Everything seem to be fine but it passes an error when i click the login button. Pls help Thank you in advance ////////login.php////// <? /* *********************************************************** **********# Name : Shambhu Prasad Patnaik #***** **********# Company : Aynsoft #********** **********# Copyright (c) www.aynsoft.com 2004 #********** *********************************************************** */ include_once("include_files.php"); include_once("general_functions/password_funcs.php"); include_once(PATH_TO_MAIN_PHYSICAL_LANGUAGE.$language.'/'.FILENAME_JOBSEEKER_LOGIN); include_once(FILENAME_BODY); $jscript_file=PATH_TO_LANGUAGE.$language."/jscript/".'jobseeker_login.js'; $template->set_filenames(array('jobseeker_login' => 'jobseeker_login.htm')); //// Jobseeker auto login starts //////[[Click Here](http://talentwiz.net/jobseeker_login.php)](null) $checked1=false; $encoded_login1=$_COOKIE["autologin1"]; //echo $encoded_login1; if(tep_not_null($encoded_login1)) { $checked1=true; $explode_array=explode("|",decode_string($encoded_login1)); $TREF_email_address1=$explode_array[0]; $TR_password1=$explode_array[1]; } else { $TREF_email_address1=""; $TR_password1=''; } //// Jobseeker auto login ends ////// $action = (isset($_POST['action']) ? $_POST['action'] : …

Member Avatar
+1 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

I'm trying to make SSO like [Yandex](http://yandex.ru/) do. How achive authentication without redirect if user has been already authenticated at another service provider? I am working on SAML, but I could not achieve implementation without a redirect.

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

I am trying to get access toke from FB through Developer App. But I am not able to json_decode the call back response. If I use the token_url call from browser, it returns the access token. But from within the script it does work. I searched online and foun that it could be that the Json encoded response must be containg some UTF -8 BOM. So I tried some functions that would strip the response from that. However, I still am not able to get that elusive access token as a variable by json decoding and getting an array. My …

Member Avatar
+0 forum 0

Is there possible chance of changing the WooCommerce "Add to Cart" button functionality or removing it and creating new button, inside the item page? I found this code but it only replaces the button on the item itself and not in the item page add_filter( 'woocommerce_loop_add_to_cart_link', 'replace_default_button' ); function replace_default_button(){ return '<button>Text a Dealer</button>'; } https://screenshotscdn.firefoxusercontent.com/images/5b7bf7ed-f1d5-4cc1-86e7-157970f10ea4.png

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

Hi I have a php page called "list.php" which allows the user to select from a list of options to perform a filter query on a table. At the bottom of this page I have created an href link to a page called "create-file1.php". I would like to pass the result of this query ($rows - the type is array) through this href. Obviously I'm not doing this correctly as I am getting no results from the passed variable. Below is where I pass my array in the list.php file: <?php $stmp1 = WP_PLUGIN_URL . TENDER_FOLDER . "/create-file1.php?trows=$rows"; ?> <a …

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

Requirements: Create a PHP application to allow a user to register for the website and enter profile information to be stored in cookies. Part I: Registration page Create a page called register.php that displays a user registration form with the following fields from the customer table: Email address - required, valid email, maxlength 60 First Name - required, maxlength 40 Last Name - required, maxlength 20 Password - required, 8-20 characters Confirm Password - required, 8-20 characters, must match Password Read the records from the genre table and display each one as a checkbox using the name as the label …

Member Avatar
-1 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

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

Hi there been having this problem for a while now and i need guidance the only thing that is showing me only **111** when looping through i have 3 data in my database and its not showing me the result i want any ideas?? thanks in advance **edit** the result would be 1 2 3 not 1 1 1 $cruds = DB::table('cruds')->where('id', $id)->get(); $user_name = $request->Division; $users = DB::table('users')->where('division' ,$user_name)->get(); foreach($users as $key){ foreach($cruds as $cey => $name){ $user_id = $key->id; $cruds_id = $key->id; $cruds_owner = $cey->document_owner; $cruds_division = $key->division; $cruds_document = $cey->document; $cruds_year_release = $cey->year_release; $cruds_sharetoken = $cey->sharetoken; $cruds_privacy …

Member Avatar
+0 forum 0

Hi I have problem that cannot show form validation errors in view . I am using ajax to post data to controller. Here is my Controller's Validation part private function _validate() { $this->form_validation->set_rules('Name', 'Name', 'required|alpha'); $this->form_validation->set_rules('CellNo', 'CellNo', 'required|numeric'); $this->form_validation->set_rules('Address', 'Address', 'required'); $this->form_validation->set_rules('Rate', 'Rate', 'required|numeric'); $this->form_validation->set_rules('Advance', 'Advance', 'required|numeric'); $this->form_validation->set_rules('BottlesQty', 'BottlesQty', 'required|numeric'); $this->form_validation->set_rules('DeliveryDay', 'DeliveryDay', 'required'); $this->form_validation->set_rules('DeliveryPerson', 'DeliveryPerson', 'required'); $this->form_validation->set_rules('referenceName', 'referenceName', 'required'); if ($this->form_validation->run() == FALSE) { $errors = validation_errors(); echo json_encode(['error'=>$errors]);} } Here is view with ajax <div id="print-error-msg" class="alert alert-danger " style="display:none"></div> //part of ajax posting to controller var formData = new FormData($('#form')[0]); $.ajax({ url : url, type: "POST", data: formData, …

Member Avatar
+0 forum 0

What are the free report designer for php and how can i integrate the designed report with my web application php. Using parameters for dynamic values

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 have a problem with my Ionic App. I am using typescript files. I am getting console log `No Access` that means there is a problem with `resposeData`. Any hint? I am really stuck home.ts file import { Component, ViewChild } from "@angular/core"; import { NavController, App, AlertController } from "ionic-angular"; import { AuthService } from "../../providers/auth-service"; import { Common } from "../../providers/common"; import { Camera, CameraOptions } from "@ionic-native/camera"; @Component({ selector: "page-home", templateUrl: "home.html" }) export class HomePage { @ViewChild("updatebox") updatebox; public userDetails: any; public resposeData: any; public dataSet: any; public noRecords: boolean; userPostData = { uid: "", …

Member Avatar
+0 forum 0

Hi, I have an update page to update the data that are stored in the database. The page is able to extract all the data from the database that are stored. The select option is dynamic dependent select option. I am facing the following issues: 1) select option correctly extracted the data but it does not shows other option 2) select option is showing the ID instead of the value Below is my code for update page <script src="jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function () { $('#brand').on('change', function () { var brandID = $(this).val(); if (brandID) { $.ajax({ type: 'GET', url: 'getBrand.php', …

Member Avatar
+0 forum 0

The End.