divyakrishnan 20 Junior Poster

Refer Click Here
for array sorting .
Use a for loop to iterate the array elements and create hexadecimal color value for display.

divyakrishnan 20 Junior Poster

Checkout the form.php Page.
Line no 20 should be

if(document.frm.userNameTxt.value=='')

Like that you have check for every if condition.It should be like
document.formname.fieldname.value

id attribute for all input fields are missing.
Replace like this.

<input type="text" value="" name ="nameTxt" id="name" />
divyakrishnan 20 Junior Poster

Check out the spelling of kategori and id'.It should be match with table field name.

divyakrishnan 20 Junior Poster

Change is as

}
}</form>
?>
</body></html>

to

}
	}
?>
</form>
</body></html>
divyakrishnan 20 Junior Poster

Where r u calling class functions?Can you post entire code?

divyakrishnan 20 Junior Poster

Do u want to check the register no in member table before inserting it into student table?

divyakrishnan 20 Junior Poster

Hopes this may help you

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script>
function name_dis()
{
var str=document.f.t1.value;
var lett=str.charAt(0);
document.f.t2.value=lett;
 
}
</script>
</head>

<body>
<form id="form1" name="f" method="post" action="">
  <label>
  <input type="text" name="t1" id="t1" onkeyup="name_dis()"/>
  </label>
  <p>
    <label>
    <input type="text" name="t2" id="t2" />
    </label>
  </p>
</form>
</body>
</html>
divyakrishnan 20 Junior Poster

Check Out the condition instead of || you have put |

empty($BusDesc) == TRUE | empty($WelcomeMsg) == TRUE
divyakrishnan 20 Junior Poster

Try this Query

SELECT date( date_time_field )
FROM DATA WHERE DATE( date_time_field) = DATE( NOW( ) )
divyakrishnan 20 Junior Poster

Try this script..

<head>
<script>
function windowCenter(pageURL, title,w,h) {
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
}
</script>
</head>
<body>
<a href="#" onclick="windowCenter('pop_up_window_center.html', 'POPUP',400,400);">OPEN POPUP</a>
</body>
divyakrishnan 20 Junior Poster

Where r u using session variables?in PHP right?

divyakrishnan 20 Junior Poster

Post your errors.
Then it is easy to find out solution.

divyakrishnan 20 Junior Poster

Change your code as,

<?PHP
session_start();
//use mysql query 
$username="xxxx";
if ($username)
{ 
setcookie('mycookie',$username, time()+3600);
}
include 'dbconnect.php';

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome to site</title>
<link href="container.css" rel="stylesheet" type="text/css" />
<link href="format.css" rel="stylesheet" type="text/css" />
<script src="myjs.js" type="text/javascript"></script>
<body>
<?PHP
include 'header.html';

?>
<div class="maincontainer"><h1>Welcome to the site<a href="nextpage.php"> Click here to continue </a></h1></div>
<?PHP
?>
</body>
</html>

setcookie() defines a cookie to be sent along with the rest of the HTTP headers. Cookies must be sent before any output from your script .This requires that you place calls to this function prior to any output, including <html> and <head> tags as well as any whitespace.

divyakrishnan 20 Junior Poster

Print your insert query after line no 19.

echo $sql;

Copy and paste it into phpmyadmin(or the query analyser u r using).
Execute the query and check out the errors.
Also modify

mysql_query($sql) or die ('Something went wrong with submitting your information <br>'.mysql_error);
karthik_ppts commented: useful post +5
divyakrishnan 20 Junior Poster

Please mark your thread as solved.

divyakrishnan 20 Junior Poster

Try this code

<script type="text/javascript">
			if (document.getElementById('other').checked = true) { 
			document.getElementById('whatever').style.visibility = "visible"; 
			} else { 
			document.getElementById('whatever').style.visibility = "hidden"; 
			} 
			
