PHP for my site

Started by Collins 3.0, January 23, 2012, 04:58:51 PM

Collins 3.0

- 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.

zubrag

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!

Collins 3.0

Thanks will do, preciate it!

vinayks

Hello,

I have downloaded your upload php script,

may i know how to integrate it with joomla article or module . pls help

Collins 3.0


Caffeine_Cadet

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.

<?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 ?>