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

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

Hi DW. I am able to purchase from my online store but I don't seem to be able to get the pass through data which whould be sent to my notify_url. Payfast is my payment gateway and now it does call my notify_url because two files are created after I try to purchase but the files are blank and what I want is to get the posted variables and their values, but I'm not sure if the variables are posted on call or because even if I try to trap the `$_POST` I don't get any data. Here is my …

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

My requirement is connect to Oracle database from PHP. XAMPP is already installed in my pc. PHP Version 5.5.11 My system configuration is Windows 7, 64-bit operating system. I downloaded 32-bit instantclient-basic-nt-11.2.0.4.0.zip file and then extracted and copied folder into C drive. I gave this folder path in Environment Variables. Now I downloaded 32-bit ODAC101040.exe. I had run this exe file and installed Oracle Universal Installer into E drive. Now Environment Variables path is like below E:\oracle\product\10.1.0\Client_1\bin;E:\oracle\product\10.1.0\Client_1\jre\1.4.2\bin\client;E:\oracle\product\10.1.0\Client_1\jre\1.4.2\bin;C:\instantclient; I removed semicolon in php.ini file as below extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client extension=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant …

Member Avatar
+0 forum 0

Hello, I would like to change the background color for each rows in Timeline chart based on specific value I,ve retrieve from database. For example, if the $status = '1', the backgrouncolor should be #000000, or else #ffffff var container = document.getElementById('myChart'); var chart = new google.visualization.Timeline(container); var dataTable = new google.visualization.DataTable(); dataTable.addColumn({ type: 'string', id: 'Position' }); dataTable.addColumn({ type: 'string', id: 'Name' }); dataTable.addColumn({ type: 'date', id: 'Start' }); dataTable.addColumn({ type: 'date', id: 'End' }); dataTable.addRows([ <?php for($i=0; $i<count($arr_code); $i++) { echo $data="['TEST', 'BAR NAME', new Date($start_date[$i]), new Date($end_date[$i])],"; } ?> ]); var options = { timeline: { rowLabelStyle: …

Member Avatar
+0 forum 0

The End.