pzuurveen 90 Posting Whiz in Training

in your testing you missed a part of the query
Add

AND league_id=`[I] a possible value for $league[/I]` AND week_nr < [I] a possible vaule for $weeknr[/I] AND fixture_ignore='no' ORDER BY week_nr
pzuurveen 90 Posting Whiz in Training

please post your code
and error measage if any

pzuurveen 90 Posting Whiz in Training

simply test for it

if (!( $key=='submit')){
 $columns[$key] = "'" . mysql_real_escape_string($value) . "'";
}
pzuurveen 90 Posting Whiz in Training

with a error like this there usaly an error in the myslq query
post that part
problebly look something like

$query="SELECT ....FROM ... WHERE ....";
$result=mysql_query($query);
pzuurveen 90 Posting Whiz in Training

you alsso used a backtick ` in stead of a single quote '

pzuurveen 90 Posting Whiz in Training

You might creat a link like

echo "<a href='http://www.yoursite.com/playsong.php?songid=".$rows['song_id']."'>" .$rows['song_name'].'</a>';

then in playsong.php
query your db again for the url

if (isset($_GET['songid'] )
     {
     $songid=mysql_real_escape_string($_GET['songid']);
     $query="SELECT song_url FROM songs WHERE song_id=$songid";
     ...
pzuurveen 90 Posting Whiz in Training

maybe you should look at this
http://codex.wordpress.org/Roles_and_Capabilities
if you haven't already

pzuurveen 90 Posting Whiz in Training

make another sollution

Please make it quickly.

sorry no time maybe next week

pzuurveen 90 Posting Whiz in Training

My bad, I asumed that you had a form with checkboxes.
If a checkbox is not cheched it will not be in $_POST
There for if(issset()) is good enough.
if you need also check it value you can simpliy use an &&.
You still need to use isset() or you get an notice if it doen't exist

$trim = mysql_real_escape_string(trim($var));

if(isset($_POST['RecipesType1']) && $_POST['RecipesType1']==1 )
$query .= "RecipesType1=1 AND ";

mysql_real_escape_string($_POST) is not necessary because you don't use the value in the query

pzuurveen 90 Posting Whiz in Training

add before RewriteRule

RewriteCond %{REQUEST_FILENAME} !login.php$

or to exclude all php

RewriteCond %{REQUEST_FILENAME} !^(.+)\.php$

found on http://www.datingking.net/ (NOT a dating site)

pzuurveen 90 Posting Whiz in Training

what are trying to do
Hack user profiles from playstation.com?

pzuurveen 90 Posting Whiz in Training

if you look at the code-coloring you see that most of your code is one big echo statment strarting on line 87
if you have such a large part of plain HTML it's better to go outof php
if you than have to echo a variable just put the stament between <?php ?>

print ' has been sucessfully added to the system.<p>';
 ?>
<form id="Gradebook" name="gradebook" method="post" action="gradebook2.php">
....
<input name="cw_mark" type="text" id="cw_mark" value="<?php echo $line['english_cw_mark']; ?>" 
more html here
pzuurveen 90 Posting Whiz in Training

you have comment out all your $_SESSION stuff

pzuurveen 90 Posting Whiz in Training

maybe somethin like this

else
{
for ( $i;$i <30 && $row = mysql_fetch_array($query1); $i++)
   {
   echo "<hr class='dash' /><div><b><a      
   href='profile?user=$row[username]'>$row[username]</a></b> <span  
   style='float:right; margin-right: 5px;'><img src='templates/img/icons/online.gif' /></span></div> <hr class='dash' />";
   }
}
echo "Online total: <b>".$broi."</b>";
pzuurveen 90 Posting Whiz in Training

for debug just add an echo or print statment before the query

pzuurveen 90 Posting Whiz in Training

I find that on mobile device you have to be very carefull not to put to much info on a page. There just isn't enough room to display more. This requeres a different aprouch to the html and other functonalty -> different .js
Makes more sence to me to put the php that doesn't change in to a sepearte file and include it

pzuurveen 90 Posting Whiz in Training

You should put usertype into your db.
Have your users login with just an email and a password
Then do a query on youre db to check email&password and get the usertype

pzuurveen 90 Posting Whiz in Training

think you should use the <button > not the <inpute type='image'>

see http://webdesign.about.com/od/htmltags/p/input-image-tag.htm

pzuurveen 90 Posting Whiz in Training

show us the code you have so fare

pzuurveen 90 Posting Whiz in Training

something like this?

//$mobile=$_GET['mobile'];

// user want normal site
if(isset($_GET['mobile']) AND $_GET['mobile']==="no"){
 		$_SESSION['mobile']="no"; 
		}
// we saved know: normalsite	
if(isset($_SESSION['mobile']) AND $_SESSION['mobile']==="no"){
 		 complete();
		}		
// we saved know: mobilesite
if(isset($_SESSION['mobile']) AND $_SESSION['mobile']==="yes"){
 		 gotoMobile();
		}	
// we  don't know so		
checkMobile();
	

function checkMobile(){
		// MOBILE CODE TAKEN OUT TO SAVE SPACE
		// this is a havy fuction so lets save the result to speed things up nex time
        if (  mobile )
        	{
        	$_SESSION['mobile']="yes";
        	gotoMobile();
        	}
        else {
        	$_SESSION['mobile']="no";
        	 complete();;
        	}
     	}
     	
function gotoMobile(){
		echo "<script>window.location='http://m.MySite.org/';</script>";
	}
function complete(){
		echo "<h1 align='center'>Redirecting...</p>";
	}

@ardav I don't like media queries because all cssfiles are loaded even if they are not used and on a mobile device you don't have bandwith to wast. just my 0.02$

pzuurveen 90 Posting Whiz in Training

where are the use_javascript() and slot() fuctions definded
or the $sf_user object
looks like your missing an include file (or 2)

pzuurveen 90 Posting Whiz in Training

change line 3 to

print_r($_SESSION);

and see...

or you can check and fall back to a defalt

if (isset($_SESSION['product_name'])
        $name=$_SESSION['product_name'];
else $name='Mr X';
pzuurveen 90 Posting Whiz in Training

I gess that 'register' is the name of your submit button, if so:

if (isset($_POST['register']))
{
	$username=$_POST['username'];
	$password=$_POST['password'];
	$password2=$_POST['password2'];
....
}
else
{
?>
<form action="register.php" method="post">
  rest of your form here
<input type="submit" name="register" value="register" />
</form>
<?php
} 
?>
pzuurveen 90 Posting Whiz in Training

oeps!

simplypixie commented: What is that supposed to mean -1
pzuurveen 90 Posting Whiz in Training

Why do you have 2 querys that do the same thing?

pzuurveen 90 Posting Whiz in Training

You have to edit displayprofile.php

the userid will be in:

$_GET['userid']

since you don't use the onclick anymore, remove it

while($db_field=mysql_fetch_assoc($result))
    {
    ?><a href="displayprofile.php?userid=<? print $db_field['fuserid'] ?>" >
    <?php print $db_field['fuserid']."<br><br>";?></a>
pzuurveen 90 Posting Whiz in Training

Is't that excely what you want?
Does't it mean that your 'cookies' are not of RecipesType2 and therefore should be not returned as result if you check RecipesType2?
Else you neat to explane the var-type and posible values of RecipesType2 in your DB

pzuurveen 90 Posting Whiz in Training

you got an error in your query
that's why mysql_query retuns FALSE and not a MySQL result resource.

$sql = "
SELECT *
FROM pqdb_articles, pqdb_categories
WHERE article_id = " . mysql_real_escape_string($article_id) . "
$query_ext
AND category_id = article_cat
";

what is $query_ext ?

pzuurveen 90 Posting Whiz in Training

your code works only if the recipes can be of only one type

remove line 7 to 24

$var = @$_POST['search'] ;
$trim = trim($var);
$query = "SELECT * FROM recipes WHERE";
if(isset($_POST['RecipesType1']))
     $query .= "RecipesType1=1 AND ";
if(isset($_POST['RecipesType2']))
     $query .= "RecipesType2=1 AND ";
// ....
$query .= "RecipesName LIKE \"%$trim%\" order by RecipesId ";
pzuurveen 90 Posting Whiz in Training

on 2e thought:
it better to not use javascript for this at all
let displayprofile.php do the session stuf
you nead to pass the userid to displayprofile.php

while($db_field=mysql_fetch_assoc($result))
{
?><a href="displayprofile.php?userid=<? print $db_field['fuserid'] ?>" onclick="validate()"><?php print $db_field['fuserid']."<br><br>";?></a>
pzuurveen 90 Posting Whiz in Training

everthing between <?php and ?> is executed by the webserver.
the result is sent to the brouwer.
It is the brouwser that executes the javascript function
the php variable $_SESSION is meaningless there.

what you nead is AJAX or JQUERY

pzuurveen 90 Posting Whiz in Training

post what your code you have sofar and we go from there

pzuurveen 90 Posting Whiz in Training

you have several problems with your code
1 in HTML: <head> goos before <body>

2 the <head> tag does not have a script atrbute

<head>
<script type="javascript/text">

3 don't close the javascipt tag to insert php

var id1=document.getElementById(<?php print $id ?>);

4 ... well fix 1b to 3 first

pzuurveen 90 Posting Whiz in Training

That's because $delete doesn't exist.
but you got bigger problems:
you cant just use <input > , it must be inside a <form >
http://www.w3schools.com/tags/tag_form.asp
to link back to you script

<form action="<?php echo($_SERVER['PHP_SELF']); ?>" method="get">

your form values will be in $_GET
change your if to

if ($_GET['delete']) {
pzuurveen 90 Posting Whiz in Training

you have your <input > inside a link
this can be a problem
see:
http://www.quirksmode.org/js/events_order.html
also if this.form.submit() fails you still go to the next page but without the form being send

so remove the link.

pzuurveen 90 Posting Whiz in Training

do something like

$NameArray=$_POST['name'];
foreach($NameArray as $Employee_Name)
   {
pzuurveen 90 Posting Whiz in Training

You had an exstra ) on line 3

long live 'TAB'

<?php
 $res = mysql_query("SELECT * FROM users WHERE username = '$user' LIMIT 1");
if(mysql_num_rows($res)>0)
	{
	$d = mysql_fetch_array($res);	
	if($pass == $d['password'])
		{
		session_regenerate_id(); //security for changing permissions
		$_SESSION['user_id'] = $d['user_id'];
		$_SESSION['usertype_id'] = $d['usertype_id'];
		switch($d['usertype_id'])
			{
			case 1:
				$loc = "nurse.php";
				break;
			case 2:
				$loc = "paramedic.php";
				break;
			case 3:
				$loc = "doctor.php";
				break;
			case 4:
				$loc = "medprac.php";
				break;
			case 5:
				$loc = "wardboss.php";
				break;
			case 6:
				$loc = "consultant.php";
				break;
			}
		header("Location: $loc");
		}
	}
?>
pzuurveen 90 Posting Whiz in Training

Tested your main with cereals createtable.php
works fine for me

what do you get if you execute createtable.php directly?

pzuurveen 90 Posting Whiz in Training

Gess nthat you get a 'header already send' error

That because headers have to be sende before any output and that includes javascript

if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
else header('Location: http://www.example.com/index.php');

Put the alert in the index.php (or use something better then an alert box)

pzuurveen 90 Posting Whiz in Training
$('#response').load('createtable.php');

this go's wrong if creatatble.php contains things like <html>, <title>, or <head>
for creatatble.php use cereals code and noting else.

pzuurveen 90 Posting Whiz in Training

you will not get back a $_POST
you can see thi if you do a var_dump($ _POST);

so

if(!isset($_POST['form1'])){
dropdown_empty();

will not work.
use

if (is_set($_POST['select']) $month = $_POST['select'];
else dropdown_empty();

even better

if (is_set($_POST['select'] && !empty($_POST['select'])) $month = $_POST['select'];
else dropdown_empty();

as it also checks if it has a value

pzuurveen 90 Posting Whiz in Training

make effery month 31 day's and than use
checkdate on it

pzuurveen 90 Posting Whiz in Training

You can do some thing like that in mysql

SELECT count(), date(rowname,'unixepoch') as datum FROM tablename WHERE 1 GROUP BY datum
pzuurveen 90 Posting Whiz in Training

try

var_dump($_POST);

if they don't show up you got a problem with your form page

pzuurveen 90 Posting Whiz in Training

take the declaration of the table outside of the while loop and use javascript to add new rows:

see http://www.mredkj.com/tutorials/tableaddrow.html

pzuurveen 90 Posting Whiz in Training

you are still not using backticks as ardav told you to
` is diverend than '
` is on the same key as the ~ ( atleast on my keyboard)

or you can copy and past ardav code

pzuurveen 90 Posting Whiz in Training

is this what you mean?

<script type="text/javascript">
showmore()
   {
   document.getElementById('more').style.display="";
   }
</script>

<div id="standard">
 dropdownlist
 texbox etc
<button name='more' onclick="showmore()"/>
</div>
<div id="more" style="display:none">
  more stuff here
</div>
pzuurveen 90 Posting Whiz in Training

trie

<div class="button_outside" id="share" onclick="javascript: document.forms["myform"].submit();">
    <div class="button_inside">Share</div>
</div>
pzuurveen 90 Posting Whiz in Training

checked is simular as disabled
so use

<td>
<input name="power" type="checkbox" disabled="disabled"
<?php if($row['power_backup']=='on') echo 'checked="checked"'; ?> />
</td>
pzuurveen 90 Posting Whiz in Training

you can have 1 form with multiple submit buttons