nav33n 472 Purple hazed! Team Colleague Featured Poster
<table width="1000" height="95" border="1">
  <tr>
    <td bgcolor="#0000FF">&nbsp;</td>
  </tr>
</table>

<center>

<?
   include("connect.php"); 
      //this is your validation in the form,put it here....
       if (empty($_POST['name']))
      { 
      $errors[] = 'Please enter a name';
      }
      if (empty($_POST['email']))
      {
      $errors[] = 'Please enter a valid e-mail address';
      }
      else if (!eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$", 
      $_POST['email']))
      {
      $errors[] = 'Please enter a valid e-mail address';
      }
      if (empty($_POST['contact']))
      {
      $errors[] = 'Please enter a valid contact with numeric value';
      }
      else if (!is_numeric($_POST['contact']))
      {
      $errors[] = 'Please enter a valid contact with a numeric value';
      }
      
      
      if (empty($_POST['person_attend']))
      {
      $errors[] = 'Please enter some word for person attend';
      }
      
      
      else if (strlen ($_POST['person_attend']) > 255)
      {
      $errors[] = 'person attend';
   }
   
   
   
      if (empty($_POST['comment']))
      {
      $errors[] = 'Please enter some comment';
      }
      else if (strlen ($_POST['comment']) > 255)
      {
      $errors[] = 'comment ';
  
 }
 
      
 
 
      if($name="" && $email="" && $contact="" && $person_attend="" && $comment="" )
      
      {
 //process form
 
      //this is your add query....
  
      $name = $_POST['name'];
 
      $email = $_POST['email'];
 
      $contact = $_POST['contact'];
 
      $person_attend = $_POST['person_attend'];
  
      $comment = $_POST['comment'];
 
      $query = "INSERT INTO rsvp (id, name, email, contact, person_attend, comment)
   
      VALUES ('', '$name', '$email', '$contact', '$person_attend', '$comment')";
      
      $results = mysql_query($query) or die ("Could not execute query : $query." . mysql_error());
		if($result){
      echo "thanks you ";
		}
       mysql_close();
     
 
      } else {
 if(isset($errors))
{

	foreach($errors as $val)
	{
	
		echo "Error: $val <br/>"; 
	}
}
      	
      }
 
      
      

?>
</center>
<center> 
<br>
<a href="Index.php">View list attend</a><br>
<a href="register.html">Clik here to register</a>
</center>

Try this.

nav33n 472 Purple hazed! Team Colleague Featured Poster

First of all, welcome to Daniweb. Could you please post your code here ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

Well, When a user creates an account, have another field in the table called securitycheck or something. Let it store the hash of user email and his name(or some text)! While sending the link to the email, concat this securitycheck field with the url. When the user clicks the url, check if securitycheck value matches with the one in securitycheck field of the table. Then ask him to update the password field. While updating password field, empty the securitycheck field, so that the user doesn't click this link again and change his password.
I don't know about the access levels and its working. But it should be pretty simple. Get the access level from the table and redirect accordingly.

Cheers,
Naveen

nav33n 472 Purple hazed! Team Colleague Featured Poster

:) lol.. congrats ! finally the problem is solved!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Sacrifice Life, Oh Witch !

nav33n 472 Purple hazed! Team Colleague Featured Poster

Now give me my ring !

nav33n 472 Purple hazed! Team Colleague Featured Poster

-686

nav33n 472 Purple hazed! Team Colleague Featured Poster

Notices can be ignored. Notices can be turned off by changing the error_reporting setting in your php.ini.
Anyway, as ryan_vietnow has already mentioned, there are 2 ?>. And then, the } for the class UI is missing.

nav33n 472 Purple hazed! Team Colleague Featured Poster

When the user logs in, check if he's a valid user. If he's a valid user, add that username to a session variable. Use that session variable in the next page where you want to display his name. A small eg.

<?php //page1.php
session_start();
// check if the user is valid
if (valid user){
$_SESSION['username']=$username;
redirect to page2.php
} else {
 //error message
}

And this is page2.php

<?php
if(isset($_SESSION['username'])){
 echo "Welcome ". $_SESSION['username'];
} else {
  echo "Not logged in ! ";
  exit;
}

Hope that helps.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Thats very simple.
1. To add a team: Have a textbox where the user can enter a team and submit it.
2. To update/delete a team, list all the teams as you are doing here. By default, check all the checkboxes. The user can remove a team by clearing the checkbox and click on submit. When the user clicks on submit, remove all the records from team and insert only those which are checked. So, in the end, the table will have only those teams which were checked. I hope this is what you are saying.

nav33n 472 Purple hazed! Team Colleague Featured Poster

As I told you already, If you want to 'update' checkboxes, ie., If you want to delete a checkbox, you have to delete all the checkboxes and then insert only those checkboxes which are checked. I don't know how you can 'add' checkboxes.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb lindanit! :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

browsers,wont,usually,break,a,string,unless,it,has,some,breaking,characters,in,it,such,as,spaces,so,either,this,text,will,extend,forever,or,it,will,get,cut,off,depending,on,the,browser,mostly.

this isnt a daniweb issue,it's more of an issue with a convention in the way text is processed/rendered at the client.

that said, it is relatively easy to fix, just run through the uploaded post data and insert extra breaking chracters as required.

:) Thanks!

nav33n 472 Purple hazed! Team Colleague Featured Poster

:) Welcome to Daniweb Sharada. One suggestion, don't get bored if you dont get the right output! If you get bored, you will lose interest. And if you lose interest, you will never get the right output !

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb! :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

umm.. Consider that query as a collection of characters. Obviously, the browser wouldn't know if its a query or just a normal string. My question is, why did firefox act strangely ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

kings should have used code tags, which would also solve the problem.

:) I know. But some people don't use the tags. But that aint a reason not to fix (?) this problem. Right ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

You are welcome :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

hmm..Your above script should definitely work.. Check your php.ini file for session.
Check for these lines and if its commented, uncomment it.

session.save_handler = files
session.use_cookies = 1

.
If this doesn't work, then I can't do much about it.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Replace if(1==2) with

if(!$_POST['username'] || !$_POST['pass']) {
die('You did not fill all the fields.');
}

and leave the else part as it is.

nav33n 472 Purple hazed! Team Colleague Featured Poster

hmm.. But its hiding the actual query in FF. If you see the screenshot of FF, you will find some part of the query missing !

nav33n 472 Purple hazed! Team Colleague Featured Poster

Add a condition, where tdate !="0000-00-00" in your query. That will return only valid dates.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Contrats ! :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

php and apache versions doesn't matter.
Check the loop, I have added if(1==2) which will always fail. Replace it with your validation part.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Can you post your code ? If you are getting the output in mysql and not in php, there must be something missing in php.

nav33n 472 Purple hazed! Team Colleague Featured Poster

I have modified your code to test it and it works. Here's the code. Modify it again to meet your requirements.

<?php //login1.php
session_start();
ob_start();
?>
<?php
//if login form is submitted

if(1==2) {
die('incorrect password,please try again.');
}
else
//if login is ok then direct them to options page
{
$_SESSION['views'] = 1;	
header("Location:option1.php");	
ob_flush();

?>
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=option1.php">
<?php
}
?>

And here is option1.php

<?php 
session_start();
ob_start();
if(isset($_SESSION['views'])) {
$_SESSION['views']=$_SESSION['views']+1;
echo $_SESSION['views'];
}
else
{
//header("Location:message.php"); 
echo "session not set"."</br>";	
print_r($_SESSION);
}
?>
nav33n 472 Purple hazed! Team Colleague Featured Poster

Hi,

Dani! Are you changing the layout again ? In this particular thread, the border is acting weirdly and the menu on the right isn't visible(in IE) ! Here are the screenshots of IE and FF.

Cheers,
Naveen

nav33n 472 Purple hazed! Team Colleague Featured Poster

hmm.. So there aren't any errors ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

huh! Check if the query works in phpmyadmin/mysql. Nothing wrong with the query though.

nav33n 472 Purple hazed! Team Colleague Featured Poster

What is the error ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

I don't see anything wrong with the code apart from this line. if(!$_POST['username'] | !$_POST['pass']) { It should have been if(!$_POST['username'] || !$_POST['pass']) { . Thats just a syntax error. The code isn't long ! lol.. it has just 80+ lines. Anyway, Check if its entering the else { $_SESSION part. If its entering the else part, remove the meta tag and try again..

Edit: And btw, <!META HTTP-EQUIV="Refresh" CONTENT="0; URL=option1.php"> is wrong. What is "!" doing there ?

Edit 2: And, you are not printing $_SESSION in page 2 :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Hi Nirmala. Welcome to Daniweb! Please read the guidelines and post your questions in relative forum! :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Then code please !

nav33n 472 Purple hazed! Team Colleague Featured Poster

are you putting session_start() at the top of all the pages that require the session?

You beat me by few seconds :P

nav33n 472 Purple hazed! Team Colleague Featured Poster

Are you starting the session in page2 ? If your answer is yes, then you need to show us your code. If your answer is no, then start the session ! :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Thats really good.

nav33n 472 Purple hazed! Team Colleague Featured Poster

-684

nav33n 472 Purple hazed! Team Colleague Featured Poster

millet

nav33n 472 Purple hazed! Team Colleague Featured Poster

In the link, he isn't displaying all the images. He's given a link to 'download' an image file. That again, is displaying 1 image at a time ! :@

nav33n 472 Purple hazed! Team Colleague Featured Poster

Can you explain your problem in detail ? Because I have never used reset lost password option of this site. And also, what is redirecting a user based on url in the table ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

mysql_fetch_array does the work of both mysql_fetch_row and mysql_fetch_assoc. (mysql_fetch_array can take an extra parameter!). Anyway, stripslashes just takes off the added slashes. unless you are storing the values using addslashes, You don't have to use stripslashes. Print out what's in $category. If it has slashes, then probably, that slash 'escaped' the " character and maybe that was the reason you were getting null ?

Cheers,
Naveen

nav33n 472 Purple hazed! Team Colleague Featured Poster

-679

nav33n 472 Purple hazed! Team Colleague Featured Poster

Filed

nav33n 472 Purple hazed! Team Colleague Featured Poster

heir
hair
year

Mastermind

nav33n 472 Purple hazed! Team Colleague Featured Poster

I dunno! never heard of that before..

nav33n 472 Purple hazed! Team Colleague Featured Poster

I dont know ! Its your script :S ! Check the conditions while admin login.