Updating the count from the user making a slection from a PHP form

Hi I have a mysql database called colordb and a table in that database called colorchoic with three rows call id, color and value. The color row has eight colors stored in it they are yellow, blue, green, red, black, orange, brown, white. I then have a PHP select from that will populate select form by pulling the colors from the database. I would like to know if there is anyway of getting the user to select a color which will then add 1 to the value row. So for instance if I get six users to select their favorite color the database might look something like this table below.

The table/database before the six users select their inputs (colors).

   Color       Value
   
        Orange       0
        Red             0
        Blue            0
        Black           0
        Yellow         0
        Green         0
        White          0
        Brown         0

The table/batabase after the six users select their input (colors)

color    Value
   Orange       0
   Red             2
   Blue            1
   Black           1
   Yellow         1
   Green         1
   White          0
   Brown         0

his is my PHP code

<?php

// create a db connection
$con = mysqli_connect ("localhost", "user", "password", "colorbd");


// Check connection
if ($con === false){
die ("ERROR: could not connect to database." . mysqli_connect_error ());
}

$sql = "SELECT color FROM colorchoice";
$result = $con->query($sql);

if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
    echo "color: " . $row["color"]. " <br>";
    }
} else {
    echo "0 results";
}

?>

So what I'm trying to do is allow the user to only select a color from a select which will then add 1 to the value row each time the user selects a color.
Harkin32Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chris StanyonWebDevCommented:
When the user submits the form, you would need to run a query something along these lines:

UPDATE colorchoic SET value = value + 1 WHERE id = ??;

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Harkin32Author Commented:
Chris Stanyon Hi thanks for your answer and please bear with me as I am only learning PHP and MySQL at them moment. Cold your please give me a more detailed answer incorporating my code. Also as the Id is the primary key would it be possible to user the color field instead so instead of  UPDATE colorchoic SET value = value + 1 WHERE id = ??;  It would be UPDATE colorchoic SET value = value + 1 WHERE values = color;
0
Chris StanyonWebDevCommented:
It's always safer to update a database using the Primary Key, so I would recommend you stick to using that. When you create your <option> tags, use the 'id' field as the value:

$sql = "SELECT id, color FROM colorchoice";
$result = $con->query($sql);

if ($result->num_rows > 0) {
   // output data of each row
   echo "<select name='colorchoice'>
   while($row = $result->fetch_assoc()) {
      //Create the <option> tags for the <select>
      printf("<option value='%s'>%s</option>", $row['id'], $row['color']);
   }
   echo "</select>
}

Open in new window


Now, when you submit the form, you will receive the id of the selected colour value in a POST key called colorchoice. You then use this to update your database. Because you are inserting user data into your database, it's best to use a prepared statement

if ($stmt = $con->prepare("UPDATE colorchoice SET value = value + 1 WHERE id = ?") ):
   // bind the parameter
   $stmt->bind_param("s", $POST['colorchoice']);
   // Execute query
   $stmt->execute();
endif;

Open in new window

0
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

Harkin32Author Commented:
@ Chris Stanyon Thanks can I assume that I can use this code if I wanted to use radio buttons or check boxes instead of select boxes by   changing the <select> tags for radio button tags an so on
0
Chris StanyonWebDevCommented:
Absolutely - as long as you pass in the ID as the value:

while($row = $result->fetch_assoc()) {
     printf("<input type='radio' name="colourchoice" value='%s'>%s", $row['id'], $row['color'] );
}

Open in new window


Probably wouldn't advise using checkboxes as they allow a user to select more than one - doesn't sound like that would work for your model.
0
Harkin32Author Commented:
Hi Chris Stanyon sorry to bother you aging its just that a want to completely understand what am doing or in this case  what the code does.  I understand most of it apart from 2 things on the line.

if ($stmt = $con->prepare("UPDATE colorchoice SET value = value + 1 WHERE id = ?") ):

What does $stmt mean is it a variable called statement or stmt for short.
Also how do I get the ID without mowing what the id is?
0
Chris StanyonWebDevCommented:
$stmt is just a variable name - the prepare() method returns something called a mysqli statement object, so many people tend to use a variable name $stmt - it can be anything you like - $updateColours for example. Aall the code examples you see on the PHP website use $stmt.

