Note that there are some explanatory texts on larger screens.

plurals
  1. POMySQL Find First Colum's String, Echo Second Column's
    primarykey
    data
    text
    <p>Firstly, Sorry for bad English :( <br />I want key system like steam, origin or uplay. I give keys to user, user write that code into input, and code will echo user's code.<br /> <br /> I have 1 Table. 2 Columns in it. 2 Rows for 2 Column. Like this:<br /></p> <pre><code>.----------------------. | sifre | bizimkey | |______________________| | A5Sr2A | First Code | |______________________| | FaQ1fS | Scnd. Code | |______________________| </code></pre> <p>If user enters A5Sr2A into Input, PHP Echos "First Code". If user enters wrong code, Just appear alert.<br /></p> <p>I tried so many codes. I can run the code like this:<br /></p> <pre><code>&lt;?php if ($_POST['pass'] == "A5Sr2A") { { echo "First Code"; } } else { header('Location:index.html'); } ?&gt; </code></pre> <p>But I don't want this. This is so challenging thing. I asked myself, "Why don't you use MySQL?"<br /> I am trying 7 Hours. Really. I want to do that. I want learn MySQL. Please Help. THANKS!</p> <pre><code> &lt;? ob_start(); ?&gt; &lt;html&gt; &lt;link rel=stylesheet href="style.css"&gt; &lt;table&gt; &lt;tr&gt; &lt;td&gt; &lt;center&gt; &lt;?php $host = "localhost"; $user = "user"; $password = "pass"; $database = "db"; $con = mysqli_connect($host, $user, $password, $database); if (mysqli_connect_errno()) { echo "ERROR"; } $result = m ysqli_query($con, "SELECT sifre FROM keyler"); if ($_POST['pass'] == $ result) { { $mykey = m ysqli_query($con, "SELECT bizimkey FROM keyler"); echo $mykey; } } else { header('Location:index.html'); } mysqli_close($con); ?&gt; &lt;/center&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/html&gt; &lt;? ob_flush(); ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload