Jump to content

Deprecated!!help!!

- - - - -

  • Please log in to reply
10 replies to this topic

#1
kiko2max

kiko2max

    Newbie

  • Members
  • PipPip
  • 19 posts
I have and error in line 22..
Deprecated: Function eregi() is deprecated in C:\xampp\htdocs\bakup\userinfo.php on line 22.

this is the code


<?

include("include/session.php");

?>


<html>

<title>Jpmaster77's Login Script</title>

<body>


<?

/* Requested Username error checking */

$req_user = trim($_GET['user']);

if(!$req_user || strlen($req_user) == 0 ||

   !eregi("^([0-9a-z])+$", $req_user) ||

   !$database->usernameTaken($req_user)){

   die("Username not registered");

}


/* Logged in user viewing own account */

if(strcmp($session->username,$req_user) == 0){

   echo "<h1>My Account</h1>";

}

/* Visitor not viewing own account */

else{

   echo "<h1>User Info</h1>";

}


/* Display requested user information */

$req_user_info = $database->getUserInfo($req_user);


/* Username */

echo "<b>Username: ".$req_user_info['username']."</b><br>";


/* Email */

echo "<b>Email:</b> ".$req_user_info['email']."<br>";


/**

 * Note: when you add your own fields to the users table

 * to hold more information, like homepage, location, etc.

 * they can be easily accessed by the user info array.

 *

 * $session->user_info['location']; (for logged in users)

 *

 * ..and for this page,

 *

 * $req_user_info['location']; (for any user)

 */


/* If logged in user viewing own account, give link to edit */

if(strcmp($session->username,$req_user) == 0){

   echo "<br><a href=\"useredit.php\">Edit Account Information</a><br>";

}


/* Link back to main */

echo "<br>Back To [<a href=\"main.php\">Main</a>]<br>";


?>


</body>

</html>

Thanks for Advance :)

#2
Vaielab

Vaielab

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 547 posts
The function eregi will soon be remove from the function list.
So you may either ignore this warning and never ever ever update your server (bad solution)
Or you may remplace your eregi function with thhe new "preg_match" function PHP: preg_match - Manual (good solution)

#3
kiko2max

kiko2max

    Newbie

  • Members
  • PipPip
  • 19 posts
WOW ^^ thanks for helping me for the codes, I'm still not good enough for coding a PHP.

by the way my next target is reservation, can you give me some advice what will be the flow of system?.

Thanks For Advance ^^

#4
Vaielab

Vaielab

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 547 posts
I'll need more details. What kind of reservation?
What are your objectifs?

#5
kiko2max

kiko2max

    Newbie

  • Members
  • PipPip
  • 19 posts
Objectives:
-reservation and payment of a movie
-with e-mail notification and PDF viewer for Transaction

that my objective :)

What do you think sir?

#6
Vaielab

Vaielab

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 547 posts
If you want to pay with credit card, you will need a ssl (about 100$/years) and a credit card gateway (may be hard)

On the top of my head, I'll say that you should start by findind a way to see what seat is not reserved.
Than reserve a seat, your gonna need to use session and sql at some point and accept the money
create the pdf (you'll need a pdf library on your server)
and send everything via email.

You'll probably want a QR Code generator so they can print it

#7
kiko2max

kiko2max

    Newbie

  • Members
  • PipPip
  • 19 posts
I think, I will focus first for the reservation, e-mail notification and PDF viewer after that maybe I should start for the payment.

do you have any site that can help me for reservation? or just a basic reservation so that I can make that...

I'm still newbie in PHP. :(

#8
Vaielab

Vaielab

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 547 posts
Do you know sql?

#9
kiko2max

kiko2max

    Newbie

  • Members
  • PipPip
  • 19 posts
Yes, Im reading in w3schools and trying to apply it on XAMPP.

Why did you ask sir?

#10
Vaielab

Vaielab

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 547 posts
The first thing your gonna have to do is to create your database
a seat is in a room, multiple seat by room, multiple room by theater... multiple theater?
Price by seat...

#11
kiko2max

kiko2max

    Newbie

  • Members
  • PipPip
  • 19 posts
I have already a database and have a table for the Users. After that should I need to create a another table for the seat?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users