What it does is prepare a query ready to be run later. The question mark in the query is called a placed holder and the value for it will be sent to the server only when when you call the execute() method. The data that gets sent is defined by the bind_param() method. In the code I posted earlier, you'll see that the place holder is bound to a value being passed from your form called colourchoice ($_POST['colourchoice']).

Not sure what you mean by getting the ID without knowing what the id is. The id of the colour a user chooses is sent from the form (select or radio button) and as I said, is sent in the variable called $_POST['colourchoice'] (assuming you've followed my code). Added some extra comments that might help you understand

// Prepare the query to be be run later on. Store it in a variable called $stmt, and tell it to expect the id later (?)
if ($stmt = $con->prepare("UPDATE colorchoice SET value = value + 1 WHERE id = ?") ):
   // tell the query where the placeholder data comes from - in this case the ID comes from the POST array (colourchoice) and is a string (s)
   $stmt->bind_param("s", $_POST['colorchoice']);
   // Now run the query
   $stmt->execute();
endif;

Open in new window

0
Harkin32Author Commented:
Thanks sorry for all the questions am just trying to learn PHP and understand what the code does but your comments cane code help a lot thanks.
0
Harkin32Author Commented:
Thanks for being so help full
0
Chris StanyonWebDevCommented:
No need to apologise - that's what we're here for :)
0
Ray PaseurCommented:
I know this question is already closed, but since it's a common question we have some articles here at E-E that may be helpful.

If you're new to PHP, here are some getting-started resources:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_11769-And-by-the-way-I-am-new-to-PHP.html

The whole "voting" concept is demonstrated here:
http://www.experts-exchange.com/Programming/Languages/Scripting/PHP/A_5256-Simple-Vote-Counting-in-PHP-and-MySQL.html

Best of luck with your project, ~Ray
0
Harkin32Author Commented:
@ Chris Stanyon hay thinks for your aging for your help as I was saying I am just learning php myself and I have a friend who is giving me small tasks which is where my previous question came from. So any way its been a while since have been able to practice and this morning I tried using the code in the answer but after testing it I got this error message

parse error: syntax error, unexpected 'value' (T_STRING), expecting ',' or ';' in C:\wamp\www\Harkin_C\insertColors.php on line 32​

I don't understand what this error message means Can you help?

Also my friend asked if the code is suing some sort of jQuery library
0
Harkin32Author Commented:
Here is my code the I have put the line with the error in  bold

<?php

// create a db connection
$con = mysqli_connect ("localhost", "student", "student", "colorbd");


// Check connection
if ($con === false){
die ("ERROR: could not connect to database." . mysqli_connect_error ());
}

$sql = "SELECT color FROM colorchoice";
$result = $con->query($sql);

if ($result->num_rows > 0) {
    // output data of each row
    while($row = $result->fetch_assoc()) {
        echo "color: " . $row["color"]. " <br>";
    }
} else {
    echo "0 results";
}

$sql = "SELECT id, color FROM colorchoice";
$result = $con->query($sql);

if ($result->num_rows > 0) {
   // output data of each row
   echo "<select name='colorchoice'>
   while($row = $result->fetch_assoc()) {
      //Create the <option> tags for the <select>
      printf("<option value='%s'>%s</option>", $row['id'], $row['color']);
   }
   echo "</select>
}
// Prepare the query to be be run later on. Store it in a variable called $stmt, and tell it to expect the id later (?)
if ($stmt = $con->prepare("UPDATE colorchoice SET value = value + 1 WHERE id = ?") ):
 // tell the query where the placeholder data comes from - in this case the ID comes from the POST array (colourchoice) and is a string (s)
   $stmt->bind_param("s", $POST['colorchoice']);
   // Execute query
   $stmt->execute();
endif;

mysqli_close($con);
?>
0
Chris StanyonWebDevCommented:
Hey Harkin,

The error is not actually on the line you said. It's actually a couple of lines before (and after). You're missing the end semi-colon from your echo lines.