</script> 
<input name="pVital[]" type="checkbox" id="pVital[]" value="I &amp; O" checked="<?php if (in_array('I &amp; O', $pvitals)) echo "checked"; else echo "unchecked"; ?>" />I &amp; O<br/>
   	  <input <?php if (in_array('Daily Weight', $pvitals)) echo "checked"; else echo "unchecked";  ?> name="pVital[]" type="checkbox" id="pVital[]" value="Daily Weight" />Daily Weight<br/>
   	  <input <?php if (in_array('Foley Catheter', $pvitals)) echo "checked"; else echo "unchecked"; ?> name="pVital[]" type="checkbox" id="pVital[]" value="Foley Catheter" />Foley Catheter<br/>
   	  <input <?php if (in_array('other', $pvitals)) echo "checked"; else echo "unchecked"; ?> name="pVital[]" type="checkbox" id="other"  value="other" />Other<br/>
        <input name="pVital[]" type="text" id="whatever"   <?php if (in_array('other', $pvitals)) { ?>  style="visibility: visible;"   <?php } else { ?>    style="visibility:hidden" <?php } ?>  value="<?php if (in_array('other', $pvitals)) echo end($pvitals); ?>">
divyakrishnan 20 Junior Poster
divyakrishnan 20 Junior Poster

What you want ?
Want to pass any variables to redirecting page?

divyakrishnan 20 Junior Poster
divyakrishnan 20 Junior Poster

Use the following lines of code to check ur database connection

$con = mysql_connect('localhost','root','');
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
else
{
 echo "Connected";
}
$sel=mysql_select_db("employdb1");
if (!$sel)
  {
  die('Could not Select: ' . mysql_error());
  }
else
{
 echo "Selected";
}

Run this file first and find out whether it is running properly or not

divyakrishnan 20 Junior Poster

Using PHP I dnt have any idea.

divyakrishnan 20 Junior Poster

Try this code It using Java script

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script>
function check()
{
var len=document.f.ck.length;
var ck=document.f.ck;
var l=0;
for(var i=0;i<len;i++)
{
if(ck[i].checked==true)
{
l++;
}
if(l>3)
{
ck[i].checked = false ;
}
}



}
</script>
</head>

<body>
<form id="form1" name="f" method="post" action="">
  <p>
    <input name="ck" type="checkbox" id="ck" value="checkbox" onclick="check()"/> 
  PHP</p>
  <p>
    <input name="ck" type="checkbox" id="ck" value="checkbox" onclick="check()"/> 
  JSP</p>
  <p>
    <input name="ck" type="checkbox" id="ck" value="checkbox" onclick="check()"/> 
  JAVA</p>
  <p>
    <input name="ck" type="checkbox" id="ck" value="checkbox" onclick="check()"/> 
  CSS</p>
  <p>
    <input name="ck" type="checkbox" id="ck" value="checkbox" onclick="check()" /> 
    HTML</p>
  <p>
    <input type="submit" name="Submit" value="Submit" />
  </p>
</form>
</body>
</html>
divyakrishnan 20 Junior Poster

Try this..

<?php 
$myarray=array(0=>"a,1",1=>"b,2",2=>"a,2");
$a=implode(",",$myarray);

$a=explode(",",$a);
$b=array();
$k=0;
for($i=0;$i<sizeof($a);$i++)
{
if($i%2==0)
{

  $b[$k]=$a[$i];
  $k++;
}
}
$c=array_unique ( $b);
print_r($c);

?>
divyakrishnan 20 Junior Poster

What r u storing on array?post the array values..

divyakrishnan 20 Junior Poster

U just find out whether your MYSQL server is running or not.
Go to control panel,Administrative Tools,then click Services.There u can find out the MYSQL service.You can start or restart it.After that run the project.

divyakrishnan 20 Junior Poster

Also put a closing brace '}' on line no 47

karthik_ppts commented: useful +5
divyakrishnan 20 Junior Poster

The problem is with ur included pages.
It the missing of closing braces on functions or loops.
Checkout the included pages.

divyakrishnan 20 Junior Poster

T think it is the missing of double quotes/single quote.The code u posted have no errors.I executed after commenting the 2 function calls.If u can post entire code