Zubrag.com
October 20, 2019, 01:31:03 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: PHP for my site  (Read 7104 times)
Collins 3.0
Newbie
*
Posts: 5


« on: January 23, 2012, 08:58:51 AM »

- buy now button with pay pal that links to registration after payment was excepted
- registration form that will input to my DB with md5 encryption
- a session script for members only
- login / logout that checks against DB and Welcome "username" that is displayed when logged it

Id be willing to PAY anyone who can come up with this for me, ive been trying for a while and its tricky.

Logged
zubrag
Administrator
Hero Member
*****
Posts: 788


WWW
« Reply #1 on: January 24, 2012, 01:54:52 AM »

Unfortunately, I'm very busy. You could try posting these requirements on freelance sites. Second site from the list would be the best for your project. But be very careful before choosing somebody, make sure they understand all the details of what you need. I would also recommend somebody who has at least 10-20 ratings, as those without ratings tend to disappear. Good luck!
Logged
Collins 3.0
Newbie
*
Posts: 5


« Reply #2 on: January 26, 2012, 10:02:07 AM »

Thanks will do, preciate it!
Logged
vinayks
Newbie
*
Posts: 1


« Reply #3 on: January 28, 2012, 12:07:14 PM »

Hello,

I have downloaded your upload php script,

may i know how to integrate it with joomla article or module . pls help
Logged
Collins 3.0
Newbie
*
Posts: 5


« Reply #4 on: February 07, 2012, 08:53:39 AM »

whats joomla?
Logged
Caffeine_Cadet
Newbie
*
Posts: 13


« Reply #5 on: April 09, 2012, 08:52:24 PM »

joomla is an all inclusive program like dreamweaver that is used as a web building tool.  it includes php, sql, and some other scripts as well as its own toolkits to make things easier for web publishers and webpage designers.  it is free, open source, and very user friendly.  as for your initial question, i can give you a copy of my login script:

bear in mind that i have an accompanying stylesheet and some complementary files that make this look better.  this should be enough to get you started though.  change your login info for the $db variable.  questions?  lemmie know.
Code:
<?php
$db 
mysql_connect(MYSQL_HOSTMYSQL_USERMYSQL_PASSWORD)
or die ('Unable to connect.  Invalid username or password.');

$username = (isset($_POST['username'])) ? $_POST['username'] : '';
$password = (isset($_POST['password'])) ? $_POST['password'] : '';

$username stripslashes($username); 
$password stripslashes($password); 

$username mysql_real_escape_string($username);
$password mysql_real_escape_string($password);

$tmpname = (isset($_SESSION['tmpname'])) ? $_SESSION['tmpname'] : '';
$tracker 0;

if (isset(
$_POST['submit'])) 
{
$tracker 1;
$tmpname $username;
$query 'SELECT
id, permission_level, name, last_login
FROM
clients
WHERE
username = "' 
$username '" AND
password = PASSWORD("' 
$password '")';

$result mysql_query($query$db) or die(mysql_error($db));
if($row mysql_fetch_array($result))
{
$_SESSION['user_id'] = $row['id'];
$_SESSION['permission_level'] = $row['permission_level'];
$_SESSION['name'] = $row['name'];

mysql_query($query$db) or die (mysql_error($db));
}
}


if (isset($_SESSION['name']))

echo '<div id = "userset"><table cellspacing = "20px"><tr>';
echo '<td>Welcome, ' $_SESSION['name'] ;
echo '</td><td>';
echo '<a href = "logout.php">';
echo "Log out " $_SESSION['name'] . "</a>";
if($_SESSION['permission_level'] == 1)
{
echo ' | <a href = "admin.php">Admin</a>';
}
echo ' | <a href = "profile.php">Profile</a>';
echo '</td>';
?>



<form action = "search.php" method = "get">
<td><input type = "text" id = "search" name = "keywords"  /></td>
<td><input type = "submit" value = "search" /></td></tr>
</form>


<?php 
date_default_timezone_set ('America/Chicago');
echo '<tr>';
echo '<td></td><td>';
echo date('F j');
echo ', ';
echo date('Y');
echo '&nbsp;&nbsp;';
echo date ('H:i');
echo '</td></tr></table></div>';

}else{ 
?>


<form action = "homepage.php" method = "post">
<table id = "loginbox" cellspacing = "20px">
<tr>
<th style = "color: #8af;">Please Log In</th>

<th>Username:&nbsp;
<input type = "text" id = "user" name = "username" maxlength = "20" size = "20" value = "<?php echo $tmpname?>" /></th>

<th>Password:&nbsp;
<input type = "password" id = "pass" name = "password" maxlength = "20" size = "20" /></th>

<th><input type="submit" id = "loginsubmit" name = "submit" value = "" /></th>
<th style = "color: #8af;">Or &nbsp;<a href = "register.php" title = "register">Register</a></th>
</tr>

<tr>
<td colspan = "7" ><a href="forgot_password.php">Forgot your password?</a></td>
</tr>

<tr><td colspan = "7">
<?php
if ($tracker == 1)
{
echo 'You have enterened an invalid username and password combination.';
}
echo '</td></tr><tr><td colspan = "7">';
if ($tracker == 1)
{
echo 'Please try again.';
}
echo '</td></tr>';
?>

</table>
</form>

<?php ?>
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC