|
I have an input box and a search button, when someone enter some query in input box and press the button then I want to show the results from google on that page. Is it possible to do it with JavaScript or PHP or any other language?
|
|
|
|
|
i have three condition like if(isset($_POST['search']) & !empty($_POST['searchdata']) ) and if(isset($_POST['search']) & !empty($_POST['seardate']) ) and else . these are searching input text field name searchdata and searchdate and esle if empty.
when first condition is true pagination is aslo create according to is t condition similarly on both two condition pagination is created.but confusion when i click on pagination cursor goes to else condition and again all page is shown in pagination.what i can doing wrong... i want if pagination is created in first condition and i click on pagination the cursor should be goes to first condition and the pagination is created upon second condition and i click it should go to second part not to else.
|
|
|
|
|
There's a secret error somewhere in your secret code. You need to fix that.
Seriously, how do you expect anyone to be able to help you fix code we cannot see running on a server we cannot access, based solely on a brief description of the behaviour?
Edit your message and provide the relevant parts of your code, and a clear description of what the problem is, what you have tried, and where you are stuck. Remember to include the full details of any errors.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
i proved code of page Problem is when any condition is true and pagination is created according to condition then upon clicking any page why page number is wrong in below part
<?php
include('includes/checklogin.php');
check_login();
?>
<!DOCTYPE html>
<html lang="en">
<?php @include("includes/head.php");?>
<body>
<div class="container-scroller">
<!-- partial:../../partials/_navbar.html -->
<?php @include("includes/header.php");?>
<!-- partial -->
<div class="container-fluid page-body-wrapper">
<!-- partial:../../partials/_sidebar.html -->
<?php @include("includes/sidebar.php");?>
<!-- partial -->
<div class="main-panel">
<div class="content-wrapper">
<div class="row">
<div class="col-lg-12 grid-margin stretch-card">
<div class="card">
<!-- start modal -->
<div id="editData5" class="modal fade">
<div class="modal-dialog modal-lg">
<div class="modal-content" >
<div class="modal-header" >
<h5 class="modal-title" >View Visitor details</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body" id="info_update5">
<?php @include("view_visitor_details.php");?>
</div>
<div class="modal-footer ">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<!-- /.modal -->
</div>
<h4 class="new-title">View Visitor details</h4>
<!-- end modal -->
<div class="table-responsive p-3" style="margin-top: -15px;">
<table class="content-table" id="dataTableHover">
<thead>
<tr>
<th class="text-center">No</th>
<th class="text-center">Full Name</th>
<th class="text-center">Card#</th>
<th class="text-center">Department</th>
<th class="text-center">Facility Visit</th>
<th class="text-center">Status</th>
<th class="text-center">Reg Date</th>
<th class="text-center" style="width: 15%;">Action</th>
</tr>
</thead>
<tbody>
<?php
if(isset($_POST['search']) & !empty($_POST['searchdata']) )
{
session_start();
$pdf_data =$_POST['searchdata'];
$_SESSION['pdf-data']= $pdf_data;
$sdata=$_POST['searchdata'];
$limit=10;
if(isset($_GET['page1']))
{
$page=$_GET['page1'];
$cnt=(($page-1)*$limit) + 1;
}
else
{
$page=1;
$cnt=1;
}
$offset = ($page-1)*$limit;
?>
<h4 align="center">Result against "<?php echo $sdata;?>" keyword </h4>
<?php
$query="select * from tblvisitor where FullName like '%$sdata%'||MobileNumber like '$sdata%'";
$sql_run=mysqli_query($connection,$query);
$num_rows = mysqli_affected_rows( $connection );
$cnt=1;
while ($row=mysqli_fetch_array($sql_run))
{
?>
<tr>
<td class="text-center"><?php echo ($cnt);?></td>
<td class="text-center"><?php echo $row['FullName'];?></td>
<td class="text-center"><?php echo $row['Cardno'] ;?></td>
<td class="text-center"><?php echo $row['Deptartment'] ;?></td>
<td class="text-center"><?php echo $row['Facility'] ;?></td>
<td class="text-center"><?php echo $row['Status'];?></td>
<td class="text-center"><?php echo date ("d-m-Y", strtotime($row['EnterDate']) );?></td>
<td class=" text-center">
<a href="#" class=" edit_data5" id="<?php echo $row['ID'] ?>" title="click to view"> class="mdi mdi-eye"></a>
</td>
</tr>
<?php
$cnt=$cnt+1;
}}
elseif (isset($_POST['search']) & !empty($_POST['date-search'])) {
echo "elseif for pagnation of data wise search is started" ;
session_start();
$sdata=$_POST['date-search'];
$_SESSION['pdf-newdata']= $sdata;
?>
<h4 align="center">Result against "<?php echo date ('d-m-Y', strtotime($sdata));?>" keyword </h4>
<?php
$limit=10;
if(isset($_GET['page']))
{
$page=$_GET['page'];
$cnt=(($page-1)*$limit) + 1;
}
else
{
$page=1;
$cnt=1;
}
$offset = ($page-1)*$limit;
$new_date=date ('d-m-Y', strtotime($sdata));
echo $new_date;
$query="select * from tblvisitor where date_format(enterdate,'%Y-%m-%d')=date('$sdata') LIMIT {$offset},{$limit}";
$sql_run=mysqli_query($connection,$query);
$num_rows = mysqli_affected_rows( $connection );
$cnt=1;
while ($row=mysqli_fetch_array($sql_run))
{
?>
<tr>
<td class="text-center"><?php echo ($cnt);?></td>
<td class="text-center"><?php echo $row['FullName'];?></td>
<td class="text-center"><?php echo $row['Cardno'] ;?></td>
<td class="text-center"><?php echo $row['Deptartment'] ;?></td>
<td class="text-center"><?php echo $row['Facility'] ;?></td>
<td class="text-center"><?php echo $row['Status'];?></td>
<td class="text-center"><?php echo date ("d-m-Y", strtotime($row['EnterDate']) );?></td>
<td class=" text-center">
<a href="#" class=" edit_data5" id="<?php echo $row['ID'] ?>" title="click to view"> class="mdi mdi-eye"></a>
</td>
</tr>
<?php
$cnt=$cnt+1;
}}
else { ?>
<?php
echo "after pagantion else if is started";
session_start();
$pdf_data =$_POST['searchdata'];
$_SESSION['pdf-data']= $pdf_data;
$sdata=$_POST['date-search'];
$_SESSION['pdf-newdata']= $sdata;
$limit=10;
if(isset($_GET['page']))
{
$page=$_GET['page'];
$cnt=(($page-1)*$limit) + 1;
}
else
{
$page=1;
$cnt=1;
}
$offset = ($page-1)*$limit;
$connection = mysqli_connect("localhost","root","","cvdb");
$query="SELECT * from tblvisitor ORDER BY id DESC LIMIT {$offset},{$limit}" ;
$sql_run=mysqli_query($connection,$query);
$num_rows = mysqli_affected_rows( $connection );
while ($row=mysqli_fetch_array($sql_run)) {
?>
<tr>
<td class="text-center"><?php echo ($cnt);?></td>
<td class="text-center"><?php echo $row['FullName'];?></td>
<td class="text-center"><?php echo $row['Cardno'] ;?></td>
<td class="text-center"><?php echo $row['Deptartment'] ;?></td>
<td class="text-center"><?php echo $row['Facility'] ;?></td>
<td class="text-center"><?php echo $row['Status'];?></td>
<td class="text-center"><?php echo date ("d-m-Y", strtotime($row['EnterDate']) );?></td>
<td class=" text-center">
<a href="#" class=" edit_data5" id="<?php echo $row['ID'] ?>" title="click to view"> class="mdi mdi-eye"></a>
</td>
</tr>
<?php
$cnt=$cnt+1;
$tot_rec=$cnt;
}
} ?>
</tbody>
</table>
<?php
if(isset($_POST['search']) & !empty($_POST['searchdata']) )
{
echo "pagntion mobile and name";
$connection2 = mysqli_connect("localhost","root","","cvdb");
$query2="select * from tblvisitor where FullName like '%$sdata%'||MobileNumber like '$sdata%' " ;
$sql_run2=mysqli_query($connection2,$query2);
$num_rows2 = mysqli_affected_rows( $connection2 );
echo $num_rows2;
echo '<ul class="pagination pagination-sm">';
if ($page>1)
{
echo '<li><a href="manage_visitor.php?page='.($page - 1).'" class="page-link" >Prev</a></li>';
}
if (mysqli_num_rows($sql_run2)>0 )
{
$total_record = mysqli_num_rows($sql_run2);
$total_pages = ceil($total_record/$limit);
for ($i=1; $i<=$total_pages;$i++)
{
if ($i == $page)
{
$active="page-item active";
}
else
{
$active="";
}
echo '<li class="'.$active.'" ><a class="page-link" href="manage_visitor.php?page1='.$i.'">'.$i.'</a></li>';
}
if ( $total_pages>$page)
{
echo '<li><a href="manage_visitor.php?page='.($page + 1).'" class="page-link" >Next</a></li>';
}
echo '</ul>';
}
}
elseif (isset($_POST['search']) & !empty($_POST['date-search']))
{
echo "pagnation date wise search " ;
$connection2 = mysqli_connect("localhost","root","","cvdb");
$query2="select * from tblvisitor where date_format(enterdate,'%Y-%m-%d')=date('$sdata') " ;
$sql_run2=mysqli_query($connection2,$query2);
$num_rows2 = mysqli_affected_rows( $connection2 );
echo $num_rows2;
echo '<ul class="pagination pagination-sm">';
if ($page>1)
{
echo '<li><a href="manage_visitor.php?page='.($page - 1).'" class="page-link" >Prev</a></li>';
}
if (mysqli_num_rows($sql_run2)>0 )
{
$total_record = mysqli_num_rows($sql_run2);
$total_pages = ceil($total_record/$limit);
for ($i=1; $i<=$total_pages;$i++)
{
if ($i == $page)
{
$active="page-item active";
}
else
{
$active="";
}
echo '<li class="'.$active.'" ><a class="page-link" href="manage_visitor.php?page='.$i.'">'.$i.'</a></li>';
}
if ( $total_pages>$page)
{
echo '<li><a href="manage_visitor.php?page='.($page + 1).'" class="page-link" >Next</a></li>';
}
echo '</ul>';
}
}
else
{
echo "else pagntion no search criterai ";
$connection1 = mysqli_connect("localhost","root","","cvdb");
$query1="SELECT * from tblvisitor ORDER BY id DESC " ;
$sql_run1=mysqli_query($connection,$query1);
$num_rows1 = mysqli_affected_rows( $connection );
echo '<ul class="pagination pagination-sm">';
if ($page>1)
{
echo '<li><a href="manage_visitor.php?page='.($page - 1).'" class="page-link" >Prev</a></li>';
}
if (mysqli_num_rows($sql_run1)>0 )
{
$total_record = mysqli_num_rows($sql_run1);
$total_pages = ceil($total_record/$limit);
for ($i=1; $i<=$total_pages;$i++)
{
if ($i == $page)
{
$active="page-item active";
}
else
{
$active="";
}
echo '<li class="'.$active.'" ><a class="page-link" href="manage_visitor.php?page='.$i.'">'.$i.'</a></li>';
}
if ( $total_pages>$page)
{
echo '<li><a href="manage_visitor.php?page='.($page + 1).'" class="page-link" >Next</a></li>';
}
echo '</ul>';
}
}
?>
</div>
<!-- <li class="page-item active" aria-current="page">-->
</div>
</div>
</div>
</div>
<!-- content-wrapper ends -->
<!-- partial:../../partials/_footer.html -->
<?php @include("includes/footer.php");?>
<!-- partial -->
</div>
<!-- main-panel ends -->
</div>
<!-- page-body-wrapper ends -->
</div>
<!-- container-scroller -->
<?php @include("includes/foot.php");?>
<!-- End custom js for this page -->
<script type="text/javascript">
$(document).ready(function(){
$(document).on('click','.edit_data5',function(){
var edit_id5=$(this).attr('id');
$.ajax({
url:"view_visitor_details.php",
type:"post",
data:{edit_id5:edit_id5},
success:function(data){
$("#info_update5").html(data);
$("#editData5").modal('show');
}
});
});
});
</script>
</body>
</html>
|
|
|
|
|
When we install Ubuntu Server all we get is terminal only access. I admit we can install necessary GUI like KDE, GNome etc.
But my concern is whether there would be any security concern to be taken care of when installing anything like this for an Ubuntu Server Azure or AWS? Because I guess with a GUI we also need to expose ports for RDP unlike Private/Public key using Putty.
|
|
|
|
|
mysqli_num_rows(): Argument #1 ($result) must be of type mysqli_result, bool given in C:\xampp\htdocs\binemorg\required\op_lib.php:689 Stack trace: #0 C:\xampp\htdocs\binemorg\required\op_lib.php(689): mysqli_num_rows(false) #1 C:\xampp\htdocs\binemorg\required\op_lib.php(277): get_multi_data('employee_attend...', Array, ' order by id de...') #2 C:\xampp\htdocs\binemorg\employee_attendance.php(8): insert_row('employee_attend...') #3 {main} thrown in C:\xampp\htdocs\binemorg\required\op_lib.php on line 689
|
|
|
|
|
Paste the start of your error message into Google, or your preferred search engine, and you will find the hundreds of times this exact question has been asked before.
The answer hasn't changed: mysql_query[^] returns false if the query fails. You need to test for that before trying to count the number of rows.
As to why your query failed, that's up to you. You haven't shown any code, nor the structure of your database, so nobody can tell you what the problem with your query is.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
need to add date in the file name into outfile caluse below please suggest
SET @outpath = "/var/lib/mysql-files/";
SET @outfile = (SELECT NOW());
SET @outextension = "_StepCount.csv";
SET @SQL := CONCAT("Select Concat(ifnull(First_Name,'')," ",ifnull(Middle_Name,'')," ",ifnull(Last_name,'')) AS Name, u.email from users",@outpath,@outfile,@outextension ) ;
PREPARE stmt FROM @SQL;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
|
|
|
|
|
$offline = $odb->query("SELECT COUNT(*) FROM bots WHERE (UNIX_TIMESTAMP()-time)>20")->fetch()[0];
$offliner $offline->fetchColumn();
|
|
|
|
|
I want to solve a PHP issue
I have a db with 2 tables: first one is "document":
id | title |
================================
1 | equations |
2 | great |
3 | painting |
second one is "pic":
id | doc_id | description
===============================================
1 | 1 | "mathematics"
2 | 1 | "physic"
3 | 2 | "litterature"
4 | 2 | "art"
the "doc_id" is a foreign key, related to the id of the table "document"
this is my question: I'm trying to print for each title, all the descriptions related to it, example:
for the title "equations" , the foreign key related to it, is "doc_id =1"
wich means for "equations" i will print "matematics" and "physic"
the final table printed using PHP and SQL, on my browser, should be:
| tiltle | description
===============================================
| equations | mathematics, physic
| great | litterature , art
| painting |
Here's my code:
<pre><?php
$servername = "localhost";
$username = "root";
$password = "root";
$dbname = "doc-pic";
$conn = mysqli_connect($servername, $username, $password, $dbname);
$sql = "SELECT * FROM pic LEFT JOIN document ON pic.doc_id=document.id";
$result = mysqli_query($conn, $sql);
$sql1 = "SELECT title from document";
$result1 = mysqli_query($conn, $sql1);
?>
<table>
<?php
if (mysqli_num_rows($result1) > 0)
while($row = mysqli_fetch_array($result1)){?>
<tr>
<td><?php echo $row["title"]; ?></td>
</tr>
<?php if (mysqli_num_rows($result) > 0 )
while($row = mysqli_fetch_array($result)){
?>
<tr>
<td><?php echo $row["doc_id"]; ?></td>
<td><?php echo $row["description"]; ?></td>
</td>
</tr>
</td>
<?php }
} ?>
thanks in advance
|
|
|
|
|
|
<pre>I have an issue while calculating the column-like bank statement. actually, I am trying to calculate Opening Balance/today In /today Out / Closing Bal in MySQL PHP. I have two tables. material_infor `IN +` entry and material_approvefor `OUT -`. I am considering my opening balance was `123`.
I am new in PHP and I am here using Union All function. Please help me to create the function for getting Opening / In today / out today/closing calculation in my code.
`table- material_in`
| id | components_key | insert_date | credit |
|------|----------------|-------------|-------------|
| 1 | 12345 | 2021-04-16 | 100 |
| 2 | 12345 | 2021-04-16 | 50 |
`table- material_approve`
| id | components_key | insert_date | debit |
|------|----------------|-------------|-------------|
| 1 | 12345 | 2021-04-16 | 30 |
| 2 | 12345 | 2021-04-16 | 2 |
<pre>I am trying the code -
SELECT
`u`.`component_key`,
`u`.`insert_date`,
`u`.`transaction_qty`
FROM
(
SELECT
`components_key` AS `component_key`,
`insert_date`,
`credit` AS `transaction_qty`
FROM
`material_in`
UNION ALL
SELECT
`components_key`,
`insert_date`,
`debit` AS `transaction_qty`
FROM
`material_approve`
) u
WHERE
`u`.`component_key` = '12345'
ORDER BY
`u`.`insert_date`
DESC
the output comes -
| components_key | insert_date | transaction_qty|
|-------------|-------------|------------|
| 12345 | 2021-04-16 | 100 |
| 12345 | 2021-04-16 | 50 |
| 12345 | 2021-04-16 | 30 |
| 12345 | 2021-04-16 | 2 |
`output will be-`
| components_key | insert_date | openbal| today_in | today_out | closebal
|-----------|-------------|-------------|----------|-----------|---------|
|12345 | 2021-04-16 | 123 | 100 | 30 | 193 |
|12345 | 2021-04-16 | 193 | 243 | 2 | 241 |
|
|
|
|
|
This is not a php issue. This is Mysql.
Where are you stuck?
|
|
|
|
|
I was using netbeans for php development before, now VSCode.
My question is why every time I run / load a page, VSCode opens a new blank window... even though VScode is already open... why!? It is true even when I am not debugging!
Even when I run the most basic code to debug,
<?php
phpinfo();
?>
it always opens a new VS Code Window (Untitled-1). Then, let say I press Reload, it again opens the same blank screen.
I am using "PHP Debug" as a extension, and my launch.json is:
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9000
}
]
}
I do not want to open a new vs window each page I debug. How to fix that?
|
|
|
|
|
When you run a website from VS Code it opens the browser? Is that what you are asking about?
|
|
|
|
|
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, bool given in C:\xampp\htdocs\phs\check.php on line
|
|
|
|
|
Pasting your error message into Google gives 211,000 results where other people have asked exactly the same question:
mysqli_fetch_array() expects parameter 1 to be mysqli_result, bool given - Google Search[^]
Or you could check the documentation:
Returns false on failure. For successful queries which produce a result set, such as SELECT, SHOW, DESCRIBE or EXPLAIN, mysqli_query() will return a mysqli_result object. For other successful queries, mysqli_query() will return true.
So either your query is failing, or it doesn't return a result set.
We can't tell you which, since you haven't shown us any of your code.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
$marks2 = [
"student1" =>
[
"Physics" => 58,
"Chemistry" => 64,
"Biology" => 83
],
"student2" =>
[
"Physics"=> 68,
"Chemistry" => 84,
"Biology" => 82
],
"student3" =>
[
"Physics"=> 69,
"Chemistry" => 84,
"Biology" => 89
]];
|
|
|
|
|
What language is this supposed to be? And exactly what do you mean by "echo the numbers" ?
If it is PHP then see PHP: list - Manual[^].
|
|
|
|
|
I would to import csv products to mysql using below codes but i don't know what framework to use
the data is large more than 100000 products
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use PDO;
class ImportProducts extends Command
{
protected $signature = 'import:products';
protected $description = 'Imports products into database';
public function __construct()
{
parent::__construct();
}
public function handle()
{
$contents = file_get_contents('products.csv');
$lines = explode("\n", $contents);
$i = 0;
foreach ($lines as $line) {
$fields = explode(';', $line);
$pdo = new PDO('mysql:dbname=coding_challenge;host=172.0.0.1;port=3306', 'root', 'secret');
$query = $pdo->prepare("SELECT COUNT(*) AS c from products WHERE id=?");
$result = $query->execute([$fields[0]]);
if($query->rowCount()) {
$pdo->query('DELETE FROM products WHERE id = "' . $fields[0] . '"');
print('Deleted existed product to be updated.');
}
$query = $pdo->prepare('INSERT INTO products (id, name, sku,status,variations, price, currency) VALUES (?, ?, ?, ? , ? , ?, ?)');
$result = $query->execute([$fields[0], ($fields[4] ?? ''), ($fields[5] ?? ''), ($fields[6] ?? ''), ($fields[9] ?? ''), ($fields[10] ?? '') ]);
$i++;
}
die('Updated ' . $i . ' products.');
}
}
<?php
namespace App\Console;
use App\Console\Commands\ImportProducts;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
protected $commands = [
ImportProducts::class,
];
protected function schedule(Schedule $schedule)
{
}
protected function commands()
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}
|
|
|
|
|
Please give me login page code in html,css,php,mysql
|
|
|
|
|
Sorry, this site does not provide code to order. Google is your friend, so that is a good place to start your research.
|
|
|
|
|
Hello.
First of all, i want to apologize for my question, since the code im about to post is way outdated.
I am hosting this script on a server which is running a very old version of php.
The website is used by me and 2 other friends, and we are the only ones able to connect to it, due to .htaccess only showing the page to recognized ip adresses.. So there is no need to protect against sql injection or anything.
Now that thats out of the way, here is the problem i am facing:
i have a php script, which is showing a dropdown menu, with values gathered from a mysql table called chat_clothes.
I then have a submit button, that is supposed to post whatever you have chosen in the dropdown menu, to another table called chat_brugere
But when i click the submit button, it posts "Resource id #7", instead of the selected value.
Here is my code:
<?php
@session_start();
header('Content-Type: text/html; charset=ISO-8859-1');
include('includes/config.php');
?>
<link rel="stylesheet" type="text/css" href="css/chat.css" />
<div id="sidebar_header">Garderobe</div>
<div id="sidebar_content">
<p style="display: inline;">Skid i havet.</p><br /><br />
<select name="sko">
<?php
if(isset($_SESSION['logget_ind']) && $_SESSION['logget_ind'] == true) {
$getSko = mysql_query("SELECT `navn` FROM `chat_clothes` WHERE `ejer` = '".$_SESSION['brugernavn']."' AND `type` = 'sko'");
while ($showSko = mysql_fetch_array($getSko)) {
echo '<option id="sko" name="sko" style="width: 300px;">'.$showSko['navn'].'</option><br />'
;
}
}
?>
</div>
</select>
<?php
if (isset($_POST['sko'])) {
mysql_query("UPDATE chat_brugere SET shoes='".$getSko."' WHERE id='".$_SESSION['id']."'");
echo 'sko er opdateret!';
} else {
echo '';
}
echo '
<form action="nygad.php" method="POST">
<div>
<table>
<tr>
<td><center><input type="submit" name="sko" value="Opdater!" /></center></td>
</tr>
</table>
</div>
</form>
';
?>
|
|
|
|
|
If the user can have any influence over the bruggernavn or id session variables, or the content of the navn column, then your queries will be vulnerable to SQL Injection[^]. NEVER use string concatenation to build a SQL query. ALWAYS use a parameterized query.
PHP: SQL Injection - Manual[^]
If they can influence the navn column, there's also a danger of a persisted cross-site scripting vulnerability, since you don't properly encode the output.
Cross Site Scripting (XSS) | OWASP[^]
Beyond that, you're setting the shoes column to the $getSko variable, which is the object returned by your mysql_query call. I suspect you wanted to set it to the $_POST['sko'] value instead.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
You are correct.
Should it be
mysql_query("UPDATE chat_brugere SET shoes='".$_POST['sko']."' WHERE id='".$_SESSION['id']."'");
instead of
mysql_query("UPDATE chat_brugere SET shoes='".$getSko."' WHERE id='".$_SESSION['id']."'");
?
Cause then it just posts the button value which is "Opdater!"
|
|
|
|
|