echo your query
think gona look like
.... AND POPU_AREA_SCH>=11 && <=13 ORDER BY UNITID
this is not valid sql
echo your query
think gona look like
.... AND POPU_AREA_SCH>=11 && <=13 ORDER BY UNITID
this is not valid sql
is the colum called $league_id or maybe league_id ?
what is the problem?
ok at
a possible value for $league
put in a value that the php varible $league might have
do the same for
a possible vaule for $weeknr
but with the php variable $weeknr
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
simply test for it
if (!( $key=='submit')){
$columns[$key] = "'" . mysql_real_escape_string($value) . "'";
}
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);
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
think you should use the <button > not the <inpute type='image'>
see http://webdesign.about.com/od/htmltags/p/input-image-tag.htm
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';
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
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 ?
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 ";
post what your code you have sofar and we go from there
do something like
$NameArray=$_POST['name'];
foreach($NameArray as $Employee_Name)
{
Tested your main with cereals createtable.php
works fine for me
what do you get if you execute createtable.php directly?
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)
$('#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.
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
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
trie
<div class="button_outside" id="share" onclick="javascript: document.forms["myform"].submit();">
<div class="button_inside">Share</div>
</div>
htmlentities does this for you
use
$r['harga']
and
$r['deskripsi']
the correct way is
$_SESSION['username']
take your declaration of function number_of_days
outside your while loop
best is top of the script
Or if you gone use that var more: do
$edit_mileage= $_GET['edit_mileage']
That is not advissed.
In PHP 5.3.0 that has been DEPRECATED e.a it doesn't work anymore
If i understand corectly:
You have something like a form (no listing) that sends data to a page (listing 1)
that sends the data to /i-cmsys/editableinvoice/index.php (listing 2)
if so:
Data send in th url is GET data
use
echo $_GET['edit_mileage'];
at line 6
Row['path']
still doesn't exist
you create it at line 11
#while ($row = mysql_fetch_array($result, MYSQL_ASSOC)){
when php has an error like that u often get a blank screen
to show errors: start your script with
error_reporting(E_ALL);
In your first script
where is the array
$row['path'];
(line 6)
come from?
You use
mysql_free_result($result)
as part of your loop
so the second time in the while loop $result is empty
from your err msg
file name= /www/parctice/test/htdocs/Misa Campo073.jpg
linux will read this as call to /www/parctice/test/htdocs/Misa
passing a parameter Campo073.jpg
I 'm always suspicious about filenames with spaces
$fileName=str_replace(" ","_",$fileName);
are your comment text?
The u can't store them in a longint. Just use TEXT as ur column type
If there are numerical i don't see the problem with new lines
The width is part of the image tag
echo "<td><img width = '75' src='http://". $row['url'] . "' /></td>";
You have an error in your select statmend on line 5
echo "DB_Backup <select name='DB_Backup'>";
If you check the value befor youre query, and ,if empty, just not include in your insert, mysql shout use the default NULL
all i can think of is to set the dafault to NULL
what's not the same as zero (=numerical value where NULL means doesn't exist)
this might shed some light
/**
* Define MyClass
*/
class MyClass
{
public $public = 'Public';
protected $protected = 'Protected';
private $private = 'Private';
function printHello()
{
echo $this->public;
echo $this->protected;
echo $this->private;
}
}
$obj = new MyClass();
echo $obj->public; // Works
echo $obj->protected; // Fatal Error
echo $obj->private; // Fatal Error
$obj->printHello(); // Shows Public, Protected and Private
(copyed it form php.net)
an input image returns an x an y coordinate from wher you pressed on the image
http://htmlhelp.com/reference/html40/forms/input.html
You get a $_POST and a $_POST back
You missed the closing ' on your $_POST
<?php if (isset($_POST['submit'])){echo "clicked";}
You can mak this->title an array
class Entry
{
private $title = array();
change the constuctor:
$result=mysql_query($query);
while($row=mysql_fetch_array($result))
{
$this->title[]=$row['TITLE'];
}
you have to pass along the session id for it to work
see:
http://nl.php.net/manual/en/session.idpassing.php
What do you have as your form action?
if you call the same scrip the form rest it self.
The seleced value is in your $_POST
do
<?
var_dump($_POST);
?>
You used " in a string . This is't
nessarray. Just remove them
echo "<center><br><br><a href=http://novatrader.net/index.php?option=com_puarcade&Itemid=51><< Choose Another Game</a></center>";