sasa
-
Posts
2,804 -
Joined
-
Last visited
-
Days Won
1
Posts posted by sasa
-
-
can yuo post structure of table 'southport_categories'
-
try[code]<?php
$test='Bla, bla';
echo "1st call testtwo:\n";
testtwo();
echo "\n-------------\n2nd call testtwo:\n";
test();
testtwo();
function test(){
global $test;
$test = "Hello this test is working!";
}
function testtwo(){
global $test;
echo"$test";
}
?>[/code] -
what you wont?
1st page
cat1
-com1
-com2
cat2
-com1
next page
cat2
-com2
cat3
-com1
-com2
or
1st page
cat1
-com1
cat2
-com1
cat3
com1
next page
cat1
-com2
cat2
-com2
cat3
-com2
-
array_slice retur array
try to print_r($storenbr);
you must use[code]
echo "store #: ".$storenbr[0];
[/code] -
-
try[code]
<?php
$navigation_menu['top']['Home']['url'] = "index";
foreach ($navigation_menu['top'] as $name => $link) echo "<a href=\"?page={$link[url]}\">{$name}</a>";
$Page=$_GET['page'];
if (file_exists("include/$Page.php")) include "include/$Page.php";
?>
[/code] -
lock table
insert some data
mysql_inser_id
unlock table
update data -
$lenght_of_key = 8;
$key='EUM';
for ($i=0; $i<$lenght_of_key; $i++) $key .=rand(1,9);
echo $key; -
1st
[code]
$therows[]=array(
"<center>$dwntime_type</center>",
"<center>$dwntime_date</center>",
"<center>$dwntime_times</center>",
"<center>$dwntime_hrs</center>",
"<center>$dwntime_ata</center>",
"<center>$dwntime_reason</center>",
"<center>$dwntime_solution</center>",
"<center>$dwntime_log</center>",
"<center>$dwntime_log_by</center>");
[/code]
2nd
[code]
$x='';
foreach ($therows as $therow){
$x .= "<p>".implode('<br />',$therow)."</p>";
$y .= $excel->writeLine($therows)"; // i don't know what object do
}
echo $x;
[/code] -
[code]WHERE type = 'type1' OR type = 'type2' OR type = 'type3' etc.[/code]
or
[code]WHERE type IN ('type1','type2','type3','type4')[/code] -
"UPDATE `WOR` SET `Invoice`=(SELECT IF(`Invoice`='Yes','No',Yes')) where work_order_num='$ordernum'"
-
try to make new database.php
let be database1.php
[code]
<?php
$conn=mysql_connect('host','user','password'); // change 'host' to your host name etc.
mysql_select_db('database_name',$conn);
?>
[/code]
include database1.php not old database.php
use original, 1st code you made -
i make mistake it musr be class MySQLDB
sorry -
change $conn to $database in register.php or
add $conn = new MySQLD near the start of register.php or
change last line in database.php to $conn = new MySQLD -
try
[code]$total_amount = "SELECT SUM(amount) FROM sales WHERE paid = 'n' GROUP BY aff";[/code] -
try[code]
$this->wordart['angle'] = 5;
rand(-$this->wordart['angle'], $this->wordart['angle']);
[/code] -
the code is ok
you have Warning not error
posible: wordart['angle'] is NULL or 0 -
change line[code]if ( mysql_num_rows($result) < 0 ){ [/code]to[code]if ( mysql_num_rows($result) > 0 ){ [/code]
-
try[code]$list .= "<option value=\"$parentId\"> $name"; [/code][code]$list .= "<option value=\"$key\"> $name"; [/code]
-
try change line [code]if ($parentId = 0) {[/code]to[code]if ($parentId == 0) {[/code]
-
creat table 'levels' in DB with columns: skil, level and exp
to get level use
[code]
SELECT level FROM levels WHERE skil=$user_skil AND exp <= $user_exp ORDER BY level DESC LIMIT 1
[/code] -
OK
function must return more then one array cose use static variable $c
$a is array from whot i look for path and $b is part of path thet is find (start of path)
if $a has no elements the path is finished and i add $b in array $c
else i add next element to $b and do this again
sorry for bad english -
tr[code]<?php
$a=array(
1 => array
(
2 => array
(
3 => array(
"3A" => array(
"3B" => array(
"X" => array()
),
"3C" => array(
"X" => array()
)
)
),
4 => array(
5 => array(
"X" => array()
),
"5A" => array(
6 => array(
"X" => array()
)
)
)
),
)
);
function path($a,$b=array()){
static $c;
if (count($a)==0) $c[]= $b;
foreach ($a as $key => $value){
$b1=$b;
$b1[]=$key;
path($value,$b1);
}
return $c;
}
echo "<pre>";
print_r (path($a));
echo "</pre>";
?>[/code] -
change [code]include ("http://www.evermoreforums.com/wes/contact2.php"); [/code]
to[code]include ("contact2.php"); [/code]
Edit Submission
in PHP Coding Help
Posted
<form .. action="?id=$id&submit='OK'"