Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function get_ra($input)
- {
- $servername = "localhost";
- $username = "root";
- $password = "x";
- $dbname = "gestao_trabalhos";
- // Create connection
- $conn = mysqli_connect($servername, $username, $password, $dbname);
- mysqli_set_charset($conn, "utf8"); // mysqli extension
- //variaveis com queries à db
- $sqlx = "SELECT ra FROM trabalhos WHERE id='$input'";
- $x = mysqli_query($conn, $sqlx);
- $x = $x->fetch_object()->ra;
- echo "<a href='".$x."'>Link</a>";
- $conn->close();
- }
- return ;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement