Hi I want to send form data to a php confirmation page. The confirmation page should contain details of registrants.New registrants' detail should be added to the previously registered ones. Here is what I have done, but instead of adding new info to the table, it replaces it. I am new to php and I need advice on how to get round it. it should look like this after submitting:
--------------------------
Registration Conformation |
---------------------------------------------
First name |Last name |Email |
---------------------------------------------
Jack |Fams |mail#time.com |
---------------------------------------------
Matthew |Bills |mail#time.com |
---------------------------------------------
Judith |Kamps |mail#time.com |
---------------------------------------------
<html>
<head>
<title>Registration form
</title>
<style type="text/css">
.button{
box-shadow: 10px 10px 5px #888888;
padding: 5px;
width: 90%;
}
.div{
border: 2px solid black;
width: 28%;
margin: auto;
margin-top: 15%;
padding: 10px;
font-family: Comic Sans;
text-align: center;
}
h1{
text-align: center;
font-family: "Comic Sans", "Comic Sans MS", cursive;
font-weight: bold;
}
table.set{
text-align: center;
margin-left: auto;
margin-right: auto;
width: 60%;
}
td{
text-align: left;
font-family: "Comic Sans", "Comic Sans MS", cursive;
font-weight: bold;
}
</style>
</head>
<body>
<div class="div">
<form method="POST" action="registry.php">
<h1>NewsLetter-Registration</h1>
<table class="set">
<tr><td>First Name:</td><td><input type='text' name='fname' size="25" /></td></tr>
<tr><td>Last Name:</td><td><input type='text' name='lname' size="25"/></td></tr>
<tr><td>E-mail:</td><td><input type='text' name='email' size="25"/></td></tr>
<tr><td></td><td><input class="button" type="submit" name="register" value="Register"></td></tr>
</table>
</form>
</div>
</body>
</html>
registry.php
<html>
<head>
<title>Registration form
</title>
<style type="text/css">
.button{
box-shadow: 10px 10px 5px #888888;
padding: 5px;
width: 90%;
}
.div{
width: 60%;
margin: auto;
margin-top: 15%;
padding: 10px;
font-family: Comic Sans;
text-align: center;
}
h1{
text-align: left;
font-family: "Comic Sans", "Comic Sans MS", cursive;
font-weight: bold;
}
table.set{
text-align: center;
margin-left: auto;
margin-right: auto;
width: 60%;
border-collapse: collapse;
border: 2px solid black;
}
td{
text-align: left;
font-family: "Comic Sans", "Comic Sans MS", cursive;
font-weight: bold;
}
</style>
</head>
<body>
<div class="div">
<table class="set" border="1">
<tr><td colspan="3"><h1>NewsLetter-Registry</h1></td></tr>
<tr><td>First Name:</td><td>Last Name:</td><td>E-mail</td></tr>
<tr><td><?php echo $_POST["fname"]; ?></td><td><?php echo $_POST["lname"]; ?></td><td><?php echo $_POST["email"]; ?></td></tr>;
</table>
</div>
</body>
</html>
Problem
At the moment you're simply sending the form data to a new page and printing it inside the table. It is not stored anywhere.
As you want to achieve this without database, you can use a csv or json file which we cann "data file"
Submit form to registry.php
Append new entry to data file
Load data file and using "while" or "loop" print the data into the table
A quick example for a simple way (not best way) - for large data, appending or database will be your best solution.
registry.php
<?php
$datafile = "data.json";
$data = json_decode(file_get_contents($datafile),1); //make sure to create data.json empty file first
if(isset($_POST['fname'])){
$data[] = array(
'fname' => $_POST['fname'],
'lname' => $_POST['lname'],
'email' => $_POST['email']
);
file_put_contents($datafile, json_encode($data,1)); //save new file
}
?>
You can then print the table thus:
<table class="set" border="1">
<tr><td colspan="3"><h1>NewsLetter-Registry</h1></td></tr>
<tr><td>First Name:</td><td>Last Name:</td><td>E-mail</td></tr>
<?php
foreach($data as $i=>$entry){
<tr><td><?php echo $entry["fname"]; ?></td>
<td><?php echo $entry["lname"]; ?></td>
<td><?php echo $entry["email"]; ?></td></tr>
} ?>
</table>
This is a basic example and untested so if there's errors let me know and I'll update the code. You'll need to
Related
I'm using php to display an error message to the user. The code is sitting at the top of the page and once the error message displays, it affects the height of my textboxes. I coded the height in a style sheet. Also, my error message is sitting inside of a div. I tried using the span tag but that isn't working either since its still sitting at the top line of the page. This is the error message in php:
if($result != "")
{
echo "<div id='Error'>";
echo "<b>The following errors occured:</b><br>";
echo $result;
echo "</div>";
}
Registration div css:
#RegBody
{
background-color: white;
background-image: url(LilyPads.jpg);
height: 82.7vh;
}
#RegContents
{
position: absolute;
margin: 39px auto 0 402px;
border-radius: 20px;
background-color: white;
width: 500px;
height: 455px;
padding-left: 57px;
}
#RegisterUser
{
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
font-size: 15px;
margin-top: 14px;
margin-left: 112px;
color: #1A3D5B;
width: 215px;
height: 30px;
color: white;
background-color: #1A3D5B;
border-color: #1A3D5B;
border-style: solid;
border-radius: 20px;
}
Error message css:
#Error
{
position: absolute;
background-color: white;
border: 2px solid red;
border-radius: 20px;
width: 200px;
padding: 15px;
margin: 147px 0 0 70px;
color: red;
}
Here's the css for the textboxes:
input[type='text']
{
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
text-indent: 10px;
width: 210px;
height: 25px;
border-color: #1A3D5B;
border-style: solid;
border-radius: 20px;
}
Before the error message:
I was thinking that maybe its the font size that's the issue but regardless...a white line also appears at the bottom of the page:
Please have patience with me. I'm a student and new to php. Thank you
i can tell you how to rectify the error (though i am still looking for the reason because of which it happens).
what i did is that i inserted the php code inside body tag and it work fine no change in Textbox dimensions.Below is the code i wrote to prove the same
<?php
$result=1;
echo "<div id='Error'>";
echo "<b>The following errors occured:</b><span>";
echo $result;
echo "</span></div>";
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
input[type='text']
{
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
text-indent: 10px;
width: 210px;
height:25px;
border-color: #1A3D5B;
border-style: solid;
border-radius: 20px;
}
</style>
</head>
<body>
<input type='text' name=''>
</body>
</html>
This question has been asked alot so I found this article Allowing users to Refresh browser without the "Confirm Form Resubmission" pop-up
And I follow what it said but now i'm getting this message 500: Internal Error.
So what i'm I doing wrong here? I basically want be able to refresh a page with out getting greeted with this message
Confirm For Resubmission
The page that you're looking for used information that you entered. Returning to that page might cause any action you took to be repeated. Do you want to continue?
because of a form and I all so checked this out to Preventing form resubmission
I try to understand these guys answers but i'm still not getting something right if any one can show me the two so called poplar methods mentioned in the links by using the PHP method or the AJAX with jQuery method to prevent that confirm for resubmission message I will really appreciate that. Please I prefer code solutions based on my code as answers because I personally learn best that way thank you.
GIF Screenshot
code
index.php
<!DOCTYPE html>
<html>
<head>
<style>
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
body {
font-family: 'Nunito', sans-serif;
color: #384047;
}
form {
max-width: 300px;
margin: 10px auto;
padding: 10px 20px;
background: gold;
border-radius: 8px;
}
h1 {
margin: 0 0 30px 0;
text-align: center;
}
input[type="text"] {
background: rgba(255,255,255,0.1);
border: none;
font-size: 16px;
height: auto;
margin: 0;
outline: 0;
padding: 15px;
width: 100%;
background-color: white;
color: black;
box-shadow: 0 1px 0 rgba(0,0,0,0.03) inset;
margin-bottom: 30px;
}
button {
padding: 19px 39px 18px 39px;
color: #FFF;
background-color: blue;
font-size: 18px;
text-align: center;
font-style: normal;
border-radius: 5px;
width: 100%;
border: 1px solid blue;
border-width: 1px 1px 3px;
box-shadow: 0 -1px 0 rgba(255,255,255,0.1) inset;
margin-bottom: 10px;
cursor: pointer;
}
label {
display: block;
margin-bottom: 8px;
}
label.light {
font-weight: 300;
display: inline;
}
</style>
</head>
<body>
<form action='x.php' method='POST'>
<h1>Form</h1>
<label for='name'>Name</label>
<input type='text' id='name' name='name' value='Tom'>
<label for='age'>Age</label>
<input type='text' id='age' name='age' value='20'>
<button type='submit'>Send</button>
</form>
</body>
</html>
x.php
<?php
if($_SERVER['REQUEST_METHOD'] == "POST"){ header('x.php'); }
$name = $_POST['name'];
$age = $_POST['age'];
?>
<p><?php echo $name; ?></p>
<p><?php echo $age; ?></p>
I changed your code a bit, but should produce the result that you want
<?php
if(isset($_POST['submit'])){
header('Location: x.php?successfulRedirect');
exit;
}
?>
<form action='' method='POST'>
<h1>Form</h1>
<label for='name'>Name</label>
<input type='text' id='name' name='name' value='Tom'>
<label for='age'>Age</label>
<input type='text' id='age' name='age' value='20'>
<input type='submit' name='submit' value='Send' />
</form>
This will make sure that you will be redirected to x.php after clicking Send, with a GET parameter it in, just to see that the redirection works
I'm trying to create a search form to search through my mysql database.
I succeded to to create the form with one text field and a submit buttom. BUT..
When I leave the text field blank and hit the submit button all results appear from the specific database table on my search.php site.
When i write anything in the text field (text that is included in the names from the database) and hit the submit button no search results appear at all.
As you can see in the code I've been trying to list the search results in two diferent ways. The first one reacts as described above. The last one does not list any search results at all.
Do anybody know why? Do I have a typo somewhere or do I miss anything ind the code?
Thanks in advance.
This is my index.php
<! DOCTYPE html>
<html>
<head>
<meta charset ="UTF-8">
<title> Townin </title>
<link rel="stylesheet" type="text/css" href="Townin/style.css">
<style>
body {background-color: white;}
header{background-color:#6ab47b;
border-color:#599a68;
}
header h1, h2 {margin-left: 20px;
color: white;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
h1, h1 {margin-left: 20px;
color: gray;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
p {margin-left: 20px;
color: gray;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
nav a, nav a:visited {
color: white;
background-color: #599a68;}
nav a.selected, nav a:hover{color: black;
background-color:#6ab47b;}
nav {
text-align:center;
padding: 0 0;
margin:20px 0 0;
height: 50 px;
background-color:#599a68;
}
nav ul {
list-style:none;
margin: 0px 10px;
padding: 0px;
}
nav ul li {
display: inline-block;
border-right: 1px solid #6ab47b;
text-align: center;
width: 250px;
padding:0px 0px;
}
nav ul li a {
display: block;
height: 40px;
width: 100%;
line-height:50px;
background-color: #599a68;
}
li a:hover {
background-color: #6ab47b;
}
a:link {
text-decoration: none;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color:gray;
}
a:visited {
color:gray;
}
.button {
background-color:#6ab47b;
color: #fff;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
font-weight: bold;
margin: 0px 20px;
padding:20px 20px;
border-radius: 100 %;
}
.button:visited {
color:white;
}
#bar-knap {
display: inline-block;
max-width: 100%;
border-radius:10%;
height:40%;
width:20%;
margin: 10px 10% 10px 10%;
border-style:solid;
border-color:gray;
}
#spise-knap {
display: inline-block;
max-width: 100%;
border-radius:10%;
height:40%;
width:20%;
margin:10px 10% 10px 10%;
border-style:solid;
border-color:gray;
}
footer {
background-color: #6ab47b;
color: white;
height: 70px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
text-align: center;
margin: 20px auto 0px auto;
}
</style>
</head>
<body>
<?php include ("Header2.php"); ?>
<a href="barer.php" >Barer
<img src="img/barknap.jpg" alt="Barer" id="bar-knap">
</a>
<a href="spisesteder.php" >Spisesteder
<img src="img/spiseknap.png" alt="Spisesteder" id="spise-knap">
</a>
<!--Search form-->
<p style="text-align:center;"> Søg mellem barer </p>
<br />
<br />
<form method="post" action="search.php">
<input type="text" name="search" />
<input type="submit" name="submit" value=" Search ">
</form>
<br />
<br />
<footer>
Natalie
</footer>
</body>
</html>
And this is the search.php
<?php
//Connection to phpmyadmin
//Step1
$db = mysql_connect("host","username","password");
if (!$db) {
die("Database connection failed miserably: " . mysql_error());
}
//Step2
$db_select = mysql_select_db("databasename",$db);
if (!$db_select) {
die("Database selection also failed miserably: " . mysql_error());
}
$search = $_POST[search];
//SQL statement to select what to search
$sql="SELECT * FROM Brugerdatabase
WHERE 'Navn' like '%$search%' OR
'Mad genre' like '%$search%' OR
'Beliggenhed' like '%$search%'
ORDER BY Navn ASC";
// Run sql statement
$result = mysql_query($sql, $db) or die(mysql_error());
//Find out how many matches
$number= mysql_num_rows($result);
$pagetitle ="Search Results";
?>
<!doctype html>
<html lang="da">
<head>
<meta charset ="UTF-8">
<title>Søge resultater</title>
<link rel="stylesheet" type="text/css" href="style.css">
<style>
table {
border-collapse: collapse;
width: 80%;
margin:0 5%;
}
table th, td {
border-bottom:1px solid gray;
height: 50px;
vertical-align: center;
padding: 15px;
text-align: left;
}
tr:hover{background-color:#f5f5f5}
fieldset {
width: 60%;
margin:0 20%;
box-align: center;
}
</style>
</head>
<body>
<?php include ("Header2.php"); ?>
<!--Advanceret søge funktion-->
<p style="text-align:center;"> Søge resultater</p>
<?php
//------------------------------------
//This code inside the lines list the results when nothing is typed in the search field.
//Creates a loop to loop through results
while($row = mysql_fetch_array($result)){
echo "<table><tr><td>"
. $row['1'] .
"</td><td>"
. $row['4'] .
"</td><td>"
. $row['5'] .
"</td><td>"
. $row['6'] .
"</td><td>"
. $row['7'] .
"</td><td>"
. $row['8'] .
"</td></tr></table>";
}
//-----------------------------------
//-------------------------------
//This code inside the lines does not list anything at all..
// loop through results and get variables
while ($row=mysql_fetch_array($result)){
$navn =$row["Navn"];
$genre =$row["Mad genre"];
$beliggenhed =$row["Beliggenhed"];
}
// Tabel with search results
print " <tr>
<td>
<form method=\"post\" action=\"confirmdelete.php\">
<input type=\"hidden\" name=\"sel_record\" value=\"$id\">
<input type=\"submit\" name=\"delete\" value=\" Delete \">
<form>
<form method=\"post\" action=\"updateform.php\">
<input type=\"hidden\" name=\"sel_record\" value=\"$id\">
<input type=\"submit\" name=\"update\" value=\" Edit \">
</form>
</td>
<td><strong>$navn</strong><br />
Mad genre: $genre<br />
Beliggenhed: $beliggenhed</td>
</tr>";
print "</tr></table></body></html>";
//----------------------------
mysqli_close($db);
?>
</body>
</html>
You need to encase your array keys -in this example with single quotes- so:
$search = $_POST['search'];
You should also real_escape string your key with:
$search = mysql_real_escape_string($_POST[search]);
...As a minimum (read below)
Your search SQL you should not encase your column names, so rewrite them as:
$sql="SELECT * FROM Brugerdatabase
WHERE Navn like '%$search%' OR
`Mad genre` like '%$search%' OR
Beliggenhed like '%$search%'
ORDER BY Navn ASC";
You SHOULD encase the middle column within backticks (`) because the column name contains a space. quotes should only go around values, not column or table names.
Now, read again the line LIKE '%$search%' OR ... if $search is empty then this will return a string of <anyvalue><null><anyvalue> ==> %%, so this will return any of the columns that are not NULL because they contain something.
Your code detailed below does not output anything to the browser to display so you will never have anything to show for your query:
//This code inside the lines does not list anything at all..
// loop through results and get variables
while ($row=mysql_fetch_array($result)){
$navn =$row["Navn"];
$genre =$row["Mad genre"];
$beliggenhed =$row["Beliggenhed"];
}
Finally, you really, REALLY should be looking into using MySQLi rather than the standard MySQL as that has been Deprecated and removed from current/future versions of PHP. It's use is really not a good idea and it's riddled with flaws and holes.
Ok I can display data on to the page from the database but I am having a problem displaying it nicely in a table format so its under headers and gos down the page. This is what has happened at the moment:
Here is my page code:
<link rel="stylesheet" href="css/productiontable.css">
<?php
error_reporting(0);
require './db/connect.php';
include './includes/header.php';
?>
<h2>Productions</h2>
<div class="productiontable">
<table>
<tr>
<th>Production Name</th>
<th>Production Description</th>
<th>Production Type</th>
</tr>
<tr>
<td class="productname">
<?php
if($result = $connection->query("SELECT * FROM Production")){
if($count = $result->num_rows){
while($row = $result->fetch_object()){
echo $row->ProductionName;
?>
</td>
<td class="productinfo">
<?php
echo $row->ProductionInformation;
?>
</td>
<td class="producttype">
<?php
echo $row->ProductionType;
}
?>
</td><bR>
</tr>
</table>
<?php
$result->free();
}
}
mysqli_close($connection);
include './includes/footer.php';
Here is the css for the table:
#import url(http://fonts.googleapis.com/css?family=Dosis);
h2{
text-align: left;
color: white;
font-family: 'Dosis';
margin: 10px;
font-size: 32px;
}
h3{
font-size: 18px;
color: white;
margin: 20px;
}
.productiontable{
width: 900px;
border: 1px black solid;
margin: 10px;
}
.productname{
width: 200px;
float: left;
font-weight: bold;
margin-left: 10px;
}
.productinfo{
width: 500px;
float: left;
margin-left: 10px;
}
.producttype{
width: 200px;
float: left;
font-style: oblique;
margin-left: 10px;
}
Please help as much as possible many thanks :)
There are a couple of things wrong:
1. The br tag is not needed.
2. The loop should be outside of the tr. This way a new row will be made for every row.
Not sure why it's doing this, but I'm getting the following syntax error: "Unexpected "<" on Line1".
I can't seem to find out what is the problem, I've already tried troubleshooting the problem earlier before posting this.
Here's my code:
<?php
include($_SERVER["DOCUMENT_ROOT"].'/admin/classes/classes.php'); // Include local class lib
$sess = new SessionData(); // Creates session object
//$sess->CheckValidFBSession();
if($sess->CheckValidSession()){
header('Location: home.php');
}
$log= new log($_SERVER["PHP_SELF"], $_GET, $_POST, $_SERVER['HTTP_REFERER'] );
$stats=new Statistics();
$totalusers=$stats->totalscope();
?>
<html xmlns:fb="//www.facebook.com/2008/fbml">
<style>
.title {
color:#000000;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 18px;
font-weight: bold;
text-decoration:none;
}
.larger {
color:#000000;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: none;
text-decoration:none;
}
.larger-a {
//color:#D19160;
color:#538ADC;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: none;
text-decoration:none;
}
.larger-a:hover {
//color:#FF0000;
color:#77C9F3;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 13px;
font-weight: none;
text-decoration:underline;
}
select {
font-family: Tahoma;
font-size: 11px;
}
.white {
color:#FFFFFF;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: none;
text-decoration:none;
}
.blue {
color:#3B5998;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: none;
text-decoration:none;
}
.red {
color:#FF0000;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: none;
text-decoration:none;
}
.menu {
color:#FFFFFF;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: none;
text-decoration:none;
}
.menu:hover {
color:#77C9F3;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: none;
text-decoration:none;
}
.alternate {
color:#3B5998;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: none;
text-decoration:none;
}
.alternate:hover {
color:#000000;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: none;
text-decoration:underline;
}
a {
//color:#D19160;
color:#538ADC;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: none;
text-decoration:none;
}
a:hover {
//color:#FF0000;
color:#77C9F3;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: none;
text-decoration:underline;
}
.bordertable {
border-width: 1px;
border-color: #3B5998;
border-style: solid;
}
.dashedtable {
border-width: 1px;
border-color: #3B5998;
border-style: dashed;
}
.bottomborder {
border-style:solid;
border-color: #3B5998;
border-top-width:0px;
border-bottom-width:1px;
border-right-width:0px;
border-left-width:0px;
}
.one-column {
color:#000000;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: none;
text-decoration:none;
border-style:solid;
border-color: #3B5998;
border-top-width:1px;
border-bottom-width:0px;
border-right-width:1px;
border-left-width:1px;
}
.text {
font-Family: Serif;
font-size: 11px;
font-weight: none;
text-decoration:none;
}
.td0 {
color:#000000;
background-color:#D9DFEA;
border: 0;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: none;
text-decoration:none;
}
.td1 {
color:#000000;
background-color:#86A1CE;
border: 0;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: none;
text-decoration:none;
}
.schedule_table {
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 1px;
border-top-width: 1px;
border-style: solid;
border-color: #000000;
}
.top-border {
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 0px;
border-top-width: 1px;
border-style: solid;
border-color: #3B5998;
}
.schedule {
color:#000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 0px;
border-top-width: 0px;
border-style: solid;
border-color:#000000;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: none;
text-decoration:none;
}
.border-td {
color:#000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-width: 1px;
border-style: solid;
border-color:#3B5998;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: none;
text-decoration:none;
}
td {
color:#000000;
border: 0;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: none;
text-decoration:none;
}
.inputtext {
border:double;
border-width:1;
border-color:#555555;
background-color:#D9DFEA;
font-size:11px;
color: #000000;
font-Family: Tahoma, Arial, Helvetica, sans-serif;
}
.inputsubmit {
border-style:solid;
border-top-width:1px;
border-bottom-width:2px;
border-right-width:2px;
border-left-width:1px;
border-top-color:#D9DFEA;
border-bottom-color:#3B5998;
border-right-color:#3B5998;
border-left-color:#D9DFEA;
background-color:#538ADC;
font-family:Tahoma, arial;
font-size:11px;
color:#FFFFFF;
font-weight:none;
}
a img{
border:none !important;
}
#container{
margin:0 auto;
width:500px;
padding:40px;
text-align:left;
background-color:#fff;
}
#lightbox h2{
margin:0 0 1em 0;
}
#lightbox h3{
color:#FF713F;
}
#lightbox.done p{
color:#333;
}
#form{
text-align:left;
margin:25px;
}
#form ul{
list-style:none;
}
#form li{
margin:0 0 1em 0;
}
#form textarea{
width:100%;
height:150px;
}
#definition{
margin:25px;
}
.highlight{
background-color:#FEFFAF;
}
#lightbox{
display:none;
position: absolute;
top:50%;
left:50%;
z-index:9999;
width:400px;
height:200px;
padding:10px;
margin:-220px 0 0 -250px;
border:1px solid #fff;
background:#FDFCE9;
text-align:left;
}
#lightbox[id]{
position:fixed;
}
#overlay{
display:none;
position:absolute;
top:0;
left:0;
width:100%;
height:100%;
z-index:5000;
background-color:#000;
-moz-opacity: 0.8;
opacity:.80;
filter: alpha(opacity=80);
}
#overlay[id]{
position:fixed;
}
#lightbox.done #lbLoadMessage{
display:none;
}
#lightbox.done #lbContent{
display:block;
}
#lightbox.loading #lbContent{
display:none;
}
#lightbox.loading #lbLoadMessage{
display:block;
}
#lightbox.done img{
width:100%;
height:100%;
}
<!--
#8EA7C5 - blue
#D9DFEA - grey
59 89 152 (#3B5998)
217 223 234 (#D9DFEA)
83 138 220 - link normal (#538ADC)
119 201 243 - link down (#77C9F3)
-->
</style>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '<?php echo $sess->fbappid; ?>',
session : <?php echo json_encode($sess->fbsession); ?>, // don't refetch the session when PHP already has it
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
};
(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
}());
</script>
<title>Kuarrel | Welcome to Kuarrel!</title>
<meta name="description" content="Kuarrel is an online directory that connects people from throughout the world." />
<meta name="keywords" content="kuarrel, chaibear, chai, sa-mp, sa:mp, 2014" />
<meta name="Generator" content="JB engine designed" />
<meta name="robots" content="index, follow" />
<meta name="OriginalPublicationDate" content="2014/03/12/01:37:22">
<meta name="Headline" content="Kuarrel | Welcome to Kuarrel!">
<meta name="IFS_URL" content="/index.php">
<meta name="contentFlavor" content="PAGE">
<meta name="CPS_SITE_NAME" content="Kuarrel | Welcome to Kuarrel">
<meta name="CPS_SECTION_PATH" content="Index">
<meta name="CPS_ASSET_TYPE" content="STY">
<meta name="CPS_PLATFORM" content="HighWeb">
<meta name="CPS_AUDIENCE" content="US">
<meta property="og:title" content="Kuarrel is an online directory that connects people from throughout the world.">
<meta property="og:type" content="website">
<meta property="og:description" content="Kuarrel is an online directory that connects people from throughout the world.">
<meta property="og:image" content="http://www.kuarrel.tk/images/logo-right.jpg">
<meta property="og:url" content="http://www.kuarrel.tk/index.php">
<meta property="og:site_name" content="Kuarrel">
<!-- sO3vWw3hwrnxdrwPGTKy2ZOW6yU -->
</head>
<body>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.Canvas.setAutoResize();
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
<script src="//connect.facebook.net/en_US/all.js#appId=194568130593245&xfbml=1"></script>
<center>
<table class="bordertable" cellspacing=0 cellpadding=0 border=0 width=700>
<tr><td>
<table class="bottomborder" cellspacing=0 cellpadding=0 border=0 width=100%>
<tr><td width=350 bgcolor=#3B5998>
<img src='images/logo-left.jpg'></td>
<td><table cellspacing=0 cellpadding=0 border=0 width=100%><tr><td>
<table cellspacing=0 cellpadding=0 border=0 width=100%>
<tr><td><a href='register.php'><img alt='Register' src='images/logo-right.jpg' border=0></a></td>
<td width=100% bgcolor=#3B5998> </td></tr></table></td></tr>
<tr><td><table cellspacing=0 cellpadding=4 border=0 width=100%><tr height=21>
<!--<td bgcolor=#3B5998 width=10> </td>-->
<?PHP
if(!$sess->CheckValidSession()){
include('modules/default/topnav.php');
}else{
include('modules/loggedin/topnav.php');
}
?> <td bgcolor=#3B5998 width=100%> </td>
</tr></table></td>
</tr></table>
</td></tr></table>
</td></tr>
<tr><td><table cellspacing=0 cellpadding=2 border=0 width=100%>
<tr><td valign=top>
<table cellspacing=0 cellpadding=0 border=0 width=105>
<tr><td>
<?PHP
if(!$sess->CheckValidSession()){
include('modules/default/leftnav.php');
}else{
include('modules/loggedin/leftnav.php');
}
?>
</td></tr>
</table>
</td><td width=595 valign=top>
<table class="bordertable" cellspacing=0 cellpadding=0 border=1 width=100%><tr><td>
<table cellspacing=0 cellpadding=2 border=0 width=100%>
<tr><td class='white' bgcolor=#3B5998>Welcome to Kaurrel!</td></tr></table><center><p class='title'>[ Welcome to Kaurell ]<br>
<table cellspacing=0 cellpadding=0 border=0 width=95%>
<tr><td class='larger'><?=(!empty($_GET['error']));?>"<span style='color:red;font-size:16px;'>Facebook login has been disabled for today, please try again tomorrow.</span><br><br>Kaurell is an online directory that connects people from Facebook through social networks at colleges.
<p>We have opened up Kaurell for popular consumption at <b>all colleges and universities</b>. If you are not part of a college or university, you will be added to the default Kaurell network.
<p>Your account is limited to your own college or university.
<p>You can use Kaurell to:
<br> <b>•</b> Search for people at your school
<br> <b>•</b> Find out who are in your classes
<br> <b>•</b> Look up your friends' friends
<br> <b>•</b> See a visualization of your social network
<p>To get started, click below to register with your Facebook account.<!--<br><font size="+1">Join the <?=$totalusers?> people at Kaurell today.</font>-->
<center>
<?php if(strlen($_SESSION['notpartofacollege'])>2){
echo "<b>".$_SESSION['notpartofacollege']."</b>";
}
?>
<div id="fb-root"></div>
<center><input class='inputsubmit' type="button" value='Register' onclick='javascript:document.location="register.php";'> <input class='inputsubmit' type="button" value=' Login ' onclick='javascript:document.location="login.php";'>
<br> </td></tr></table> </td></tr></table>
</td></tr></table>
<center>
<?PHP include('modules/default/bottomnav.php'); ?>
</center><br>
</td></tr></table>
Thanks to anyone who can figure out what's going on here!
try to correct
<?=(!empty($_GET['error']))?
to
<?=(!empty($_GET['error']));?>
also </span><br><br>":""?> to </span><br><br>