Ternary operator would reduce a lot of your if statements.
[PHP]
$inc = isset($_POST['inc']) ? $_POST['inc'] : "error1";
[/PHP]
User Profile
Collapse
-
In your code you are using isset['frwrd'] to check if the image button was clicked. When you are using that type of button, the post value, at least in Firefox, is not called frwrd. There are two post values frwrd_x and frwrd_y which indicate the location on the image where the user clicked. You could change your input type to a submit button and style it's appearance if you'd like to avoid rewriting some of your PHP code.Leave a comment:
-
What you are trying to do cannot be acomplished with server side code.
What you need to do is use Javascript to create a time-delayed page redirect.
Look into the setTimeout Javascript function. It should help you do what I think you are trying to accomplish.
Atli's solution would also work....Leave a comment:
-
You can also use ODBC to read an Excel file and also to create a new Excel file.
You can open the Excel file similar to how you would open a MySQL connection.
[code=php]
odbc_connect("D river={Microsof t Excel Driver(*.xls)}; Dbq=C:\filename .xls;");
[/code]
From there you would use the ODBC database commands to read or write to the Excel file.Leave a comment:
-
Try this:
[PHP]<?
while ($row=hesk_dbFe tchAssoc($resul t))
{
$sel = $row['isDefault'] == true ? "selected='sele cted'" : "";
?>
<option <?=$sel?> value="<?=$row['name']?>"><?=$row['name']?></option>
<?
}
?>[/PHP]...Leave a comment:
-
Your script is probably being run before the page had loaded your calendar.
You could put your script at the very end of your page so that your calendar
will have been loaded by the time the script is executed....Leave a comment:
No activity results to display
Show More
Leave a comment: