Jump to content

flemingmike

Members
  • Posts

    472
  • Joined

  • Last visited

Everything posted by flemingmike

  1. hi, is there a way that i can insert into a mysql text box even if there is unsupported characters in the field. for instance, if i want to insert: When I arrived onsite, the cable for usb to ps/2 wasn't with the pc anymore. I need to get a usb to ps/2 cable, as well as a dvi to vga adapter. I will return tomorrow to finish. and i want to keep the invalid characters like the /, and i also want to keep it on 3 seperate lines. can this be done?
  2. hi, i am showing an error when i submit a form and a checkbox is not checked. here is the line that is giving me the error. any fix for this? Error Notice: Undefined index: billable in E:\Website\portal\mobile\editreport.php on line 14 Code if($_POST['billable'] == "ON") { $pbillable = "1"; } else { $pbillable = "2"; } Even though i am getting an error, it still updates my database with a number 2.
  3. so if im echoing: echo "<a href='viewlog.php?id=".$id."' title='$description'><font color='#F70F02' size='3'>".$clientname."".$statusout."</font><font size='3' color='#ffffff'><br />".$starttime1." - ".$esttime1."</a><br />"; $description is what could have " or ' coming from mysql as well as possible other symbols.
  4. i tried the title way. the very first description started with i've. the ' isnt compatible with title. is there a way around this?
  5. i tried that. maybe im doing this a harder way that needed. what i have is a calendar that displays what i have to do. i want to be able to put my mouse over and have it show me a description in a small box.
  6. hello. im trying to get the following to work. any ideas for me? Text[12]=["Job Description","$description it "] it is in a .js file.
  7. no, sorry. im pulling from one table. im hoping that the results will be displayed in 3 columns, and as many rows as needed.
  8. hello, normally when i query mysql, it returns my results line by line. im trying to make a print view now that will put 3 results in a row before going to the next row. any help appreciated.
  9. hello, what am i doing wrong? $starttime=$row['starttime']; $esttime1=date( 'g:i a', strtotime(-2 hours, $starttime) );
  10. is there a way i can write if $status doesnt return a proper value, do something?
  11. thats what i initially thought, but no luck. if i have 2 tools in table tools, and the first one also has a toolid in table toolout with lets just say a status=2, the second one is also going to be displayed as a status=2 even though there is no record with the second toolid in toolout yet.
  12. hello all, i have a quick question. i have a select all from toolout with toolid = $tid. the problem is, if there isnt an entry yet in toolout, it is giving me the info from the row above. is there any way that i can do a (if it doesnt exist, set $status to 1, rather than using the previous rows code) my code is below. if(isset($_POST['search'])) { $tool=$_POST['tool']; echo "<table border='1' style='border-collapse: collapse' bordercolorlight='#000000' bordercolordark='#000000' width='98%' align='center'>"; echo "<tr><td width='100%' colspan='5' align='center'><b>Tool List - $tool</b></td></tr>"; echo "<tr> <th align='center'>Tool</th> <th>Location</th> <th>Status</th> </tr>"; $result = mysql_query("SELECT * FROM tools WHERE toolgroup LIKE '%$tool%' ORDER BY tool"); while($row = mysql_fetch_array($result)) { $id=$row['id']; $tool=$row['tool']; $barcode=$row['barcode']; $location=$row['location']; $result2 = mysql_query("SELECT * FROM toolout WHERE toolid = '$id' ORDER BY id ASC"); while($row2 = mysql_fetch_array($result2)) { $status=$row2['status']; $who=$row2['who']; $datechanged=$row2['datechanged']; $datechanged1 = date( 'M j, Y', strtotime($datechanged) ); if("$status" == "1") { $statusout="<font color='#0000FF' size='4'>IN</font><br /><a href='toolout.php?tool=" . $id . "' target='action'>SIGN OUT</a>"; } if("$status" == "2") { $statusout="<font color='#FF0000' size='4'>OUT</font><br />$who - $datechanged1"; } if("$status" == "3") { $statusout="<font color='#00FF00' size='4'>PENDING OUT</font><br />$who - $datechanged1"; } if("$status" == "4") { $statusout="<font color='#00FF00' size='4'>PENDING IN</font><br />$who - $datechanged1"; } } echo "<tr>"; echo "<td align='center'>" . $tool . "</td>"; echo "<td align='center'>" . $location . "</td>"; echo "<td align='center'>"; if (isset($status)) { echo "$statusout"; } else { echo "<font color='#0000FF' size='4'>IN</font><br /><a href='toolout.php?tool=" . $id . "' target='action'>SIGN OUT</a>"; } echo "</td>"; echo "</tr>"; } echo "</table>"; } Thank you so much.
  13. hello i have a label printer that i am trying to print to. it prints, but because of ie7 margins, it isnt printing properly. if i go in and manually change the margins, it will print propper. i cannot save the margins small enough though, any thoughts? thanks
  14. hello all, i know that php is server side. if i have a printer attached to the server, can i have users press a button and have it print there?
  15. ive tried problbly 50 of those, they are way more complex than i need. and most of them have multiple tables in their database that hold info for each record. i already have my own table. all i want my calendar to show was the sales amount for that day.
  16. hello, is there a simple way to have a full size calendar that shows current month and on each day, it will look into my mysql table and if i have an entry on that day, show the sales field. i have spent days googling, and trying my own and i just cant get anything. if i had a calendar script, i could do the rest, but i cant seem to find it, or make it.
  17. stupid thing.. it was because my field name was group
  18. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in E:\Website\comco\searchtool.php on line 16 if i take away the ORDER BY group, no error on 16
  19. hello, anybody able to take a quick look and see why i have an error on both line 16 and 52? <?php include 'config.php'; include 'style.php'; include 'auth5.php'; $randeid=rand(121047, 997893); if(isset($_GET["delete"])) { $did=$_GET["delete"]; $query11= mysql_query("delete FROM tools where id =$did")or die(mysql_error()); } $groups = mysql_query("SELECT * FROM tools ORDER BY group"); $groups1=""; while($row1 = mysql_fetch_array($groups)) { $groupnames=$row1['group']; $groups1.="<OPTION VALUE=\"$groupnames\">".$groupnames.'</option>'; } ?> <form method="POST"> <p align="center">Search For: <select size="1" name="tool"><?php echo "$groups1"; ?></select> <input type="submit" value="Search" name="search"></p> </form> <?php if(isset($_POST['search'])) { $tool=$_POST['tool']; echo "<table border='1' style='border-collapse: collapse' bordercolorlight='#000000' bordercolordark='#000000' width='98%' align='center'>"; echo "<tr><td width='100%' colspan='4' align='center'><b>Tool List</b></td></tr>"; echo "<tr> <th align='center'>Tool</th> <th align='center'>Barcode</th> <th></th> <th></th> </tr>"; $result = mysql_query("SELECT * FROM tools WHERE group LIKE '%$tool%' ORDER BY tool"); while($row = mysql_fetch_array($result)) { $id=$row['id']; $tool=$row['tool']; $barcode=$row['barcode']; $location=$row['location']; echo "<tr>"; echo "<td align='center'>" . $tool . "</td>"; echo "<td align='center'><img src='barcode.php?format=jpeg&quality=100&width=150&height=75&barcode=" . $barcode . "'></td>"; echo "<td align='center'>Print</td>"; echo "<td align='center'><a href='searchtool.php?delete=" . $id . "'>Delete</a></td>"; echo "</tr>"; } echo "</table>"; } include 'close.php'; ?>
  20. hello all, i have a small problem. i have a bunch of prices in a database like 243.49 and 1,256.22 etc. the problem is that when i try to add multiple prices that one of the fields is over 1000, it is treating it as 1 (i believe because of the comma.) is there a way to remove the comma, but not the decimal if it exists and then add it back to the $total if it is over 1000? $pamount=$row2['amount']; $total += $pamount;
  21. hello all, i currently have a daily log book that the employees fill out. the logs are displayed in a list format. would there be an easy way to have an actual calendar look and have any logs for the day have the title display? i can probably take care of the output on each day, just dont know how to have a calendar display. thanks
  22. hello, is there a way to have it so that when somebody enters information into a textbox in a form, it will keep the formatting (if they have 5 lines, it will show as 5, not 1) $name = $_POST['name']; $resume = $_POST['resume']; $to = "mike@web.com"; $subject = "Resume From Website"; $message = "Name: $name <br /> Resume: $resume "; $from = "resume@web.com"; $headers = "From: $from \r\n Content-Type: text/html; charset=ISO_8859-1\r\n Content-Transfer_Encoding: 7bit\r\n\r\n"; mail($to,$subject,$message,$headers);
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.