/like.php
https://bitbucket.org/wlynch92/cs336-dbproject · PHP · 20 lines · 16 code · 4 blank · 0 comment · 1 complexity · 1e0b3d0e5112e53df056567941f09d01 MD5 · raw file
- <HTML><BODY>
- <?php
- session_start();
- $connection = mysql_connect("cs336-64.rutgers.edu","csuser","cs277315");
- if (!$connection)
- {
- die('Cannot connect to server'); /*Prints to the browser*/
- }
- mysql_select_db("cs336",$connection);
- $likedArtist = $_SESSION['artistID'];
- $user = $_SESSION['uid'];
- mysql_query("insert into likesArtist values('$user','$likedArtist')");
- header("Location: ".$_SESSION['url']);
- mysql_close($connection);
- ?>
- <HTML><BODY>