Hi, long time no see! Thought I left a thank you, but apparently I did not. So, thank you for the previous help.
Unfortunately, I am in need of some new help. The login system you helped me create/created for me works fine, but my boss decided he wanted something more. He wants a system where the customers can buy the products on a system of pages inside the login system. I figured that would be simple enough, but I have run into two problems:
1) I cannot get the additional pages beyond the place the login system redirects to to check for an account, so pretty much anyone with a link can see the pages. I can garble them up with
Code: Select all
http://www.showtimetack.com/controlbarsdealers.php?id=' . $id . '"
and so on, but all they have to do is type
Code: Select all
http://www.showtimetack.com/controlbarsdealers.php
and they're in.
The following is the php code on the main page that checks for $id. Whenever I add it to the other pages, it says "Missing Data to Run".
Code: Select all
<?php
session_start(); // Must start session first thing
/*
Created By Adam Khoury @ http://www.flashbuilding.com
-----------------------June 20, 2008-----------------------
*/
// See if they are a logged in member by checking Session data
$toplinks = "";
if (isset($_SESSION['id'])) {
// Put stored session variables into local php variable
$userid = $_SESSION['id'];
$username = $_SESSION['username'];
$toplinks = '
<a href="logout.php" style="font-size:36px;">Click Here To Log Out</a>';
} else {
$toplinks = '<a href="join_form.php">Register</a> • <a href="login.php">Login</a>';
}
?>
<?php
// Use the URL 'id' variable to set who we want to query info about
$id = ereg_replace("[^0-9]", "", $_GET['id']); // filter everything but numbers for security
if ($id == "") {
echo "Missing Data to Run";
exit();
}
//Connect to the database through our include
include_once "connect_to_mysql.php";
// Query member data from the database and ready it for display
$sql = mysql_query("SELECT * FROM members WHERE id='$id' LIMIT 1");
$count = mysql_num_rows($sql);
if ($count > 1) {
echo "There is no user with that id here.";
exit();
}
while($row = mysql_fetch_array($sql)){
$country = $row["country"];
$state = $row["state"];
$city = $row["city"];
$accounttype = $row["accounttype"];
$bio = $row["bio"];
// Convert the sign up date to be more readable by humans
$signupdate = strftime("%b %d, %Y", strtotime($row['signupdate']));
}
?>
Do I need to create modified versions of this for the subpages? If I am not clear about what I am trying to say, please let me know.
2) The payment system my company uses is Coolcart.net. It uses HTML to take orders and redirect them to its payment processing system. So far, everything works about that with this system except for one thing: The link to redirect people back from Coolcart.net payment processing page to the ordering page they were on cannot work like this:
Code: Select all
http://www.showtimetack.com/controlbarsdealers.php?id=' . $id . '"
It simply does not send the user back. When I use controlbarsdealers.php without anything after that, however, it does work. How do I get them from Coolcart back seamlessly with the existing system?
The HTML used on the ordering page is:
Code: Select all
<input type="hidden" value="http://www.showtimetack.com/controlbarsdealers.php?id=' . $id . '"" name="ReturnLink"></input>