pzuurveen 90 Posting Whiz in Training

move this part to the <header> section of the calling page

  <link href="css/vertical_menu_basic.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script type='text/javascript' src='js/jquery.hoverIntent.minified.js'></script>
    <script type='text/javascript' src='js/jquery.dcverticalmegamenu.1.1.js'></script>
    <script type="text/javascript">
    $(document).ready(function($){
    $('#mega-1').dcVerticalMegaMenu({
    rowItems: '3',
    speed: 'fast',
    effect: 'slide',
    direction: 'right'
    });
    });
    </script>

remove everything outside the <body> tag including the tag it self

pzuurveen 90 Posting Whiz in Training

but I don't think you read it correctly.

Than explain your problem better

pzuurveen 90 Posting Whiz in Training

your sitebar.html is a complete html including <htm><head> and <body> tags
If you include this like so it will be part of an other html page that has its onw <htm><head> and <body> tags
That messes thinks up.
Change your sidebar.html so that it is only the div containg the actual sidebar,
include the jquery links on the calling page

pzuurveen 90 Posting Whiz in Training

You have to change the value of your checkboxes using javascript
You can use window.opener

pzuurveen 90 Posting Whiz in Training

Put a var_dump($rows) in your while loop , see what it says

pzuurveen 90 Posting Whiz in Training

contact your server provider
You server is configured to save cookys to /var/chroot/home/content/96/9375396/tmp/
But that diretory appears not to exist

pzuurveen 90 Posting Whiz in Training

I don't think // is a valid mysql comment as you use at line 70:

web_customised_partners_case_study ON web_customised_partners.web_customised_partners_id = web_customised_partners_case_study_id // fix this join
pzuurveen 90 Posting Whiz in Training

check the value of
$request->getPost('remember')

pzuurveen 90 Posting Whiz in Training
pzuurveen 90 Posting Whiz in Training

<select onChange="openOffersDialog(this.value);

This calls a javascript function not php

pzuurveen 90 Posting Whiz in Training

I don't see the transformation between the two.
What are you trying to do?

Atleast show us the code you have sofar

pzuurveen 90 Posting Whiz in Training

I think you look for a custum Post type for use in a plugin

pzuurveen 90 Posting Whiz in Training

The way you have it now:
$answers = $_POST['selected_answers0'] answer to question 0
$answers = $_POST['selected_answers1'] answer to question 1
$answers = $_POST['selected_answers2'] answer to question 2

if you change line 65 to

    echo "<input type=\"radio\" name=\"selected_answers[{$questionNr}]\" value='\"' />";

the result will be in $answers = $_POST['selected_answers']
this is an array, the index will be the number of the question and you can do a foreach-loop

pzuurveen 90 Posting Whiz in Training

i think there is an error in the mysql query: there is no WHERE part.

what is te respone if change line 17 to:

$result = mysqli_query($con,"SELECT add_delete_record.content, handover.shipment_type FROM add_delete_record, handover ") or die(mysqli_error($con));
pzuurveen 90 Posting Whiz in Training
  1. You do notting with the return value

        function bookmark() {
        var pageNum = 2;
        var xmlhttp;
        if (window.XMLHttpRequest)
        {
        xmlhttp = new XMLHttpRequest();
        }else{
        alert("Not assigned!");
        }
        xmlhttp.onreadystatechange=function()
            {
            if (xmlhttp.readyState==4 && xmlhttp.status==200)
                {
                document.getElementById("myDiv").innerHTML="we got back: "+xmlhttp.responseText;
                }
            };
        var url="Bookmark.php?pageNum="+pageNum;    
        xmlhttp.open("GET",url , true);
        xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 
        xmlhttp.send();
        alert("Bookmark send!");
        }
    
    <form>
        <input type="button" value="Bookmark" onclick="bookmark();">
     </form>
    <div id="myDiv"></div>
    
  2. your php should be

    $pageNum = $_GET['pageNum'];
    echo "Page numbers: $pageNum";
    

3 change input type from submit to button

pzuurveen 90 Posting Whiz in Training

If you don't have a variable like $v['id'] or $v['idnr'] you cal alway count the questions yourself

$questionNr=0;    
foreach($qas as $k=>$v)
    {
    echo "<input id='question$questionNr' style='width:40%' type='text' 
                value='".$v['question']."' name='questions[]' >";
    echo '<br /><br />';
    foreach($v['answers'] as $answer)
        {
        echo "<input type=\"radio\" name=\"selected_answers$questionNr\" value='\".$answer.\"' />";
        echo "$answer";
        echo "<br/>";
        }
    $questionNr++;
    }