if ($result->num_rows > 0) {
   // output data of each row
   echo "<select name='colorchoice'>;
   while($row = $result->fetch_assoc()) {
      //Create the <option> tags for the <select>
      printf("<option value='%s'>%s</option>", $row['id'], $row['color']);
   }
   echo "</select>;
}

Sorry about that - I know the code I posted had these missing.
0
Chris StanyonWebDevCommented:
And No - there is no jQuery work in any of the code I've posted. It's all been PHP
0
Harkin32Author Commented:
Hi Chris Stanyon am still getting an error

Parse error: syntax error, unexpected 'value' (T_STRING), expecting ',' or ';' on line 32

I have made the changes but still no luck I have put the line the error seems to be appearing on  in bold and I am using Dreamweaver if that helps.
here us my code.


<?php

// create a db connection
$con = mysqli_connect ("localhost", "student", "student", "colorbd");


// Check connection
if ($con === false){
die ("ERROR: could not connect to database." . mysqli_connect_error ());
}

$sql = "SELECT color FROM colorchoice";
$result = $con->query($sql);

if ($result->num_rows > 0) {
    // output data of each row
    while($row = $result->fetch_assoc()) {
        echo "color: " . $row["color"]. " <br>";
    }
} else {
    echo "0 results";
}

$sql = "SELECT id, color FROM colorchoice";
$result = $con->query($sql);

if ($result->num_rows > 0) {
   // output data of each row
   echo "<select name='colorchoice'>;
   while($row = $result->fetch_assoc()) {
      //Create the <option> tags for the <select>
      printf("<option value='%s'>%s</option>", $row['id'], $row['color']);
   }
   echo "</select>;
}
// Prepare the query to be be run later on. Store it in a variable called $stmt, and tell it to expect the id later (?)
if ($stmt = $con->prepare("UPDATE colorchoice SET value = value + 1 WHERE id = ?") ):
 // tell the query where the placeholder data comes from - in this case the ID comes from the POST array (colourchoice) and is a string (s)
   $stmt->bind_param("s", $POST['colorchoice']);
   // Execute query
   $stmt->execute();
endif;

mysqli_close($con);
?>
0
Chris StanyonWebDevCommented:
Sorry - again, my mistake. As well as the missing semi-colon, there was also a missing closing double-quote

echo "<select name='colorchoice'>";
echo "</select>";
0
Harkin32Author Commented:
Ok that sort of fixed it but now am getting another few error's


Parse error: syntax error, unexpected 'UPDATE' (T_STRING), expecting ',' or ';' on line 37 which is the first line in bold in the code below but there also seem to be other errors on the page which are are also in bold however I think fixing the first one will fix them all.

// Prepare the query to be be run later on. Store it in a variable called $stmt, and tell it to expect the id later (?)
if ($stmt = $con->prepare("UPDATE colorchoice SET value = value + 1 WHERE id = ?") ):
 // tell the query where the placeholder data comes from - in this case the ID comes from the POST array (colourchoice) and is a string (s)
  $stmt->bind_param("s", $POST['colorchoice']);
   // Execute query
   $stmt->execute();
endif;

mysqli_close($con);
?>


<body>
</br>
<a href="colordb.html">Back</a>
</body>
0
Chris StanyonWebDevCommented:
That error still looks more like a missing closing double-quote from earlier in your script
0
Harkin32Author Commented:
Ok I had look but cant seem to find any missing double-quotes but that cold be due to inexperience. I have included all my code below cold you please have a look?

<?php

// create a db connection 
$con = mysqli_connect ("localhost", "student", "student", "colorbd");


// Check connection
if ($con === false){
die ("ERROR: could not connect to database." . mysqli_connect_error ());
}

$sql = "SELECT color FROM colorchoice";
$result = $con->query($sql);

if ($result->num_rows > 0) {
    // output data of each row
    while($row = $result->fetch_assoc()) {
        echo "color: " . $row["color"]. " <br>";
    }
} else {
    echo "0 results";
}

$sql = "SELECT id, color FROM colorchoice";
$result = $con->query($sql);

if ($result->num_rows > 0) {
   // output data of each row
   echo "<select name='colorchoice'>";
   while($row = $result->fetch_assoc()) {
      //Create the <option> tags for the <select>
      printf("<option value='%s'>%s</option>", $row['id'], $row['color']);
   }
   echo "</select>;
}
// Prepare the query to be be run later on. Store it in a variable called $stmt, and tell it to expect the id later (?)
if ($stmt = $con->prepare("UPDATE colorchoice SET value = value + 1 WHERE id = ?") ):
 // tell the query where the placeholder data comes from - in this case the ID comes from the POST array (colourchoice) and is a string (s)
   $stmt->bind_param("s", $POST['colorchoice']);
   // Execute query
   $stmt->execute();
endif;

mysqli_close($con);
?> 

Open in new window

0
Chris StanyonWebDevCommented:
Line 34 - missing closing double-quote. Should be:

echo "</select>";
0
Harkin32Author Commented:
Hi Chris I finally got it error free but its not working correctly.When I get the user to select a color it takes me to the next page but does not update the count in value it just displays this below and the select box.

color: Yellow
color: Blue
color: Green
color: Red
color: Black
color: Orange
color: Brown
color: White

I would like to get the user to select a color which would then up date the value for that color for instance if two users selected yellow and one user selects blue it I would like it to look like this.

yellow   2
blue       1

Here is the code so far

The html code so select the color
<form action="insertColors.php" method="post">
    Color:
    <select>
    <option value=""></option>
    <option value="Yellow">Yellow</option>
    <option value="Blue">Blue</option>
    <option value="Green">Green</option>
    <option value="Red">Red</option>
    <option value="Black">Black</option>
    <option value="Orange">Orange</option>
    <option value="Brown">Brown</option>
    <option value="White">White</option>
    </select> 
    <input type="submit" name="Add records"><br />
</form>

Open in new window


The php code
<?php

// create a db connection 
$con = mysqli_connect ("localhost", "xxxxxxxx", "xxxxxx", "colordb");


// Check connection
if ($con === false){
die ("ERROR: could not connect to database." . mysqli_connect_error ());
}

$sql = "SELECT color FROM colorchoice";
$result = $con->query($sql);

if ($result->num_rows > 0) {
    // output data of each row
    while($row = $result->fetch_assoc()) {
        echo "color: " . $row["color"]. " <br>";
    }
} else {
    echo "0 results";
}

$sql = "SELECT id, color FROM colorchoice";
$result = $con->query($sql);

if ($result->num_rows > 0) {
   // output data of each row
   echo "<select name='colorchoice'>";
   while($row = $result->fetch_assoc()) {
      //Create the <option> tags for the <select>
      printf("<option value='%s'>%s</option>", $row['id'], $row['color']);
   }
   echo "</select>";
}
// Prepare the query to be be run later on. Store it in a variable called $stmt, and tell it to expect the id later (?)
if ($stmt = $con->prepare("UPDATE colorchoice SET value = value + 1 WHERE id = ?") ):
 // tell the query where the placeholder data comes from - in this case the ID comes from the POST array (colourchoice) and is a string (s)
   $stmt->bind_param("s", $POST['colorchoice']);
   // Execute query
   $stmt->execute();
endif;

mysqli_close($con);
?> 

Open in new window


My database table
Id    color    value
      1               Yellow                 0
      2                  Blue                  0
      3                 Green                0
      4                   Red                  0
      5                  Black                 0
      6                 Orange              0
      7                 Brown                0
      8                  White                0
0
Chris StanyonWebDevCommented:
Your PHP code is expecting your <select> to have a name of 'colorchoice' and values that refer to the ID of each color. Your HTML is like this:

 <select>
    <option value=""></option>
    <option value="Yellow">Yellow</option>
    <option value="Blue">Blue</option>
    <option value="Green">Green</option>

It should be like this:

 <select name='colorchoice'>
    <option value=""></option>
    <option value="1">Yellow</option>
    <option value="2">Blue</option>
    <option value="3">Green</option>

Also, in your PHP, you need to change line 39 to this:

$stmt->bind_param("s", $_POST['colorchoice']);

