@my3h
why not you set last inserted id in session. use the below code in ApplicationRegister.php file after line #8.

session_start();
$id = mysql_insert_id();
$SESSION['id'] = $id;

and on UserRegister.php file use:

session_start();
$id = $SESSION['id'];

you use session variable for this in php. for a complete php login scrpt help take a look to below mention url:
[url]http://www.phpeasystep.com/phptu/6.html[/url]

Please make change your for loop to below post line:

[CODE]for ( $i=0; $i < 1; $i++ )[/CODE]

this will only show you one upcoming Friday at a time. after going this Friday this will show you next Friday.

@geneh23,
may be your error coming for md5 password conversion. please check your password field in your database thru phpmyadmin that is your password field stored with md5 value. if not then remove md5 conversion from this script. or one time please remove the below mention line and try:
[CODE]$password = md5($password);[/CODE]

Wbr:
Hemant Goyal

Please use the below mention code for batter security. this will not contain "session_register":

[CODE]<?php
/ Check User Script /
session_start(); // Start Session

if (isset($_POST['Submit'])) //Replace Submit with your submit button name.
{

include 'membership_db.php';
// Conver to simple variables
$username = $_POST['username'];
$password = $_POST['password'];

if((!$username) || (!$password)){
echo "Please enter ALL of the information!
";
include 'logIn.html';
exit();
}

// Convert password to md5 hash
$password = md5($password);

// check if the user info validates the db
$sql = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password' AND activated='0'");
$login_check = mysql_num_rows($sql);

$r = mysql_query($q);

if ( $obj = @mysql_fetch_object($r) )
{

while ($r = mysql_fetch_array($r))
{

// Login good, create session variables
$_SESSION["valid_id"] = $obj->id;
$_SESSION['first_name'] = $row['$first_name'];
$_SESSION['last_name'] = $row['$last_name'];
$_SESSION['email_address'] = $row['$email_address'];
$_SESSION['user_level'] = $row['$user_level'];
$_SESSION["valid_time"] = time();

}

mysql_query("UPDATE users SET last_login=now() WHERE userid='$userid'");

// Redirect to member page
header("Location: login_success.php");
}

else {
echo "You could not be logged in! Either the username and password do not match or you have not validated your membership!

Please try again!
";
include 'logIn.html';
}
}
?>[/CODE]

if you get any error in above mention script then please post your query here. i hope this will solve your problem.
Wbr:
Hemant Goyal

Dear geneh23,
Please use below mention rectified user login page coding. i hope this will solve your problem:

[CODE]<?php
/ Check User Script /
session_start(); // Start Session

if (isset($_POST['Submit'])) //Replace Submit with your submit button name.
{

include 'membership_db.php';
// Conver to simple variables
$username = $_POST['username'];
$password = $_POST['password'];

if((!$username) || (!$password)){
echo "Please enter ALL of the information!
";
include 'logIn.html';
exit();
}

// Convert password to md5 hash
$password = md5($password);

// check if the user info validates the db
$sql = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password' AND activated='0'");
$login_check = mysql_num_rows($sql);

if($login_check > 0){
while($row = mysql_fetch_array($sql)){
foreach( $row AS $key => $val ){
$$key = stripslashes( $val );
}
// Register some session variables!
session_register('first_name');
$_SESSION['first_name'] = $first_name;
session_register('last_name');
$_SESSION['last_name'] = $last_name;
session_register('email_address');
$_SESSION['email_address'] = $email_address;
session_register('special_user');
$_SESSION['user_level'] = $user_level;

    mysql_query("UPDATE users SET last_login=now() WHERE userid='$userid'");

    header("Location: login_success.php");
}

} else {
echo "You could not be logged in! Either the username and password do not match or you have not validated your membership!

Please try again!
";
include 'logIn.html';
}
}
?>[/CODE]

I hope that the above mention code is solve your problem. if solved then please mark this thread as solved.

change line no. 9,10,11 in Contactthanks.php as below:

