DEV Community

Elise Fahlström-Björklund
Elise Fahlström-Björklund

Posted on

Alright, guys. Github Copilot is essential. Use Pro

My code is open-source, :), What would happen if you ran this script in Github Copilot? Amazing things can happen.

<!--ELISE COMPOSITA-->
<!--Cheating in programming is acceptable-->
<!--Breivik har dödsstraff-->
<?php include 'db.php'; ?>
<?php include 'header.php'; ?>
<?php # errors
# En bok om mig
# Av Jonathan
# Johanna säger inte avatard
# Jag har bannat Josefine's mamma
?>
<form class="EliseComposita" method="post"/>
<b>Anv&auml;ndarnamn</b>:<br>
<input type="text" name="_username"><br>
<b>Epost</b>:<br>
<input type="email" name="_email" required><br>
<b>L&ouml;senord</b>:<br>
<input type="password" name="_password"/><br>
<b>Bekr&auml;fta l&ouml;senord</b>:<br>
<input type="password" name="passwordConfirm"/><br/><br/>
<input type="submit"   name="submit" value="Registrera konto!"/><br/><br/>
</form>

<?php if (isset($_error)) echo htmlspecialchars($_error); ?>
<!--Den ligger på precis rätt plats här-->

<?php
$_username=$_POST['_username'];
$_password=$_POST['_password'];
if (isset($_username, $_password)) {
if ($_POST['submit']) {
$_hashadPonny=password_hash($_password, PASSWORD_ARGON2ID);
for ($i = 1; $i <= 1; ++$i) {
$_mysql=$conn->prepare("INSERT INTO _users (_username, _password, CREATED_AT) VALUES (?, ?, now())");
$_mysql->bind_param("ss", $_username, $_hashadPonny);
$_mysql->execute();
}

if ($_mysql) { # Alla tre # Here is my problem
$_success="Konto skapat successivt!";
echo $_success;
}
}
} ?>
</body>
</html>
Enter fullscreen mode Exit fullscreen mode

Top comments (11)

Collapse
 
farshatt profile image
Elise Fahlström-Björklund

A ship: Marbella Exiton II

Collapse
 
farshatt profile image
Elise Fahlström-Björklund

Verkar ganska döda

Collapse
 
farshatt profile image
Elise Fahlström-Björklund

Är det nåt från min kurs?

Collapse
 
farshatt profile image
Elise Fahlström-Björklund

Om man mördar får man dödsstraff

Collapse
 
farshatt profile image
Elise Fahlström-Björklund

This seems like the nicest community in the world

Collapse
 
farshatt profile image
Elise Fahlström-Björklund

My best programming practice is Autocompleted code using Github Copilot Pro+

Collapse
 
farshatt profile image
Elise Fahlström-Björklund

Vad vi jobbar med

Collapse
 
farshatt profile image
Elise Fahlström-Björklund

Associated press?

Collapse
 
farshatt profile image
Elise Fahlström-Björklund

I'll talk with TV4 Nyhetsmorgon

Collapse
 
farshatt profile image
Elise Fahlström-Björklund

Its the register.php-file