notice the addition of the under score in $_POST
0
Harkin32Author Commented:
Ok I have tried that but the e values after a pick a few colors all remain at 0
0
Chris StanyonWebDevCommented:
Right. Step back to something simple. Create a very basic HTML page containing just the following hard-coded form:

<form action="updatecolor.php" method="post">
<select name="colorchoice">
	<option value="">Select a color</option>
	<option value="1">Yellow</option>
	<option value="2">Blue</option>
	<option value="3">Green</option>
	<option value="4">Red</option>
</select>
<input type="submit" name="submit" value="Update" />
</form>

Open in new window


Now create a file called updatecolor.php in the same folder as the html file above, and put this in it:

<?php
// Turn on error reporting
error_reporting(E_ALL);
ini_set('display_errors', 1);

// Check the form has submitted a value
if (!isset($_POST['colorchoice']) || empty($_POST['colorchoice']))
	die("No valid data was submitted");

// Create a DB connection 
$con = new mysqli("localhost", "username", "password", "database");

// Check the connection
if (mysqli_connect_errno())
    die(mysqli_connect_error());

// Prepare the UPDATE query
$query = "UPDATE colorchoice SET value = value + 1 WHERE id = ?";

if ($stmt = $con->prepare($query)):
	
	// Bind the placeholder to the forms 'colorchoice' field
	$colorid = $_POST['colorchoice'];
	$stmt->bind_param("i", $colorid);
	
	// Execute the query
	$stmt->execute();
	
	// Show the user some feedback
	printf("No of Records Affected: %d | Color ID: %d", $stmt->affected_rows, $colorid);
	
	// Close the statement
	$stmt->close();
endif;

// Close the connection
$con->close();

Open in new window


Edit it with your own username, password, database etc and then open up your html page, choose a colour and click the Update button. I've tested this and it works fine.
0
Harkin32Author Commented:
Hi Chris that works great thanks. So I also want to allow he user  to use the same html page to select a color from a select box and a radio button  that will update the database. Would I be wrong to think  cold use the same php file with no modifications and that I would only have to update the html page or am I wrong.  The reason I ask is I have just tried to add the radio button and the only thing I changed is the html page.  I left the php page the same but when  hit submit it says "No valid data was submitted.

Here is my html

<form action="insertColors.php" method="post">
    Color:
    <select name="colorchoice">
    <option value=""></option>
    <option value="1">Yellow</option>
    <option value="2">Blue</option>
    <option value="3">Green</option>
    <option value="4">Red</option>
    <option value="5">Black</option>
    <option value="6">Orange</option>
    <option value="7">Brown</option>
    <option value="8">White</option>
    </select> 
    <input type="submit" name="submit" value="update"><br />
</form>

<form action="insertColors.php" method="post">
    Color
    <input type="radio" value="1">Yellow
    <br>
    <input type="radio" value="2">Blue
    <br>
    <input type="radio" value="3">Green
    <br>
    <input type="radio" value="4">Red
    <br>
    <input type="radio" value="5">Black
    <br>
    <input type="radio" value="6">Orange
    <br>
    <input type="radio" value="7">Brown
    <br>
    <input type="radio" value="8">White
    
    <input type="submit" name="submit" value="update"><br />
</form> 

Open in new window

0
Harkin32Author Commented:
Hay chris I have also just tried to add a button to display all the colors and there values  the database but am getting the same error as be for No valid data was submitted.

Here is my html.
<form action="insertColors.php" method="post">
    Select Color:
    <select name="colorchoice">
    <option value=""></option>
    <option value="1">Yellow</option>
    <option value="2">Blue</option>
    <option value="3">Green</option>
    <option value="4">Red</option>
    <option value="5">Black</option>
    <option value="6">Orange</option>
    <option value="7">Brown</option>
    <option value="8">White</option>
    </select> 
    <input type="submit" name="submit" value="update"><br />
</form><br />

<form action="insertColors.php" method="post">
    Select Color<br />
    <input type="radio" value="1">Yellow
    <br>
    <input type="radio" value="2">Blue
    <br>
    <input type="radio" value="3">Green
    <br>
    <input type="radio" value="4">Red
    <br>
    <input type="radio" value="5">Black
    <br>
    <input type="radio" value="6">Orange
    <br>
    <input type="radio" value="7">Brown
    <br>
    <input type="radio" value="8">White
    
    <input type="submit" name="submit" value="update"><br />