pzuurveen 90 Posting Whiz in Training

You should change the name of radiobutten for each questing
something like:

echo "<input type=\"radio\" name=\"selected_answers".$v['idnr']."\" value='\".$answer.\"' />";

$v['question'] probably has spaces, so don't use that.
do something simular for the id of the input statement, id supposed to be unique. (line 3)

pzuurveen 90 Posting Whiz in Training
pzuurveen 90 Posting Whiz in Training

Do you main like this ?

pzuurveen 90 Posting Whiz in Training

to check for mysql errors:
mysql_query("the query to test")OR die(mysql_error());

pzuurveen 90 Posting Whiz in Training

If I'm understand you correctly , you want to do this:
<input type="hidden" name="formnr" value="<?php echo $f; ?>">

This will not be visible on the form but after you submit, the value of $f will be availeble as
$_POST['formnr']

pzuurveen 90 Posting Whiz in Training

there can be no output to the browser be for the header().
So remove echo statments at line 24 and 38
also move the comment at line 1 inside the <?php tag

pzuurveen 90 Posting Whiz in Training

a subdomain usealy has the same ip as the main domain, which you know, it your server ip: $_SERVER['SERVER_ADDR']
or don't i understand what you want?

pzuurveen 90 Posting Whiz in Training

checkout imagecopyresampled , look at example 1.
Do you want to add the images to to the database?
It's often better (faster) to save the image to a special dir and just store the filname in the database.

pzuurveen 90 Posting Whiz in Training

what'happenig:

login.php
login --> userlogin.php
logout --> userlog-out.php
back --> userlogin.php and because you don't check just display the page

what you need to do is send a cook variable to the nexpage:

if(mysql_num_rows($result)>0)
   {
   $_COOKIE['isValidUser']=True; 
   header('location:userlogin.php');
   }
else
    echo "invalid username and password";

in userlogin.php
check on this variable

this is not secure for a passwoord system because users can just edit these cookies and get access even if they are not a member of youre site

pzuurveen 90 Posting Whiz in Training

you don't check if the user is actual loged-in in userlogin.php
I would use $_SESSION insted of cookie

pzuurveen 90 Posting Whiz in Training

The $body must contain a "webpage" displaying the image, complete with <html> and <body> tags.
for the image use a remote link: www.yourserver.com/css/mail-top-img.gif

pzuurveen 90 Posting Whiz in Training
pzuurveen 90 Posting Whiz in Training

check the disc-space on your server?

pzuurveen 90 Posting Whiz in Training

here is some code i used in one of my prodjects
it also conferts to .jpg
and does some errorchecking
you have to modify it to fit your code your self (and some better errormesages)
but i think it will get you going

// checking foto errors 
if ((!isset($_FILES['foto'])) || ($_FILES['foto']['error']==4)) 
    {
    $ErrorMessage='<p class="error">foto not found ';
    $FotoError=true;
    }  
elseif (($_FILES['foto']['error']==1) || ($_FILES['foto']['error']==2)) 
    {
    $ErrorMessage='<p class="error">foto to big</p>Max 3Mb';
    $FotoError=true;
    }
elseif ($_FILES['foto']['error']==3) 
    {
    $ErrorMessage='<p class="error">loading error </p>';
    $FotoError=true;
    }
elseif ($_FILES['foto']['error']>=6) 
    {
    $ErrorMessage='<p class="error">couldnot save (error: '.$_FILES['foto']['error'].')</p>';
    $FotoError=true;
    }
// checking foto type
elseif ($_FILES['foto']['type']!='image/gif' && $_FILES['foto']['type']!='image/jpeg' &&$_FILES['foto']['type']!='image/pjpeg' && $_FILES['foto']['type']!='image/png')
   {
   $ErrorMessage='<p class="error">Deze foto is geen jpg, gif of png</p>';
   $FotoError=true;
   }
