nav33n 472 Purple hazed! Team Colleague Featured Poster

You have an error in your query. It isn't returning a valid resource. Print out $query, execute it in phpmyadmin/mysql. Then you ll know what's the error. You can also give die(mysql_error());
ie., $result=mysql_query($query,$conn) or die(mysql_error());

nav33n 472 Purple hazed! Team Colleague Featured Poster

Print out the query and test it in phpmyadmin/mysql. Check if the query returns any value.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Search for pagination. You can make use of 'limit' to display only 8 records at a time.

nav33n 472 Purple hazed! Team Colleague Featured Poster

no. The WHERE clause.

nav33n 472 Purple hazed! Team Colleague Featured Poster

:P sure!

nav33n 472 Purple hazed! Team Colleague Featured Poster

there is no where condition for limit. select * from table where limit 0,5 Wrong. select * from table limit 0,5 Right.

nav33n 472 Purple hazed! Team Colleague Featured Poster

She never brings the ball back when you throw it, and when she gets tired of the game she buries the ball.

LOL.. Welcome to Daniweb otakh! :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

uhm! I have already seen you in php forum! But, welcome (?) to Daniweb :P

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome Shaninc :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb Esperentiste!

nav33n 472 Purple hazed! Team Colleague Featured Poster

:) Welcome to Daniweb!

nav33n 472 Purple hazed! Team Colleague Featured Poster

:) Welcome wannabeIT !

nav33n 472 Purple hazed! Team Colleague Featured Poster

You are getting the listbox and the values but you can see it, because you don't have the value between <option></option>.
Ie.,

echo '<option value='.$myrow['$industrytype'].'>'.$myrow['$industrytype'].'</option>';
nav33n 472 Purple hazed! Team Colleague Featured Poster

Right ! :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Using css.. :) You can post this question in css to get better replies..

nav33n 472 Purple hazed! Team Colleague Featured Poster
if ($_POST['jobtype'] == $value_of_option_in_the_database) { 
$selected = "selected"; 
} else {
$selected = "";
}
?>
<select name='jobtype' style='width: 350px'>
<option value='$line[4]' <?php echo $selected; ?>>$line[4]</option>
<option value='Employee' <?php echo $selected; ?>>Employee</option>
........
nav33n 472 Purple hazed! Team Colleague Featured Poster

When the user submits, get the listbox value. Check if it matches with the value in the database and make it selected.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session in C:\xampp\htdocs\cycle\logout.php on line 34

That means you are trying to destroy a session that doesn't exist.

nav33n 472 Purple hazed! Team Colleague Featured Poster

-713

nav33n 472 Purple hazed! Team Colleague Featured Poster

date
late
acclerate


Framework

nav33n 472 Purple hazed! Team Colleague Featured Poster

Walk.


desktop or laptop ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb Chris :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Hi ! :) Welcome to Daniweb Nepenthe8!

nav33n 472 Purple hazed! Team Colleague Featured Poster

Maybe this isn't working. Print some statements inside this loop and execute this script (without logging in). if (!isset($_SESSION['agent']) OR ($_SESSION['agent'] != md5($_SERVER['HTTP_USER_AGENT'])) ) {

nav33n 472 Purple hazed! Team Colleague Featured Poster

I would suggest you to go through the tutorials first. Then understand the example I gave you.

nav33n 472 Purple hazed! Team Colleague Featured Poster

I'm using Mozilla Firefox. After I logged it, I checked the cookies, there will only 'YourVisitID' under localhost. Then when I press log out button, It will redirect me back to the i.dex.php. Then I tried to copy & paste the direct link to the admin's page., it still works.

Can you post your script of admin's page ? When you run the logout script, sessions should get destroyed. Check if there are still values in the session variable :S

nav33n 472 Purple hazed! Team Colleague Featured Poster

Are you validating existence of session in admin's page ? Try ths simple example.

<?php //page1.php
session_start();
$_SESSION['name']="test";
echo "<a href='page2.php'>Click here</a>";
?>

This is page2.php

<?php
session_start();
if(!empty($_SESSION['name'])){
 echo $_SESSION['name'];
} else {
 echo "Invalid session";
}
?>

Well, if you try to access page2.php directly, you will get Invalid session. Are you doing a check like this one in admin's page ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

huh! How do you know it creates another session ?

nav33n 472 Purple hazed! Team Colleague Featured Poster

:) Yep. Please post your code. If anyone come across the same problem, this thread might be useful.

nav33n 472 Purple hazed! Team Colleague Featured Poster

:) You are welcome!

nav33n 472 Purple hazed! Team Colleague Featured Poster

:) Welcome!

nav33n 472 Purple hazed! Team Colleague Featured Poster

:) Welcome to Daniweb amala009 !

nav33n 472 Purple hazed! Team Colleague Featured Poster

just echo it. die is an alias of exit and once exit/die is encountered, the execution of the script stops there itself. You can print the error in this fashion !

<?php
if(isset($_POST['submit'])){
  if(empty($_POST['name'])){
    $error="Name field is empty !";
  } else {
  //process the information 
 }
}
?>
<html>
<body>
<form method="post" action="test.php">
<input type="text" name="name"><?php echo $error; ?><br />
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>

So, If the textbox is empty, then $error will have the value, Name field is empty.. If it isn't empty, $error will be null. If its empty, the script wont do anything but show the error message next to the textbox.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Why do you need a switch when you know $_POST can only have 2 values. Either 1 or 2. You can make use of a simple if condition.

$action = $_POST['action'];
if($action == 1 ) {
 // show the textboxes and update 
}
if($action == 2 ){
 // delete the record
}
nav33n 472 Purple hazed! Team Colleague Featured Poster

Umm..What exactly are you trying to do ?

nav33n 472 Purple hazed! Team Colleague Featured Poster
nav33n 472 Purple hazed! Team Colleague Featured Poster
<?php //this script is hidden.php
$action=$_POST['action'];
echo $action; //use $action in your switch case
?>
<html>
<body>
<form method="post" name="hidden" action="hidden.php">
<input type="hidden" name="action">
<input type="button" name="button" value="Update" onclick="javascript: document.hidden.action.value='1';document.hidden.submit();">
<input type="button" name="button" value="Delete" onclick="javascript: document.hidden.action.value='2';document.hidden.submit();">
</form>
</body>
</html>
nav33n 472 Purple hazed! Team Colleague Featured Poster

Yeah. This is just a simple example how you can assign a value to a field.

<html>
<body>
<form method="post" name="hidden" action="hidden.php">
<input type="text" name="action">
<input type="button" name="button" value="Update" onclick="javascript: document.hidden.action.value='1';">
<input type="button" name="button" value="Delete" onclick="javascript: document.hidden.action.value='2';">
</form>
</body>
</html>
nav33n 472 Purple hazed! Team Colleague Featured Poster

Check example 4 here. http://us.php.net/function.mail . And, $body1 can have the variable values within double quotes. $body1 = "your resume $restitle was posted on $date";

nav33n 472 Purple hazed! Team Colleague Featured Poster

You are welcome :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

Say if the output is of 2 pages. Then how can you output everything in 1 page ? You can specify the width and height of the page, but if the output is more, I dont think you can avoid scroll.

nav33n 472 Purple hazed! Team Colleague Featured Poster

You need to put <a href tag inside php echo statement. OR, use this.

<a href="Details.php?firstname=<?php echo $first; ?>&lastname=<?php echo $last; ?>"><?php echo "$first" . " " . "$last<br>";?></a>
nav33n 472 Purple hazed! Team Colleague Featured Poster

Huh! database inside another database ? Not possible AFAIK.

nav33n 472 Purple hazed! Team Colleague Featured Poster

Welcome to Daniweb! :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

-710

nav33n 472 Purple hazed! Team Colleague Featured Poster

Cure
City
tire

Truncate

nav33n 472 Purple hazed! Team Colleague Featured Poster

Yep.. eclipse with php plugins is good too, but not as good as zend(obviously!). Its a decent IDE with features like code blocks, matching braces, php syntax help, etc. and moreover, its FREE ! :)

nav33n 472 Purple hazed! Team Colleague Featured Poster

if the user changes any values in the checkbox array, I need the db updated with all changes.

You mean, from checked to unchecked and vice versa ? As ShawnCplus has already mentioned, only those checkboxes which are 'set' will be passed on to the next page. Well, if you want to delete certain value when an checkbox is unchecked, then (what I do is), delete all the checkboxes for that particular user, then insert only checked checkboxes. So, it will indirectly delete the unselected checkboxes.

nav33n 472 Purple hazed! Team Colleague Featured Poster

lil complicated script, this one ! :P

nav33n 472 Purple hazed! Team Colleague Featured Poster

I actually wasn't even aware PHP could use that format for while loops

Yeah.. I wasn't aware too.. :)