small help with mysql php

Job ID: 36554460

Budget: €8 – €30 EUR

Project Title: Optimize MySQL Query Performance

I am looking for a freelancer who can assist me with my MySQL query performance. Specifically, I need add a extra sql line. I think mysqli is needed but i am not sure.

Specific Task:
- let the script workin as is now does but i need select "spelnummer" where spelersnaam is the one that is "Get" from the previous page.

Queries 1 (that works already, expect the $spelnummer part for the location)
<?php
require_once("db.php");
$spelersnaam = $_GET['spelersnaam'];


if((isset($_GET['spelersnaam']) !=''))
{


$spelersnaam = $conn->real_escape_string($_GET['spelersnaam']);


$sql = "UPDATE spelers SET actief='1' WHERE spelersnaam = '".$spelersnaam."'";
if(!$result = $conn->query($sql)){
die('There was an error running the query [' . $conn->error . ']');
}
else
{
$website = "http://192.168.178.28/$spelnummer";
header("Location: $website");
}
}
else
{
echo "Please fill Name and Email";
}

?>

Query 2:
As said Query2 that needs to be combined should select spelnummer from spelers where spelersnaam = $spelersnaam (so that it can be used in this part $website = "http://192.168.178.28/$spelnummer";)

Ideal Skills and Experience:
- Expertise in MySQL and PHP
- Experience with query optimization

If fixed quick and good then i have more small website / html / css / php/msql things.
If you read the complete text please start your message with Stawberry, then I am sure you have read everything.

Greetings Marc
Related categories: PHP SQL MySQL HTML