</form> <br />

<form action="insertColors.php" method="Get">
    Displey database:<input type="submit" name="Serch"><br />
</form>

Open in new window


The PHP code
<?php
// Turn on error reporting
error_reporting(E_ALL);
ini_set('display_errors', 1);

// Check the form has submitted a value
if (!isset($_POST['colorchoice']) || empty($_POST['colorchoice']))
	die("No valid data was submitted");

// Create a DB connection 
$con = new mysqli("localhost", "student", "student", "colordb");

// Check the connection
if (mysqli_connect_errno())
    die(mysqli_connect_error());

// Prepare the UPDATE query
$query = "UPDATE colorchoice SET value = value + 1 WHERE id = ?";

if ($stmt = $con->prepare($query)):
	
	// Bind the placeholder to the forms 'colorchoice' field
	$colorid = $_POST['colorchoice'];
	$stmt->bind_param("i", $colorid);
	
	// Execute the query
	$stmt->execute();
	
	// Show the user some feedback
	printf("No of Records Affected: %d | Color ID: %d", $stmt->affected_rows, $colorid);
	
	// Close the statement
	$stmt->close();
endif;

// Close the connection
$con->close();

?> 

<?php
// DB Connection
$con = mysqli_connect('localhost', 'student', 'student', 'colordb');
mysqli_select_db($con,"colordb");

// Check connection
if (!$con) {
    echo "Unable to connect " . mysqli_error($con);
    exit;
}

//$query = "SELECT * from colorchoice";
$result = mysqli_query($con, "SELECT * FROM colorchoice") or die("ERROR:".mysqli_error($con)); // store the result of the query in the veriblie $result
$row = mysqli_fetch_assoc($result);

echo "<table>"; // Open table to Create a table to display results 

do { //Loping through the rsults 
echo "</td><td>".$row['color']."</td><td>".$row['vaule']."</td></tr>";
} while($row = mysqli_fetch_assoc($result));

echo "</table>"; // close a table

?>

Open in new window

0
Chris StanyonWebDevCommented:
Harkin,

In your first block of code, you will get the No Valid Data error because you haven't given your radio buttons a name. You need to code the html like this:

<form action="updatecolor.php" method="post">
	<p>Select Color</p>
		<input name="colorchoice" type="radio" value="1">Yellow<br>
		<input name="colorchoice" type="radio" value="2">Blue<br>
		<input name="colorchoice" type="radio" value="3">Green<br>
		<input name="colorchoice" type="radio" value="4">Red<br>
		<input name="colorchoice" type="radio" value="5">Black<br>
		<input name="colorchoice" type="radio" value="6">Orange<br>
		<input name="colorchoice" type="radio" value="7">Brown<br>
		<input name="colorchoice" type="radio" value="8">White<br>

		<input type="submit" name="submit" value="Update" />
</form>

Open in new window


Note the name attribute - that's what the PHP code looks for (line 7 of updatecolor.php)

As for the button to display the colors, create new php script just for that, call it displaycolors.php, and create a link to it in your page - something like this:

<a href="displaycolors.php">Display Colours</a>

Here's the content of the displaycolors.php file.

<?php
// Turn on error reporting
error_reporting(E_ALL);
ini_set('display_errors', 1);

// Create a DB connection 
$con = new mysqli("localhost", "username", "password", "database");

// Check the connection
if (mysqli_connect_errno())
    die(mysqli_connect_error());

// Create the SELECT query
$selectColors = "SELECT color, value FROM colorchoice";

if ($colors = $con->query($selectColors)):
	
	echo "<table>";
	echo "<tr><th>Color</th><th>Value</th></tr>";
	
	// Loop through the colours, outputting a row for each
	while ($color = $colors->fetch_object()):
		printf ("<tr><td>%s</td><td>%s</td></tr>", $color->color, $color->value);
	endwhile;

	echo "</table>";

	// Close the statement
	$colors->close();
endif;

// Close the connection
$con->close();

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.