smproph Posted January 10, 2011 Share Posted January 10, 2011 Links to pages incase you want to seem them there: http://frankahinojosa.com/salawyer/test.php http://frankahinojosa.com/salawyer/searchresults.php I am trying to figure out how come this code will work on this 1st page but it won't work on this page. Here is the code <script type="text/javascript" src="javascript/jquery-1.4.4.js"></script> <script type="text/javascript" src="javascript/table.js"></script> <title>Untitled Document</title> <link rel="stylesheet" href="css/styles_screen.css" type ="text/css" media="screen"> <link rel="stylesheet" href="css/typography.css" type ="text/css" media="screen"> <link rel="stylesheet" href="css/styles_print.css" type ="text/css" media="print"> <link rel="stylesheet" href="css/table.css" type ="text/css" media="print"> </head> <body> <table class="example table-autosort:4 table-stripeclass:alternate"> <thead> <tr> <th class="table-sortable:numeric">Index</th> <th class="table-sortable:numeric">Numeric</th> <th class="table-sortable:default">Text</th> <th class="table-sortable:currency">Currency</th> <th class="table-sortable:date">Date</th> </tr> </thead> <tbody> <tr> <td>0</td> <td>287.5</td> <td>Bill</td> <td>$7.93</td> <td>2013-10-06</td> </tr> <tr> <td>1</td> <td>529.6</td> <td>Joe</td> <td>$94.74</td> <td>2012-07-08</td> </tr> </tbody> </table> </body> But here it won't work <script type="text/javascript" src="javascript/jquery-1.4.4.js"></script> <script type="text/javascript" src="javascript/table.js"></script> <title>Untitled Document</title> <link rel="stylesheet" href="css/styles_screen.css" type ="text/css" media="screen"> <link rel="stylesheet" href="css/typography.css" type ="text/css" media="screen"> <link rel="stylesheet" href="css/styles_print.css" type ="text/css" media="print"> <link rel="stylesheet" href="css/table.css" type ="text/css" media="print"> </head> <body> <div id="wrapper"> <div id="menu"> <ul> <li><a href="index.php">Home</a></li> <li><a href="autoselect/timeslip.php">New Timeslip</a></li> <li><a href="tasks.php">New Task</a></li> <li><a href="newclient.php">New Client</a></li> <li><a href="search.php">Search</a></li> <li><a href="login/logout.php">Logout</a></li> </ul></div> <div id="content"> <FORM><INPUT TYPE="button" VALUE="Refine Search" onClick="history.go(-1);return true;"></FORM> <?php mysql_connect ("*", "*","*") or die (mysql_error()); mysql_select_db ("*"); $qry_str="SELECT * FROM tasks WHERE 1 "; if($_POST['Owner']) { $Owner=$_POST['Owner']; $qry_str.="and Owner='$Owner' "; } if($_POST['Identifier']) { $Identifier=$_POST['Identifier']; $qry_str.="and Identifier LIKE '%$Identifier%' "; } if($_POST['Staff']) { $Staff=$_POST['Staff']; $qry_str.="and Staff='$Staff' "; } if($_POST['Priority']) { $Priority=$_POST['Priority']; $qry_str.="and Priority='$Priority' "; } if($_POST['Status']) { $Status=$_POST['Status']; $qry_str.="and Status LIKE '%$Status%' "; } if($_POST['Description']) { $Description=$_POST['Description']; $qry_str.="and Description LIKE '%$Description%' "; } if($_POST['start1']) { $start1=$_POST['start1']; $start2=$_POST['start2']; $start=date('Y-m-d', strtotime($start1)); $end=date('Y-m-d', strtotime($start2)); $qry_str.="and start >= '$start' and start <= '$end' "; } if($_POST['end1']) { $end1=$_POST['end1']; $end2=$_POST['end2']; $start=date('Y-m-d', strtotime($end1)); $end=date('Y-m-d', strtotime($end2)); $qry_str.="and due >= '$start' and due <= '$end' "; } $result=mysql_query($qry_str); $count=mysql_num_rows($result); if ($count>0){ ?> <form name="del" action="deletetask.php" method="POST"> <table class="table-autostripe"> <thead> <tr><th width="1px"></th> <th style="text-align:left;" width="40px">Edit</th> <th width="35px" class="table-sortable:default" align="left">Ini</th> <th width="40px" class="table-sortable:default" align="left">Staff</th> <th width="200px" class="table-sortable:default" align="left">Identifier</th> <th width="100px" class="table-sortable:date" align="left">Due</th> <th width="35px" class="table-sortable:numeric" align="left">Pri</th> <th width="130px" class="table-sortable:default" align="left">Status</th> <th width="350px" class="table-sortable:default" align="left">Description</th> </tr> </thead> <tbody> <? while ($row = mysql_fetch_array($result)){ $rid=$row['task_id']; $rowner=$row['owner']; $rstaff=$row['staff']; $rident=$row['identifier']; $rdate=$row['due']; $rpriority=$row['priority']; $rstatus=$row['status']; $rdesc=$row['description']; ?> <tr> <td valign="top"></td> <td valign="top"> <a href="edittask.php?edata=<?=$rid?>"><img src="images/pencil.png" height="24px" width="24px"/></a></td> <td valign="top" align="left"><?=$rowner?></td> <td valign="top" align="left"><?=$rstaff?></td> <td valign="top" align="left"><?php echo substr($rident,0,40);?></td> <td valign="top" align="left"> <?php $convdate = date('m/d/Y', strtotime($rdate));?> <?=$convdate?></td> <td valign="top" align="left"><?=$rpriority?></td> <td valign="top" align="left"><?=$rstatus?></td> <td valign="top" align="left"><?php echo substr($rdesc,0,40);?></td> <td align="center"> <input type="checkbox" name="del[]" id="del" value="<?=$row['task_id']?>"></td> </tr> <? } ?> <tr> <td colspan="10" align="center"><input type="submit" name="justdel" value="Delete" id="justdel"></td> </tr> </tbody> </table> </form> <? } else { echo 'No Records Returned'; } ?> </div> <div id="footer"> <div id="footertext">Powered and Designed by pr0phet/b0mber Creations</div> </div> </div> </body> Link to comment https://forums.phpfreaks.com/topic/224019-script-isnt-working/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.