[CODE]$Skill1 = Trim(stripslashes($_POST['Skill1']));
$Skill2 = Trim(stripslashes($_POST['Skill2']));
$Skill3 = Trim(stripslashes($_POST['Skill3']));[/CODE]

This will work for you.

add a extra field in your database named usergroup and set the user permission in it.
this will batter work for you.

welcome.................

why not you use the below syntax:
[CODE]$birthday = "$birthday_year-$birthday_month-$birthday_day";[/CODE]

in the replace of line:
[CODE]$birthday = strtotime($birthday_year, $birthday_month, $birthday_day);[/CODE]

this will work and given output in YYYY-MM-DD format.

please post your code here so we help you batter..

first you should create the date in variable with your day,month,year data and submit it in database in the format YYYY-MM-DD.
your date should be in YYYY-MM-DD format.

[QUOTE=gandhikr;1232043]Hello,

I have this inquiry form. I wish to capture the fields and email via php script. Can anyone help me in doing that?

It uses html text field, select and textarea form elements.. In select name I wish to capture and email the option selected.

Name:

Email:

Phone:

Enquiry For: Joining Courses Franchisee Corporate Training Others

Query:



Thanks a million in advance

Best Regards
K G[/QUOTE]

if you want to send your inquiry form on your mail then use the below script:
form.php
[code]
<?PHP
if (isset($_POST['enquire'])) //Getting data from form.
{

$name = $_POST['name'];
$email = $_POST['email'];
$phone_no = $_POST['phone'];
$inqfor = $_POST['cmcenquiryform'];
$query = $_POST['query'];

$to = 'your email goes here'; //Change this with your email address.
$sunject = "Inquery form Submitted by $name"; //your subject goes here.
$message = "

Inquery form Submitted by $name

Here are the Inquiry Received by User!

Name:$name Email:$email Phone Number:$phone_no Inquiry for:$inqfor Query:$query

"; //Your Message Goes Here. edit with your requirement.

// To send HTML mail, the Content-type header must be set
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

// Additional headers
$headers .= ...

real the complete forum carefully..
you may find your answer posted by atli.

use the below script:

[CODE]<?PHP

$image = "http://images.websnapr.com/?size=s&url=$url";

echo "<img src=\"$image\" width=\"202\" height=\"152\" alt=\"Screen Shot.\">";

?>[/CODE]

The above will capture 202*152 size image.

dude why not u use the code that is posted by atli in #24.
please try it. it's predesigned and well formated with css.

could u describe the more thing about your problem so daniweb can help u?

Have u Upload ur .flv file in particular directory. if not then first upload flv file in directory and then try to access it.
or if u want to change the file permission then open ftp client and right click on file and select Properties. There Change file permission to read, write.

but you may also export these data in XML structure from phpmyadmin.
and also inserting and deleting of data in phpmyadmin is too easy and more secure. and also phpmyadmin is already provided with CPanel.

i suggest you that why not u zipped your project in single file with installing instruction with Downloading Link of WAMP or MAPP. so every user can use it without any installer.
and also you may create the installer in php and set it the default directory for user help in installing the project.

i suggest you that why not u zipped your project in single file with installing instruction with Downloading Link of WAMP or MAPP. so every user can use it without any installer.
and also you may create the installer in php and set it the default directory for user help in installing the project.

first of my suggestion to you that why not u chose mysql to storing your data because in mysql there are too easy to find only one record of same name in higher value.
i suggest you that first you choose the mysql for your data storing.

Thanx alimoe for your comment.

[QUOTE=OmniX;1104614]hemgoyal_1990 can you explain your code in more detail?
example what the -d and -f do?
also in the url what is shown? just /file or /file.php? possibly to remove it completly or just the .php?
if so thats how to remove the file totally and access the get variables as well, like previously stated?
Trying to learn mod_rewrite it a big big topic.[/QUOTE]

[CODE]RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php[/CODE]

in the above code the [B]-d[/B] define for [B]D[/B]irectory and [B]-f[/B] for Regular [B]F[/B]ile.
and the above will remove .php extension from your URL.
for ex: if ur page name is test.php in main directory then you may access your page with the following urls:
[B][url]http://domain/test[/url][/B]
or
[B][url]http://domain/test.php[/url][/B]
the above is work in both condition.

OmniX commented: Very Helpful, Thankyou. +3

[QUOTE=vizz;1093662]How to allow user to add images to display at his/her profile area?[/QUOTE]

this is not too tuff.
for this you need a database table filed for storing your image url for your users.
after that you may print your user profile picture in his/her profile.
for uploading picture take a look to the below page:
[url]http://www.php-mysql-tutorial.com/wikis/mysql-tutorials/uploading-files-to-mysql-database.aspx[/url]

you may set the session for logged into you site and destroy the session when your logged out or set the timeout if not any activity done in given time. you may also use the below script for set the session and destroying the session:

login.php:
[CODE]<?php
session_start();
// This part sets up the connection to the
// database (so you don't need to reopen the connection
// again on the same page).
if ($_SESSION["valid_user"])
{
// User not logged in, redirect to login page
Header("Location: welcome.php");
}
// is selected.
if (isset($_POST['submit']))
{
$name = $_POST['name'];
$email = $_POST['email'];

$file = file_get_contents("data.txt");
if(strstr($file, "$name||$email"))
{

    $_SESSION["valid_user"] = $_POST["name"];
    $_SESSION["valid_time"] = time();

    // Redirect to member page
    Header("Location: welcome.php");
}
else
{
    // Login not successful
    print '<script> alert ("Sorry! You have entered a Invalid Login Id or Password."); window.location="login.php"; </script>';
}

}
else
{
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Login Page Test Script. enter name:

enter email:

'; } ?> [/CODE] welcome.php: [CODE] [/CODE] logout.php [CODE]

Hay murty14,
Why not you use the code that is posted by atli in [URL="http://www.daniweb.com/forums/post1046310.html#post1046310"]#24[/URL] reply.
This is best and fully working for me.

Thank You.

Suresh_13 commented: this is for multilevel. if we think from position left or right then this code not working +0

to convert String in Date format use the below script:

[CODE]<?php

$DATE = "20091231190903";

echo date("Y-m-d H:i:s",(strtotime($DATE)))

?>

Output: 2009-12-31 19:09:03[/CODE]

Hay nats01282,

I Have created a Registration page and Login page for You. That is Insert Data in data.txt file and also login with this data.txt file. the below script also check the data that is already inserted or not in data.txt file. use the below script:

reg.php file
[CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Registration Test Page enter name:

enter email:

<?PHP

if (isset($_POST['submit']))
{

$name = $_POST['name'];
$email = $_POST['email'];

$file = file_get_contents("data.txt");
$string = "$name||$email";
if(!strstr($file, "$string"))
{
$myFile = "data.txt";
$fh = fopen($myFile, 'a') or die("can't open file");
$stringData = "$name||$email\n";
fwrite($fh, $stringData);
echo "your Registration Information Successfully Inserted.";
fclose($fh);
}
else
{
echo "Sorry the name: $name and email: $email is already in database. please use defrent name & email.";
}
}

?>[/CODE]

Data Ex: user||user@user.com
user1||user1@user1.com
Database file for Demo: [url]http://www.kuchamancity.com/test/data.txt[/url]

login.php file
[CODE]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Login Page Test Script. enter name:

enter email:

<?PHP

if (isset($_POST['submit']))
{

$name = $_POST['name'];
$email = $_POST['email'];

$file = file_get_contents("data.txt");
if(!strstr($file, "$name||$email"))
{
echo "Sorry! You Insert an Invalid Name & Email. Please ...

nats01282 commented: Excelent work on login script without mySQL database. solved my question thanks you +1

why not you move to Joomla.
Joomla is open source and available on net for free and comes with all features that required a web developer.
so use Joomla..