Member Avatar

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in F:\xampp\htdocs\ajax\server.php on line 55 // Retrieve comments from database $sql = "SELECT * FROM comments"; $result = mysqli_query($conn, $sql); $comments = '<div id="display_area">'; while ($row = mysqli_fetch_array($result)) { $comments .= '<div class="comment_box"> <span class="delete" data-id="' . $row['id'] . '" >delete</span> <span class="edit" data-id="' . $row['id'] . '">edit</span> <div class="display_name">'. $row['name'] .'</div> <div class="comment_text">'. $row['comment'] .'</div> </div>'; } $comments .= '</div>'; ?>

Member Avatar
+0 forum 1
Member Avatar

[Click Here](https://vimeo.com/user108943040/review/393412654/65b9768044) I have attached a vimeo to the issue, the main issue is that google maps seems to be sluggish and not well tracking and slow. Has anyone got any sugestions? Thanks

Member Avatar
+0 forum 2
Member Avatar

Hello i want to upload an audio file(.mp3). The file is uploaded on the folder, the value is inserted on the db (MySql) so far so good. But when i try to play the file on the uploads folder is says its corrupted or extension is wrong.the value is not base64 is the original name of the file html <form [formGroup]="form" (ngSubmit)="onSubmit()"> <input type="file" name="avatar" (change)="onFileSelect($event)" /> <button type="submit">Upload</button> </form> ts onSubmit() { const formData = new FormData(); formData.append('avatar', this.form.get('avatar').value); this.group_id = 0; this.media.tags = this.hashes; this.media.audio = formData; this.media.browser = true; this.userData.uploadAudio(this.media, this.group_id ).subscribe( (res) => { this.uploadResponse = …

+0 forum 0
Member Avatar

very glad to be here

Member Avatar
+0 forum 1
Member Avatar

hi good day guys, i'm having a trouble with fetching the data i have a list of folder outside like in the picture below ![p1.png](/attachments/large/4/c49da0c2676b0f2d0f5d9acb7afc68bd.png) when i click the first folder the picture below shows the output it has duplicates ![p2.png](/attachments/large/4/9e1c201e5a2edfed6e83663b41116db6.png) i want to know what's the problem with my code why it duplicates the folders. can someone help me out. please... thank you in advance here's my code ![c2.png](/attachments/large/4/5bdfa3d4496764c67c4a61192d59de0d.png) ![c1.png](/attachments/large/4/6d5667c4f98cdcdd9487afb945c6278d.png)

+1 forum 0
Member Avatar

<?php class Post { private $user_obj; private $con; public function __construct($con, $user){ $this->con = $con; $this->user_obj = new User($con, $user); } public function submitPost($body, $user_to) { $body = strip_tags($body); $body = mysqli_real_escape_string($this->con, $body); $check_empty = preg_replace('/\s+/', '', $body); if($check_empty != "") { $date_added = date("Y-m-d H:i:s"); $added_by = $this->user_obj->getUsername(); if($user_to == $added_by) { $user_to = "none"; } $query = mysqli_query($this->con, "INSERT INTO posts VALUES('', '$body', '$added_by', '$user_to', '$date_added', 'no', 'no', '0')"); $returned_id = mysqli_insert_id($this->con); $num_posts = $this->user_obj->getNumPosts(); $num_posts++; $update_query = mysqli_query($this->con, "UPDATE users SET num_posts='$num_posts' WHERE username='$added_by'"); } } public function loadPostsFriends() { $str = ""; //String to return $data …

Member Avatar
+0 forum 1
Member Avatar

Does anybody know how i can connect a PHP web site to an OpenEdge Progress Database. I have the following as a connection file that when I run it does not error but there is also nothing to say it has connected either. I have System DSN 32bit ODBC connection call Live_Vision that I am calling. <? if ($conn_id=odbc_connect("Live_Vision","vision","vision", SQL_CUR_USE_ODBC)){ echo "connected to DSN"; if($result=odbc_do($conn_id, $sql)) { } else { echo "can not execute '$sql' "; } echo "closing connection $conn_id"; odbc_close($conn_id); } else { echo " can not connect to DSN"; } ?>

Member Avatar
+0 forum 1
Member Avatar

My question is this: I'm trying to practice PHP. I use OpenElement as my editor. You can get to know this program through this website: https://www.openelement.com/ Problem is: when I preview the page (with PHP in it) it doesn't display text produced by PHP, but instead it produces the PHP code itself. Do you know OpenElement, and if you know it, do you know how to make it run PHP the way PHP should ben run? Thanks, Leon (joh)

Member Avatar
+0 forum 4
Member Avatar

I am trying to get the usernames of users to appear in the url so that I can use $_GET['username'] to grab the username to create a link to the user's profile which can be viewed by any logged in user. So far I can only the logged in user's username to display in url. So I did a loop/queried the database and selected usernames of all users and created a link of the usernames to appear in the url. So any logged in user can go to the users.php and click on any username to see the detailed information …

Member Avatar
+0 forum 3
Member Avatar

here is my table data.. here is my table data.. (4 Columns/1row in mysql table) id bno date results 310 001 02-15-2020 MI,108.53 Oh,194.57 PA,182.22 WA,238.57 How to split(statemiles) single column into (state, Miles) two columns and output like following 5 columns /4rows in mysql using php code. (5 Columns in mysql table) ------------------------------------------------------------------------------------ id bno date result1 result2 310 001 02-15-2020 MI 108.53 310 001 02-15-2020 Oh 194.57 310 001 02-15-2020 PA 182.22 310 001 02-15-2020 WA 238.57 --------------------- Following php code split two columns perfectly.. (screenshot below) ![separated_columns.jpg](/attachments/large/4/4bd9979bc3fb873826711f30f1a64c03.jpg) <?php //invoice.php include('../includes/config.php'); if(isset($_POST["add"])) { $order_no=$_POST['order_no']; $comma = preg_replace('/,\\s*/', "', …

+0 forum 0
Member Avatar

I have a long/register system working . Each user see their own profile details when they login. Now I want to users to see other users profile by clicking on a link to their profile. How do I do this? I need advice

+0 forum 0
Member Avatar

Hello, i have the following code: index.php <form role="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <label for="products">Product</label> <select id="products" name="products" class="user"> <?php require 'data.php'; $products = loadProducts(); foreach ($products as $product) { echo "<option id='".$product['id']."' value='".$product['id']."' selected>".$product['name']."</option>"; } ?> </select> <label for="bundles">Bundle</label> <select id="bundles" name="bundles"> </select> </form> Script <script type="text/javascript"> $(document).ready(function(){ $("#products").change(function(){ var aid = $("#products").val(); $.ajax({ url: 'data.php', method: 'post', data: 'aid=' + aid }).done(function(bundles){ console.log(bundles); bundles = JSON.parse(bundles); $('#bundles').empty(); bundles.forEach(function(bundle){ $('#bundles').append('<option>' + bundle.name + '</option>') }) }) }) }) </script> data.php <?php require 'DbConnect.php'; if(isset($_POST['aid'])) { $db = new DbConnect; $conn = $db->connect(); $stmt = $conn->prepare("SELECT * FROM bundles …

+0 forum 0
Member Avatar

hello everybody im trying to compute the log(n) while n in the first time =10 and second time =100 , third =1000 and fourth = 10000 but an error still happenening the error is math domain error can anybody help in this code and error import math import logging n = 0 while n <= 10: print(math.log(n)) n = n + 1

Member Avatar
+0 forum 2
Member Avatar

I have always known that urlencode() encodes spaces as plus signs and rawurlencode encodes spaces as %20. However, I always struggled to know when to use which. I just finally learned today that you should use rawurlencode() if encoding URI paths and urlencode() if encoding query strings. Who woulda thunk it would be that simple?! :-P

+1 forum 0
Member Avatar

I am using Magento (Ver 1.9.x) If i try with my localhost success url like, http://192.168.1.65/magento/index.php/checkout/onepage/success/ and return success message with order id. if i try with live, success url like, https://abc.in/payubiz/redirect/success/ success page like blank page. How to solve the issue? Code : https://github.com/ZusZus/Payubiz

Member Avatar
+0 forum 3
Member Avatar

I have a large database of information of characters This contains "owner", "charactername" & a lot more info the owner can easily repeat as they own more then one character. what I'm trying to attempt to figure out how to do is create a list of UNIQUE names and how many times they are listed to own characters example NAME | NUMBER OWNED jane | 5 john | 21 michael | 15 etc. I have a script that queries the database and echos a list but I am unsure how to make that echo query the distinct 'owner' to count …

Member Avatar
+0 forum 11
Member Avatar

Connect your website you must first access HTML content on your website and add the icon. • Copy the pre-authorized icon in HTML content for your website • Then, go to your main page for AdSense to confirm the completion of this step. Copy this icon and paste it << head> </ head> for your website: <script data-ad-client = "pub-6911249275072633" async src = "https://pagead2.googlesyndiction.com

-1 forum 0
Member Avatar

I am still learning PHP and was wondering so don't shoot me down and was wondering why I would get the following error message? 2020-02-01 16:11:14 Error: [InvalidArgumentException] Invalid data type, must be an array or \ArrayAccess instance. Request URL: /auth/signin Referer URL: https://urlsize.com/auth/signup Which then returns "Error: An Internal Error Has Occurred." to the user. The code which I believe is at fault is: public function signin() { if ($this->Auth->user('id')) { return $this->redirect('/'); } $user = $this->Users->newEntity(); $this->set('user', $user); if ($this->request->is('post') || $this->request->query('provider')) { $user = $this->Auth->identify(); if ($user) { $this->Auth->setUser($user); $_SESSION['Auth']['domains_auth'] = 'none'; $multi_domains = get_all_multi_domains_list(); $main_domain = …

Member Avatar
+0 forum 3
Member Avatar

Hi. Google Search Console inform us like this: Referenced AMP URL is not an AMP We do not know what that information is. Can please anyone help? My website is https://adventurejourney.vn/ Thank you in advance for your help! Adventure Journey Team!

Member Avatar
+0 forum 1
Member Avatar

Can anyone suggest me which one is a better platform for e commerce website development?

Member Avatar
+6 forum 21
Member Avatar

<a style="position:absolute;" href='/Superuser/Plantincharge/dashboard.php'>Back</a> <h4 style="position: relative; left:95%;"> <button onclick="myFunction()">Print</button> <script> function myFunction() { window.print(); } </script> </h4> <h3 style="text-align:center; font-family: sans-serif; border-radius: 25px; border: 2px solid #73AD21; padding: 5px; width: 200px; height: 25px; position:relative; left:500px; overflow: hidden;">PROPOSAL No.</h3> <?php //////////////////////////////////////////// // Collecting data from query string $id=$_GET['id']; // Checking data it is a number or not if(!is_numeric($id)){ echo "Data Error"; exit; } // MySQL connection string require "dbconfig.php"; $count="SELECT * FROM createnearmiss where id=?"; if($stmt = $connection->prepare($count)){ $stmt->bind_param('i',$id); $stmt->execute(); $result = $stmt->get_result(); $row=$result->fetch_object(); echo "<table>"; echo " <table> <tr> <th>Details :</th> <td>$row->details</td> </tr> <tr> <th>Location :</th> <td>$row->location</td> </tr> <tr> <th>Date …

+0 forum 0
Member Avatar

How to insert data in sql server 2012 express using php pdo in wamp server 3? What connection string I need to use to connect in the database?

Member Avatar
+0 forum 3
Member Avatar

I used similar process for users to update username and email, but password is giving me a headache <?php if(isset($_SESSION['id'])){ if(isset($_POST['change_password_submit'])){ $usersId = $_SESSION['id']; include 'includes/dbh.inc.php';//connection to database $currentpassword = $_POST['currentpassword']; $newpassword = $_POST['newpassword']; $newpasswordagain = $_POST['newpasswordagain']; $currentHash = password_hash($currentpassword,PASSWORD_DEFAULT); $newHash = password_hash($newpassword,PASSWORD_DEFAULT); if(empty($currentpassword)){ echo '<p id="sorry">Please enter your current password</p>'; } if(empty($newpassword)){ echo '<p id="sorry">Choose a new password!</p>'; } if(strlen($newpassword)<6){ echo '<p id="sorry">Password cannot be less than 6 characters!</p>'; } if(!preg_match("#[0-9]+#",$newpassword)){ echo '<p id="sorry">Password should have at least one number!</p>'; } if(!preg_match("#[A-Z]+#",$newpassword)){ echo '<p id="sorry">Password should have at least one UpperCase letter!</p>'; } if(!preg_match("#[\W]+#",$newpassword)){ echo '<p id="sorry">Password must have …

Member Avatar
+0 forum 5
Member Avatar

hi i was set the task to increment a number by x every x seconds and i tried to find some code off the net, but found the subject covered very sparsley so for whoevers benefit ill post the code here hope it helps :) [CODE] <html> <head> <style type="text/css"> div.cont { position: relative; background-image: url(counter.gif); width:160px; height:110px; vertical-align:text-bottom; } div.cont div.ans { position: absolute; bottom: 0px; margin-bottom:15px; margin-left:7px; color:black; font-family: Verdana, Tahoma, Sans-Serif; font-size: 15pt; line-height: normal; } </style> <?php $now = time(); $start = mktime(0, 0, 0, 1, 24, 2007); $carbonsaving =((($now - $start) * 0.0058774) + 130000); …

Member Avatar
+0 forum 9
Member Avatar

Hello all i am a newbie and i would love to learn from you all. Please help me as i am making a project with phpmysqli where i need to approve a pending status! Here's my code. Kindly help me thanks. <?php //////////////////////////////////////////// // Collecting data from query string $id=$_GET['id']; // Checking data it is a number or not if(!is_numeric($id)){ echo "Data Error"; exit; } // MySQL connection string require "dbconfig.php"; $count="SELECT * FROM createnearmiss where id=?"; if($stmt = $connection->prepare($count)){ $stmt->bind_param('i',$id); $stmt->execute(); $result = $stmt->get_result(); $row=$result->fetch_object(); echo "<table>"; echo " <table> <tr> <th>Details :</th> <td>$row->details</td> </tr> <tr> <th>Location :</th> <td>$row->location</td> …

Member Avatar
+0 forum 1
Member Avatar

I have a database, where I store Job Openings, Where I store Job Descriptions with formats in RichText Box like: bullet points, ordered lists and bold text etc... But when I save data in MySQL Database and Retrive it from Database it comes format less. Can anyone help me regarding this issue?

+0 forum 0
Member Avatar

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
+0 forum 9
Member Avatar

hello, my sign in working fine..but not my logout and signin script...help please. this is my logout script: <?php session_start(); session_unset(); session_destroy(); header("Location: index.php"); and my signin script: <?php if (isset($_POST['login-submit'])) { require 'dbh.inc.php'; $mailuid = $_POST['mailuid']; $password = $_POST['pwd']; if(empty($mailuid) || empty($password)) { header("Location: ../index.php?error=emptyfields"); exit(); } else{ $sql = "SELECT * FROM users WHERE uidUsers=?; "; $stmt = mysqli_stmt_init($conn); if (!mysqli_stmt_prepare($stmt, $sql)) { header("Location: ../index.php?error=sqlerror"); exit(); } else{ mysqli_stmt_bind_param($stmt, "s", $mailuid); mysqli_stmt_execute($stmt); $result = mysqli_stmt_get_result($stmt); if ($row = mysqli_fetch_assoc($result)) { $pwdCheck = password_verify($password, $row['pwdUsers']); if ($pwdCheck == flase) { header("Location: ../index.php?error=wrongpassword"); exit(); } else if($pwdCheck == true) { …

Member Avatar
+0 forum 2
Member Avatar

**How to create pdf report in php easily ?**

Member Avatar
+0 forum 9
Member Avatar

I've just started working with PHP and MySQL, and I'm trying to create a table in MySQL. If I've got this right, I'm trying to do so by going to my host's SQL MyAdmin page and typing in mysql_query("CREATE TABLE example( id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), name VARCHAR(30), age INT)") in the query tab. I get an error saying that my syntax is wrong. Any advice?

Member Avatar
+0 forum 4

The End.