/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<html> <head> <title> Facebook App </title> </head> <body> <? include ('connect.php'); include ('fbconnect.php'); $fidQuery = "Select count(fid) as ct FROM users where fid =".$var4.""; if ($row1['ct'] == 1) { echo "<br>Welcome Back ".$var1."!<BR>"; } else { echo "<br>Hey...its your first time. Welcome!<br>"; mysql_query("INSERT INTO users (name, gender, email, fid, link) VALUES ('".$var1."','".$var2."','".$var3."','".$var4."','".$var5."')")or die(mysql_error()); } ?><br /><br /> Classes that students at Hofstra have enrolled in...<br /><br /> <? $query = "SELECT * from class order by day ASC"; $printedTitle = 0; $printedTitle2 = 0; { if ($printedTitle == 0 && $row['day'] == "MWF") { echo "Classes that run on Monday, Wed & Fridays<br>"; $printedTitle++; } if ($printedTitle2 == 0 && $row['day'] == "TTH") { echo "Classes that run on Tuesdays and Thursdays<br>"; $printedTitle2++; } echo $row['className'] ." at ". $row['time']. $row['day']." is in the department of ".$row['dept']."<a href='addfromindex.php?id=".$var4."&coursecode=".$row['className']."&time=".$row['time']."&day=".$row['day']."'>[+]</a><br>"; } ?> <br /> <br /> Dont see your class here? <a href="addClass.php?id=<? echo $var4;?>"> Lets Insert A Class Now!</a> or <a href="myclasses.php?id=<? echo $var4;?>">take a look at what classes you're in.</a> </body> </html>