else 
   {
   $Fototemp=$_FILES['foto']['tmp_name'];
   //  create image object
   switch(exif_imagetype($Fototemp))
	{
	case IMAGETYPE_GIF:
	    $Imageobj = @imagecreatefromgif($Fototemp);
	    If (!$Imageobj)
        	{
		$ErrorMessage='<p class="error">not a good gif</p>';
		$FotoError=true;
		}
	   break;
	case IMAGETYPE_JPEG:
	   $Imageobj = @imagecreatefromjpeg($Fototemp);
	   If (!$Imageobj)
	        {
		$ErrorMessage='<p class="error">not a good jpg</p>';
		$FotoError=true;
		}
	   break;
	case IMAGETYPE_PNG:
	   $Imageobj = @imagecreatefrompng($Fototemp);
	   If (!$Imageobj)
	        {
		$ErrorMessage='<p class="error"> not a  good  png</p>';
		$FotoError=true;
		}
	   break;
	default:
	   $ErrorMessage='<p class="error">this  fototype is not recognied</p>';
	   $FotoError=true;
	}
    if(!$FotoError)
	{
        // creacting new file name
	$Fotobase=basename($Fototemp);
	$Fotofile=substr($Fotobase,strpos($Fotobase,'.')).'.jpg';
	//redusing foto size
        $Imagewidth = imagesx($Imageobj);
	$Imageheight = imagesy($Imageobj);
	$Maxsize=200;
        if ($Imagewidth>$Imageheight)
            {
            $Height=($Imageheight * $Maxsize) / $Imagewidth;
	    $Width=  $Maxsize;
    	    }
        else
            {
            $Height=  $Maxsize;
            $Width=($Maxsize * $Imagewidth) / $Imageheight;
	    }
    	$Width = round($Width);
	$Height = round($Height);
  	$Smallobj = imagecreatetruecolor($Width, $Height);
	imagecopyresampled($Smallobj, $Imageobj, 0, 0, 0, 0, $Width, $Height, $Imagewidth, $Imageheight);
	imagejpeg($Smallobj, ($DirImagetemp.$Fotofile));
        imagedestroy($Smallobj);

foto now saved …

pzuurveen 90 Posting Whiz in Training

looks fine to me
did some researce
apparently stripslashes() is not binary-save
but you can do without.
still use addslashes()
see example

have used myself:

$image = base64_encode(file_get_contents($_FILES['image']['tmp_name']));
// and
$image = base64_decode($image['image_file']);

one other point:
You include database.php twice
recoment you use

include_once('database.php');

in both cases

pzuurveen 90 Posting Whiz in Training

how is the image saved and stored in the db.
can you show that code?

pzuurveen 90 Posting Whiz in Training

Usaly it faster to store just the filename in the db and create a link to the image it self.
But if you have to, try this:

<?php
header("Content-type: image/jpeg");
include("database.php");
//$id = $dMR_no;
$id= mysql_real_escape_string($_GET['id']);
$image = mysql_query("SELECT * FROM tblpatient_image WHERE RelationMR_no='$id'") or die(mysql_error()); // give you some error if it fails
$image = mysql_fetch_assoc($image);
// only use stripslashes if you added them when you saved the image to the db
$image = stripslashes($image['image_file']);
echo $image;
?>
pzuurveen 90 Posting Whiz in Training

define() is used to declare a constant

since you are in a class, use

$this->server="localhost";

you also want your $connection variable like that:

class mysql 
{ 
    var $server; 
    var $conn_username; 
    var $conn_password; 
    var $database_name; 
    var $connection; 
    var $select; 
    var $query; 

    function connect() 
 { 
    require "database.inc.php"; 
     
    $this->connection = mysql_connect($this->server,$this->conn_username,$this->conn_password); 
    $this->select = mysql_select_db($this->database_name,$this->connection); 
} 
    function query($query) 
    { 
        $result = mysql_query($query); 
        if (!$result) { 
            echo 'Could not run query: ' . mysql_error(); 
            exit; 
} 
    } 
    function end() 
    { 
        mysql_free_result($this->connection); 
    } 
}
pzuurveen 90 Posting Whiz in Training

What is stored in $image?
is that the binary-image-data or just a filename?

pzuurveen 90 Posting Whiz in Training

Thx my freind. The folder was not having write permission. I gave read, write, execute permission to all options i.e. Owner Permissions, Group Permissions & Public Permissions

if you set write permisons to public that mean that ANYONE can write files to dir.
You don't want that.

pzuurveen 90 Posting Whiz in Training

check if the directory orig_img/ on your server is writeble by apache

pzuurveen 90 Posting Whiz in Training
pzuurveen 90 Posting Whiz in Training

also for the link to work remove the space between cod= and <?php

<a href="prog_curso.php?cod=<?PHP echo $row['cod_curso']; ?> ">
pzuurveen 90 Posting Whiz in Training

the result of your form will be in $_POST[ ]

if(isset($_POST['one']))
      $val='one;';
else
      $val=NULL;

if(isset($_POST['two']))
      $val.='two;';

if(isset($_POST['tree']))
      $val.='tree;';

you now have a string $val : one;three;
just put it into your database

if(!empty($val)){
   $sql="INSERT INTO `request` (detail) values('$val')";
   mysql_query($sql)or die(mysql_error());
   }
pzuurveen 90 Posting Whiz in Training

You might want to use the $_SERVER variable for that.
it's more flexible incase you need to move it to an other server

pzuurveen 90 Posting Whiz in Training

In your admin/securepage.php you just check for a username in $_SESSION

both your login.php create a $_SESSION

in your admin/login.php create a $_SESSION and check for that in the adminpages.

Better: have one login.php do both checkes
better: combine your user and admin-tables and add an admin-field

pzuurveen 90 Posting Whiz in Training

where do you output this variable?
You just declare it

$error[] = "Preencha o campo 'Username'.";
pzuurveen 90 Posting Whiz in Training

glad to help
You started this thread, so you have to mark it solved

pzuurveen 90 Posting Whiz in Training

he means:When you edit your response press the the

ontop of the editbox

 
[code]

//  result looks like this
pzuurveen 90 Posting Whiz in Training

I sometimes have used 2 config-files

if ($_SERVER['SERVER_ADDR'] == 'ip localhost here')
	{
	// testing
	require_once('testconfig.php'); 
	error_reporting(E_ALL);
	}
else	{
	// productie locatie
	require_once('dbconfig.php'); 
	error_reporting(0);
	}
pzuurveen 90 Posting Whiz in Training

The same $_SESSION is available to every page in the same domein that calls session_start

just set a varible in your seeion to check if a user is allowed in the admin files
something like

session_start();
if (!isset($_SESSION['isAdmin'] || !$_SESSION['isAdmin'])
      header("Location: http://www.mysite.com/user.php");

or did't I understand your question?

pzuurveen 90 Posting Whiz in Training

put your php statments beteen <?php and ?>

<form action="gradebook3.php" method="post">
  <H4>Exam and Coursework Marks and Comments for 
HTML;
<?php
  print $line['firstname']." ".$line['surname']." (#".$line['upn'].") in set ".$line['english_set']; ?>
 </h4>  <table width="100%" border="0" cellpadding="5"><tr><td class="form_labels">
Exam Mark &nbsp; &nbsp; &nbsp; &nbsp;
 <input type='text' name='exam_mark' size='3' 
 value="<?php print $line['english_exam1_mark'];?>"><br><br>
pzuurveen 90 Posting Whiz in Training

You need a query like

SELECT * FROM post_sec_all_stats WHERE 1=1 AND DURA_SCH = '1' AND CTRL_SCH = '1' AND (TOTAL_STS < 2000 [B]OR[/B] TOTAL_STS BETWEEN 2000 AND 20000 [B]OR[/B] TOTAL_STS > 20000) ORDER BY UNITID ASC

change your input names so that it not a array

<input type="checkbox" value="1" name="Small"> Small (fewer that 2000 students)<br />
    <input type="checkbox" value="2" name="Medium"> Medium (2,000 - 20,000 students)<br />
    <input type="checkbox" value="3" name="Large"> Large (more than 20,000 students)<br />

liked your first code better, with some changes

if (isset($_POST['Small'])) {
$sql .= "AND ( ";
$sql .= "TOTAL_STS < 2000";
}
else $sql .= " AND ( FALSE ";
 
if (isset($_POST['Medium'])) {
$sql .= " OR ";
$sql .= "TOTAL_STS BETWEEN 2000 AND 20000";
}
else $sql .= " OR FALSE ";
 
if (isset($_POST['Large'])) {
$sql .= " OR";
$sql .= "TOTAL_STS > 20000 )";
}
else $sql .= " OR FALSE ) ";
pzuurveen 90 Posting Whiz in Training

for your STATE_SCH look at mysql instr

for POPU_AREA_SCH do some thinge like

switch ($popu_area_sch) {
    case 'Urban':
       $query .= "POPU_AREA_SCH>=11 AND POPU_AREA_SCH <=11";
        break;
    case 'Suburban':
        $query .= "POPU_AREA_SCH>=21 AND POPU_AREA_SCH <=23";
        break;
    ...
    ...
    }
$query .="ORDER BY UNITID";

You als have to change the value of your <input>

<input type="checkbox" value="Urban" name="popu_area_sch"> Urban<br />