User Profile

Collapse

Profile Sidebar

Collapse
Yardgnome
Yardgnome
Last Activity: Oct 21 '07, 09:25 AM
Joined: Oct 5 '07
Location: MN
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Yardgnome
    replied to Could someone please critque my code?
    in PHP
    Ternary operator would reduce a lot of your if statements.

    [PHP]
    $inc = isset($_POST['inc']) ? $_POST['inc'] : "error1";
    [/PHP]
    See more | Go to post

    Leave a comment:


  • 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.
    See more | Go to post

    Leave a comment:


  • Yardgnome
    replied to how do we delay a page redirect
    in PHP
    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....
    See more | Go to post

    Leave a comment:


  • Yardgnome
    replied to excell to mysql
    in PHP
    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.
    See more | Go to post
    Last edited by pbmods; Oct 5 '07, 05:24 PM. Reason: Added CODE tags.

    Leave a comment:


  • Yardgnome
    replied to How to create a dynamic drop down box
    in PHP
    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]...
    See more | Go to post

    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....
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...