Hello everyone! I'm new here and I really need some helps regarding my php coding. I'm trying to do an Update page and the error keeps popping out "Undefined adminid". I've been trying to fix it but to no avail. Can you help me? //my database connection <?php $host = "localhost"; $user = "root"; $password = ""; $db = "eat"; $conn= mysqli_connect($host,$user,$password, $db); mysqli_select_db($conn, $db); session_start(); ?> //my AdminSetting.php <?php include('dbconnection.php'); $id=$_GET['aid']; $query = mysqli_query($conn,"select * from admin"); $row = mysqli_fetch_assoc($query); ?> <fieldset class="account-box"> <?php $status = ""; if(isset($_POST['new']) && $_POST['new']==1) { $id=$_REQUEST['adminid']; $name =$_REQUEST['name']; $email =$_REQUEST['email']; $phone = $_REQUEST['phone']; …

Member Avatar
Member Avatar
+0 forum 1

Hi there I am new at this website thanks for every one that help me I have this output appear on the link below: [Click Here](https://ibb.co/fe8Cvf) I want to while I choosing a **Time** **value** this value must be send for these useres that **absence** row the checkbox is **checked** this is my code:

Member Avatar
Member Avatar
+0 forum 3

I am using `passport` in `laravel` for authenticating my users in APIs. I am able to authenticate different types of users from different tables and generating different token for them but the routes are not protected. For example. A user can access the routes like this Route::group(['middleware' => 'auth:api'], function () { Route::group(['prefix' => 'v1'], function () { Route::get('get-seller-list','API\v1\SellersController@index'); }); }); and A doctor can access the routes like Route::group(['middleware' => 'auth:sellers'], function () { Route::group(['prefix' => 'v1'], function () { Route::get('get-seller-detail','API\v1\TestController@getDetails'); }); }); but this `middleware` check doesn't seem to be working as I can access all the routes …

Member Avatar
Member Avatar
+0 forum 2

Hi I am trying to create a login page from my existing Wordpress Database with custom php file. can any one please help me.

Member Avatar
Member Avatar
+0 forum 3

Hello, we have a website which I believe is in PHP, and it has a store on it. Adding products to the store etc is easy, but we want to change the text on the website, like add an introduction on the front page. When I try to open the index.php file in Firstpage all I get is a load of code that makes no sense to me. Is there an easy way of doing it, or a program that makes it easy to edit? Thanks for any help.

Member Avatar
Member Avatar
+0 forum 5

Hello there, > colud you please tell me that how can i generate html into csv, actually it display all tr and td into csv file, here i have share my code <?php /*include("wp-config.php"); include("wp-app.php"); include("wp-active.php"); include("wp-settings.php");*/ //include("index.php"); include("wp-load.php"); include("wp-includes/template-loader.php"); header ("Expires: Mon, 12 Aug 1988 23:30:00 GMT"); header ("Last-Modified: " . gmdate("D,d M Y H:i:s") . " GMT"); header ("Pragma: no-cache"); header ("Content-type: text/csv; charset=UTF-8"); header ("Content-Disposition: attachment; filename=report.csv"); header ("Content-Description: Generated Report" ); /* wordpress $wpdb->hide_errors(); @set_time_limit(0); @ob_clean(); header( 'Content-Type: text/csv; charset=UTF-8' ); header( 'Content-Disposition: attachment; filename=woocommerce-product-export.csv' ); header( 'Pragma: no-cache' ); header( 'Expires: 0' ); $fp = …

Member Avatar
Member Avatar
+0 forum 7

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

using the following code i get an error from line 5 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 any ideas please it used to work before i moved my database to a new server <?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 the query //create the array $json_data['cols'] = array( array('label' => 'Mon', 'type' => 'string'), array('label' => 'COrdersTP', 'type' => 'number'), array('label' …

Member Avatar
Member Avatar
+0 forum 2

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, I am trying to hide Div ads from specific page( 404, Etc). website url: https://ytdl.us/ And for an example 404 page: https://ytdl.us/search/fvl-fdslkvnfalkjfnvlkfev Here <div class="ads ads-header"> </div> needs to be blocked as it is against TOS. Can anyone help. PS: I am no expert in coding :(

Member Avatar
Member Avatar
+0 forum 2

I want to create a php function that i can use to get a particular user details and display the info gotten in my ProfileActivity when a user profile is been clicked in my app. so i wrote this php code to get user details from my database but when i run the code nothing is returned in my browser. please what could be causing this? <?php require("config.php"); function getdetails($id) { $array = array(); $q = mysql_query("SELECT * FROM 'users' WHERE 'id'=".$id); while($r = mysql_fetch_assoc($q)) { $array['id'] = $r['id']; $array['name'] = $r['name']; } return $array; } function getId($name) { $q …

Member Avatar
Member Avatar
+0 forum 2

i have 2 tables office1 > id,off1 office2 > id,off2_id,off2 i want to insert the choosen into table "saveoffice" > offices1,offices2 drop.php <!DOCTYPE html> <html dir="rtl" lang="ar"> <head> <meta charset="utf-8"> <title>dependent dropdown list using jquery Ajax?</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link rel="stylesheet" href="http://demo.itsolutionstuff.com/plugin/bootstrap-3.min.css"> </head> <body> <form action="savedata.php" name="myForm" method="POST"/> <div class="container"> <div class="panel panel-default"> <div class="panel-heading">Select office 1 and get bellow Related office 2</div> <div class="panel-body"> <div class="form-group"> <label for="title">offices 1:</label> <select name="office1" id="office2" class="form-control"> <option value="">--- choose office 1 ---</option> <?php require('config.php'); $sql = "SELECT * FROM office1"; $result = $con->query($sql); while($row = $result->fetch_assoc()){ echo "<option value='".$row['id']."'>".$row['off1']."</option>"; } ?> …

Member Avatar
Member Avatar
+0 forum 2

The facts: We are talking about a small company (5 persons) with many clients that making real money (we don't) . We provide our own software that has unique features against the e-commerce completion. The problem: the first glimpse of the problem arose around 2012 and made clear around 2014 with web sockets. Some clients didn't want a simple chat with their client but instead a full live eShop where they could negotiate the prices of a product or even start a discussion with a visitor. The solution would be implementing web sockets in to our framework and that worked …

Member Avatar
Member Avatar
+0 forum 3

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

I am required to download different type of files from a spesicif folder using ajax .The problem is that when execute the code I get this message [this](https://ibb.co/eaXpGz) I have looked for the similar tutorials I coundnt find a solution Could you please help This my index.php file <!DOCTYPE html> <html> <head> </head> <body> <div class="table-responsive"> <div id="data"></div> </div> </body> </html> <script> $(function(){ fetchData(); function fetchData(){ $.ajax({ url:"ajax.php", method:"post", success:function(data){ $('#data').html(data); } }) } $(document).on('click','.download',function(e){ e.preventDefault(); var fileName=$(this).attr("id"); $.ajax({ url:"download.php", method:"post", data:{fileName:fileName}, success:function(e){ alert(e); } }) }); }) this my ajax.php file that I am using populate the file Information …

Member Avatar
Member Avatar
+0 forum 2

if its possible please give me instructions Thank you in advance

Member Avatar
Member Avatar
+0 forum 6

<?php $msg=""; $image1=""; $image1_err=""; //if upload button is pressed if(isset($_POST['upload'])){ $target="images/".basename($_FILES['image']['name']); $db=mysqli_connect("localhost","root","","categories"); $image=$_FILES['image']['name']; $text=$_POST['text']; if(isset($_POST['electro'])){ $sql="INSERT INTO electronic(image,text) VALUES ('$image','$text')"; mysqli_query($db,$sql); } //move image to a file if(move_uploaded_file($_FILES['image']['tmp_name'],$target)){ $msg="Image uploaded successfully"; }else{ $msg="There was a problem uploading image"; } } ?> <!DOCTYPE html> <html> <head> <title>Image Upload</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div id="content"> <?php $db=mysqli_connect("localhost","root","","categories"); $sql="SELECT * FROM electronic"; $result=mysqli_query($db,$sql); while($row =mysqli_fetch_array($result)){ echo "<div id='img_div'>"; echo "<img src='images/".$row['image']."'>"; echo "<p>" .$row['text']."</p>"; echo "</div>"; } ?>

Member Avatar
Member Avatar
+0 forum 4

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

Member Avatar
Member Avatar
+0 forum 10

I have a table called download_manager .It has two columns filename and downloads .What I want to do is to get file name and its download count and display them inside ul element. I am able to get file names but I cant display the download count I'm getting undefined index error.This is my code <?php $handle = opendir($directory) or die('Error'); $files = array(); while ($file = readdir($handle)) { if ($file[0] == '.') { continue; } $files[] = $file; } sort($files, SORT_STRING); $query = 'select * from download_manager'; $data = mysqli_query($link, $query); $fileInfo[] = array(); if (mysqli_num_rows($data)) { while ($singleFile …

Member Avatar
Member Avatar
+0 forum 1

I'm trying to count the vowels in a lengthy text, provided by a .txt file. I can successfully open the file and echo it out into the browser. What I can't seem to do is get my script to do the actual vowel counting and I'm not entirely sure why. I'm supposed to output the vowel count to a file that doesn't previously exist, but is referred to as "file_output1.txt". I'm not sure if this is what is causing the issue, if I'm not properly accessing the file to enable the count to occur, or if I made a syntax …

Member Avatar
Member Avatar
+0 forum 3

I want to protect my site from hacking. Currently I know about XSS and SQL injection. Do I need to use mysqli instead of mysql? And why? When should I use `htmlentities()` and `striptags()`? I also don't want users to upload melicious files and since I accept file uploading, is it enough to check file type? If not what can I do to prevent this? My website runs on PHP, is there anything else I should worry about?

Member Avatar
Member Avatar
+0 forum 6

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

Signup.php <form name="sign-up" method="post" action="process.php?action=sign-up"> <h3><span>Sign-Up</span></h3> <table width="100%" border="0" cellspacing="1" cellpadding="1"> <thead> User Details </thead> <tr> <th scope="row">*User ID :</th> <td><label for="playerid"></label> <input type="text" name="playerid" id="playerid" required="required"></td> </tr> <tr> <th scope="row">*Name :</th> <td><label for="playername"></label> <input type="text" name="playername" id="playername" required="required"></td> </tr> <tr> <th scope="row">*Mobile Number :</th> <td><label for="playermob"></label> <input type="text" name="playermob" id="playermob" required="required"></td> </tr> <tr> <th scope="row">*E-Mail :</th> <td><label for="playermail"></label> <input type="text" name="playermail" id="playermail" required="required"></td> </tr> <tr> <th scope="row">Address :</th> <td><label for="playeraddress"></label> <textarea name="playeraddress" id="playeraddress" cols="45" rows="5"></textarea></td> </tr> <tr> <th scope="row">&nbsp;</th> <td><input type="submit" name="cancel" id="cancel" value="Cancel"> <input type="submit" name="submit" id="submit" value="Submit"></td> </tr> <tr> <th scope="row">&nbsp;</th> <td>&nbsp;</td> </tr> <tr> <th colspan="2" scope="row">&nbsp;</th> …

Member Avatar
Member Avatar
+0 forum 8

<html> <head></head> <link rel="stylesheet" type="text/css" href="style.css" <body> <?php $db = mysqli_connect('localhost', 'root', '', 'formdb'); $formId = ''; $LastName = ''; $FirstName = ''; $Email = ''; $Birthday = ''; $Birthplace = ''; $Comment = ''; if (isset($_GET['upd'])){ $formId = $_GET['upd']; $results = mysqli_query($db, "SELECT * FROM tbl_form WHERE formId=$formId"); } if(isset($_POST['submit'])) { $formId = $_POST['formId']; $LastName = $_POST['LastName']; $FirstName = $_POST['FirstName']; $Email = $_POST['Email']; $Birthday = $_POST['Birthday']; $Birthplace = $_POST['Birthplace']; $Comment = $_POST['Comment']; $query = "UPDATE tbl_form SET LastName='$LastName', FirstName='$FirstName', Email='$Email', Birthday='$Birthday', Birtplace='$Birthplace', Comment='$Comment' WHERE formId='$formId'"; mysqli_query($db, $query); $_SESSION['msg'] = "Successfully Updated!"; header('location: form.php'); //redirect after inserting } ?> <?php …

Member Avatar
Member Avatar
+0 forum 1

I am not that much of an expert in PHP as it has been few months since I started playing with it. Currently I am working on creating a basic CRUD operation in PHP. I follow this tutorial on CRUD in PHP (https://www.cloudways.com/blog/execute-crud-in-mysql-php/ ) to create it on a local wamp server. However, I am getting following error: Fatal error: Call to a member function fetch_array () on string in C: \ wamp \ www \ crud_oop \ index.php on line 233 Can anyone point out what I am doing wrong? Here is my full code: <div class="container"> <div style="height:50px;"></div> …

Member Avatar
Member Avatar
+0 forum 1

I have a Table that displays titled and first name columns and delete link on the 3rd column. Unfortunately for a reason i don't understand, records are not deleting when the Delete link is clicked. Please friends, help me figure out what's wrong here. Table <?php $user_id = $_SESSION["user_id"]; //brought here via session //select statement here // output data of each row while($row = $result->fetch_assoc()) { echo '<tr> <td scope="row">' . $row["titled"]. '</td> <td> '.$row["firstname"] .'</td> <td><a href="user_delete.php? delete=$row[user_id]">Delete</a> </td> </tr>'; } } else { echo "0 results"; } ?> user_delete.php code <?php session_start(); require_once $_SERVER['DOCUMENT_ROOT'] . '/soap/includes/server.php'; if(isset($_GET["delete"]) ) …

Member Avatar
Member Avatar
+0 forum 2

Hello, I can't display images from database. I have folder called "images" next to index.php where I keep images. I suppose I have wrongly defined folder path with images or sth else. <?php $connection = new mysqli("localhost", "root", "", "crud"); $sql = "SELECT * FROM test"; $res = $connection->query($sql); if(@$res->num_rows > 0) { while($row = $res->fetch_assoc()) { ?> <img src="<?php "C:/xampp/htdocs/img_mysql/images/".$row['image'] ?>" style="width:170px;height:120px" /> <?php } } ?> I put picture with how look my website when I try display images. ![011.jpg](/attachments/large/4/cb5cff474c596085beba1a63f9b6c6b6.jpg "align-center")

Member Avatar
Member Avatar
+0 forum 3

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 am creating an app with android studio and i'm using mySQL.and i want to implement friends feature in my app to enable users send and recieve friend requests, i have created tables and writen the server side php code for that, i have also created an add as friend button that should do that in my app but i'm still unable to write the appropriate code for that in android.your help with this will be highly appreciated.

Member Avatar
Member Avatar
-2 forum 3

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

The End.