-
Posts
812 -
Joined
-
Last visited
Everything posted by techker
-
so it's just this part?i modified it but still.. <?php $sql = "SELECT * FROM Brand"; $Brand = mysql_query($sql,$conn); while($row = mysql_fetch_array($Brand)) { echo ("<option value=\"$row[brand_id]\" " . ($Brand_N == $row["Brand_id"]? " selected" : "") . ">$row[brand_N]</option>"); } ?> </select> <?php if($Brand_N!= null && is_numeric($Brand_N)) { ?> <select name="Product" onChange="autoSubmit();"> <option value="Product">Product</option> <?php $sql = "SELECT * FROM products WHERE Brand_id = $Brand_N "; $Products = mysql_query($sql,$conn); while($row = mysql_fetch_array($Products)) { echo ("<option value=\"$row[Product_id]\" " . ($Product_N == $row["Product_N"]? " selected" : "") . ">$row[Products_N]</option>"); } ?>
-
hey guys i can't seem to get my second list box to work? the first one is good it shows the brands but the second one does not show at all? i have 2 DB Brands and others products so in brands i have id and name .. second i have product_id-product_Nand Brand this is my query(select the brand then it list the products that are associated with the brand) <?php $Brand_N = $Product_N = null; //declare vars $conn = mysql_connect("localhost", "2", "2"); $db = mysql_select_db('2',$conn); if(isset($_POST["Brand_N"]) && is_numeric($_POST["Brand_N"])) { $Brand_N = $_POST["Brand_N"]; } if(isset($_POST["Product_N"]) && is_numeric($_POST["Product_N"])) { $Product_N = $_POST["Product_N"]; } ?> <script language="JavaScript"> function autoSubmit() { var formObject = document.forms['theForm']; formObject.submit(); } </script> <form name="theForm" method="post"> <select name="brand" onChange="autoSubmit();"> <option value="Brand">Brand</option> <?php $sql = "SELECT * FROM Brand"; $Brand = mysql_query($sql,$conn); while($row = mysql_fetch_array($Brand)) { echo ("<option value=\"$row[brand_id]\" " . ($Brand_N == $row["Brand_N"]? " selected" : "") . ">$row[brand_N]</option>"); } ?> </select> <?php if($Brand_N!= null && is_numeric($Brand_N)) { ?> <select name="Product" onChange="autoSubmit();"> <option value="Product">Product</option> <?php $sql = "SELECT * FROM products WHERE Brand = $Brand_N "; $Products = mysql_query($sql,$conn); while($row = mysql_fetch_array($Products)) { echo ("<option value=\"$row[Product_id]\" " . ($Product_N == $row["Product_N"]? " selected" : "") . ">$row[Products_N]</option>"); } ?> </select> </form> <?php } ?>
-
ok that looks like what i need. whats IsValidated BOOL and the echo would be what? $q3=SELECT s.FirstName, s.LastName, CASE ss.IsValidated WHEN 1 THEN 'Yes' ELSE 'No' END AS Validated FROM Student s JOIN StudentSick ss ON s.StudentID = ss.StudentID WHERE ss.SickDay >= DATE_SUB(NOW(), INTERVAL 48 HOUR); $res3 = mysql_query($q3); $row3 = mysql_fetch_assoc($res3); <?php echo $row3['Validated'] ?>
-
table is not done yet..figuring out what would be the best way to do this. student DB Sick DB 2 diffrent Db for shure.
-
Sorry.. So every time a student calls in sick they put it in the filling and it needs to be valid whiten the 48h fallowing the log.. So basicly i set up a script for al students.then i have a table called sick ID-student id-date called-valid. so buy default the valide is no when it is validated they press validated.so it goes to yes.
-
Hey guys im making a script for a school and i need to check the database for non validated absences in the last 48hours? would it be something like SELECT * FROM YOUR_TABLE t WHERE t.datetime_column < DATE_SUB(NOW(), INTERVAL 48 HOUR) how do i add in colum validated if it says no?(yes when validated)
-
lol sorry
-
Hey guys the Linux help section is the only place i can't post??
-
So it will execute the query's one afthere the other?can this cause an overflow or something ??
-
hey guys i made scripts that update's a cart database.. but i have 1 page that updates the qty then it refreshes to go to page 2 that updates the price 1 then refresh to go to page 3... is it possible to combine all the queries in one page? like 1 execute this query first the execute query 2 .... exaple of my query's $sql2 = "UPDATE xcart_products p LEFT JOIN TbItemInventory pp ON p.productid = pp.XcartID SET p.avail = pp.QuantityOnHand WHERE p.productid = pp.XcartID"; $retval = mysql_query( $sql2 ); if(! $retval ) { die('Could not update data: ' . mysql_error()); } echo "All QTY Updated successfully"; echo "<meta http-equiv=Refresh content=2;url=3.php>"; this will go to the second page that will update my prices..
-
so i guess not ah..lol
-
?? i need it to generate its self..like now cause there is like 40 cars..and every week it changes... it needs to be in php..
-
im sorry im dunce..i don't get it... what idid is make a table but the image in background the inserted on the area i needed(pic and car info) so when you click on the car you get the window sticker to print.. but when i printed it it showed as a super small image on the printed paper... so i made the image to the size of (A4 code DPI) but it is to big to open in Dreamweaver and insert the code...
-
ya but if i resize it i wont be able to print it??
-
anybody?????? like this http://www.autoplusnet.com/Graphics/NewarkLandRover_DEMO_562_QR.jpg
-
Hey guys i made a window sticker for my body's car dealer ship.. but the ting is the image i to big..like a paper size 8.5 x 11... so i can't load it in dream weaver to ad the code... is there a way to get the info from the database(select car id) and insert it on that ?? lol cause i didn't think of the image to print..so i made the window sticker and loaded it with the code..all goo but when it came to print..ha it printed a small image in the center of the page...
-
Hey guys i made a car catalog for my body and i made a window paper to put in the windows of the cars.. so when i select the car i press window print and i see a page with the pic of the paper and all the cars info in it.that part was great until a printed it..lol small little square ... so when back to PS and made a new one paper size 219 x 296 mm but now it is way to big to view it on the web..is there a way to insert all the info in it and printing it out ? cause now if i load the pic in a table in Dreamweaver it is way to big for the page so i can't place the code on it to view the info of the car..
-
well i have a table called link in it i have link_ID linked _IMG and Link so i have 4 pre determed images the querry quets the link table so img 1 in database it is img1 image 2 is img2... (need link in DB)<a href="<?php echo $link('linked_IMG'== 'img1');?>">(image)<img src="tmp/1_180x100_v2.gif" alt="" width="180" height="100" /> </a> <a href="<?php echo $link('linked_IMG'== 'img2');?>">(image)<img src="tmp/1_180x100_v2.gif" alt="" width="180" height="100" />....
-
Hey guys i have a blog with images on the side.im doing a script that i can change the images and links to.. i cant seem to figure out how to echo link to image1.. echo (linked_image(table row)'== 'img1') echo (linked_image(table row)'== 'img2') echo (linked_image(table row)'== 'img3').... <? $recent_req2 = "SELECT * FROM $table_m LIMIT 4 , 4"; $res2 = mysql_query($recent_req2); do {?> <div> <a href="<?php echo $link('linked_image'== 'img1');?>"><img src="tmp/1_180x100_v2.gif" alt="" width="180" height="100" /></a> <a href="<?php echo $link['img2']; ?>"><img src="tmp/2_180x100_v2.gif" alt="" width="180" height="100" /></a> <a href="<?php echo $link['img3']; ?>"><img src="tmp/3_180x100_v3.gif" alt="" width="180" height="100" /></a> <a href="<?php echo $link['img4']; ?>"><img src="tmp/4_180x100_v5.gif" alt="" width="180" height="100" /></a> </div> <? } while ($link = mysql_fetch_array($res2)); ?>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!-- saved from url=(0014)about:internet --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>CAR LOAN APPLICATION </title> <link rel="stylesheet" type="text/css" media="screen" href="css-form.css" /> <style type="text/css"> <!-- input:focus, textarea:focus{ background-color: lightyellow; } --> </style> <style type="text/css" media="all"> @import "css/global.css"; body { background-color: #FFF; } </style> <style> div { background:#def3ca; margin:3px; width:80px; display:none; float:left; text-align:center; } </style> <script src="http://code.jquery.com/jquery-1.4.4.js"></script> <script src="js/jquery.js" type="text/javascript"></script> <script src="js/jtip.js" type="text/javascript"></script> </head> <body> <form id="form1" name="form1" method="post" action="add2.php"> <p>ONLINE APPLICATION:</p> <ol> <li> <label for="name">Last Name</label> <input type="text" name="PERS_L_NAME" id="PERS_L_NAME" /> </li> <li> <label for="name">First Name</label> <input type="text" name="PERS_F_NAME" id="PERS_F_NAME" /> </li> <li> <label for="name">Date of Birth</label> <input type="text" name="PERS_DATE_BIRTH" id="PERS_DATE_BIRTH" /> </li> <li> <label for="name">Social Sec.Num.</label> <input type="text" name="PERS_SSN" id="PERS_SSN" /><span class="formInfo"><a href="ajax.htm?width=375" class="jTip" id="one" name="Why SSN:">?</a></span> </li> <li> <label for="name">Drivers License</label> <input name="PERS_DRIVERS_L" type="text" id="PERS_DRIVERS_L" size="50" /> </li> <li> <label for="name">Address</label> <input name="PERS_ADD" type="text" id="PERS_ADD" size="50" /> </li> <li> <label for="name">City</label> <input type="text" name="PERS_CITY" id="PERS_CITY" /> </li> <li> <label for="name">Postal Code</label> <input type="text" name="PERS_CODE" id="PERS_CODE" /> </li> <li><u>Previous information ,if less the 2 years:</u></li> <li><button id="showr">CLICK HERE</button> <button id="hidr">Hide</button> <div>Address<input name="PERS_ADD_2" type="text"></div> <div>City<input name="PERS_CITY_2" type="text"></div> <div>Postal Code<input name="PERS_CODE_2" type="text"></div></li> <script> $("#showr").click(function () { $("div:eq(0)").show("fast", function () { /* use callee so don't have to name the function */ $(this).next("div").show("fast", arguments.callee); }); }); $("#hidr").click(function () { $("div").hide(2000); }); </script> <li></li> <li> <label for="name">Home #</label> <input type="text" name="PERS_NUMBER" id="PERS_NUMBER" /> </li> <li> <label for="name">Cell #</label> <input type="text" name="PERS_CELL" id="PERS_CELL" /> </li> <li> <label for="name">Fax #</label> <input type="text" name="PERS_FAX" id="PERS_FAX" /> </li> <li> <label for="name">Employer</label> <input type="text" name="EMPL_E" id="EMPL_E" value="Present" /> </li> <li> <label for="name">Empl.Add</label> <input name="EMPL_ADD" type="text" id="EMPL_ADD" size="50" /> </li> <li> <label for="name">Empl.City</label> <input type="text" name="EMPL_CITY" id="EMPL_CITY" /> </li> <li> <label for="name">Empl.Postal C.</label> <input type="text" name="EMPL_CODE" id="EMPL_CODE" /> </li> <li> <label for="name">Empl. Type</label> <input name="EMPL_TYPE" type="text" id="EMPL_TYPE" size="50" /> </li> <li> <label for="name">Since</label> <input type="text" name="EMPL_SINCE" id="EMPL_SINCE" /> </li> <li> <label for="name">Position</label> <input type="text" name="EMPL_P" id="EMPL_P" /> </li> <li> <label for="name">Contact Info</label> <input type="text" name="EMPL_SUP" id="EMPL_SUP" /> </li> <li> <label for="name">Contact #</label> <input type="text" name="EMPL_N" id="EMPL_N" /> </li> <li> <label for="name">Gross Salary</label> <input type="text" name="EMPL_GS" id="EMPL_GS" /> </li> <li><u>Employment information ,if less the 2 years:</u></li> <li> <label for="name">Previous Empl.</label> <input type="text" name="EMPL_2_E" id="EMPL_2_E"/> </li> <li> <label for="name">Prev.Add</label> <input name="EMPL_2_ADD" type="text" id="EMPL_2_ADD" size="50" /> </li> <li> <label for="name">Prev.City</label> <input type="text" name="EMPL_2_CITY" id="EMPL_2_CITY" /> </li> <li> <label for="name">Prev.Postal C.</label> <input type="text" name="EMPL_2_CODE" id="EMPL_2_CODE" /> </li> <li> <label for="name">Prev.Type</label> <input name="EMPL_2_TYPE" type="text" id="EMPL_2_TYPE" size="50" /> </li> <li> <label for="name">Since</label> <input type="text" name="EMPL_2_SINCE" id="EMPL_2_SINCE" /> </li> <li> <label for="name">Prev.Contact</label> <input type="text" name="EMPL_2_P" id="EMPL_2_P" /> </li> <li> <label for="name">Prev.Contact #</label> <input type="text" name="EMPL_2_N" id="EMPL_2_N" /> </li> <li> <label for="name">Gross Salary</label> <input type="text" name="EMPL_2_GS" id="EMPL_2_GS" /> </li> <li><u>Other source of revenue:</u>Assets & liabilities</li> <li> <label for="name">Residential info</label> <select name="OTHER_OWN_RENT" id="OTHER_OWN_RENT"> <option value="OWN">OWN</option> <option value="RENT">RENT</option> </select> </li> <li> <label for="name">Details</label> <input name="OTHER_OWN_RENT_D" type="text" id="OTHER_OWN_RENT_D" value="DETAILS" size="60" /> </li> <li> <label for="name">Value</label> <input name="OTHER_OWN_RENT_V" type="text" id="OTHER_OWN_RENT_V" size="15" /> </li> <li> <label for="name">Owed </label> <input name="OTHER_OWN_RENT_AM" type="text" id="OTHER_OWN_RENT_AM" size="15" value="AMOUNT LEFT TO PAY"/> </li> <li> <label for="name">Rent Amount</label> <input name="OTHER_OWN_RENT_MP" type="text" id="OTHER_OWN_RENT_MP" size="15" value="MONTHLY PAYMENT" /> </li> <li> <label for="name">Other<br /> </label> <select name="OTHER_CC_REER" id="OTHER_CC_REER"> <option value="CREDIT CARD">CREDIT CARD</option> <option value="REER">REER</option> </select> </li> <li> <label for="name"> Details </label> <input name="OTHER_CC_REER_D" type="text" id="OTHER_CC_REER_D" value="DETAILS" size="60" /> </li> <li> <label for="name">REER $</label> <input name="OTHER_CC_REER_V" type="text" id="OTHER_CC_REER_V" size="15" value="IF REER IS SELECTED" /> </li> <li> <label for="name">Owed</label> <input name="OTHER_CC_REER_AM" type="text" id="OTHER_CC_REER_AM" size="15" /> </li> <li> <label for="name">Monthly Value</label> <input name="OTHER_CC_REER_MP" type="text" id="OTHER_CC_REER_MP" size="15" /> </li> <li> <label for="name">Other </label> <select name="OTHER_INV_CAR" id="OTHER_OWN_RENT3"> <option value="INVESTMENT">INVESTMENT</option> <option value="CAR">CAR</option> </select> </li> <li> <label for="name">Details</label> <input name="OTHER_INV_CAR_D" type="text" id="OTHER_OWN_RENT_D3" value="DETAILS" size="60" /> </li> <li> <label for="name">Value</label> <input name="OTHER_INV_CAR_V" type="text" id="OTHER_OWN_RENT_V3" size="15" /> </li> <li> <label for="name">Amount Owed</label> <input name="OTHER_INV_CAR_AM" type="text" id="OTHER_INV_CAR_AM" size="15" /> </li> <li> <label for="name">Monthly Value</label> <input name="OTHER_INV_CAR_MP" type="text" id="OTHER_INV_CAR_MP" size="15" /> </li> <li> <label for="name">Other</label> <select name="OTHER_OTHER_L" id="OTHER_OTHER_L"> <option value="OTHER">OTHER</option> <option value="LOAN">LOAN</option> </select> </li> <li> <label for="name">Details</label> <input name="OTHER_OTHER_L_D" type="text" id="OTHER_OTHER_L_D" value="DETAILS" size="50" /> </li> <li> <label for="name">Value</label> <input name="OTHER_OTHER_L_V" type="text" id="OTHER_OTHER_L_V" size="15" /> </li> <li> <label for="name">Amount Owed</label> <input name="OTHER_OTHER_L_AM" type="text" id="OTHER_OTHER_L_AM" size="15" /> </li> <li> <label for="name">Monthly Value</label> <input name="OTHER_OTHER_L_MP" type="text" id="OTHER_OTHER_L_MP" size="15" /> </li> <li> <label for="name">EMAIL</label> <input name="EMAIL" type="text" id="EMAIL" size="50" /> </li> I have read the <span class="formInfo"><a href="priv.html?width=755" class="jTip" id="two" name="PRIVACY:">Policy</a></span> <li> <label for="name">ACCEPT</label> <select name="ACCEPT" id="ACCEPT"> <option value="YES">YES</option> <option value="NO">NO</option> </select> <input type="hidden" name="STATUS" value="NEW" /> </li> <li> <input type="submit" name="SUBMIT" id="SUBMIT" value="Submit" /> </li> </ol> </form> </body> </html>
-
the click function is confusing the submit vise versa,... when i click on view it shows for 2 seconds but refreshes to another page like my submit..
-
its in a form you know when you fill out a for and it says use this address for shipping if not click heer and there is another form that appears to fill in.. thas what i need..
-
its all good but there is a on button funstion so it gets confused with my form submit..
-
so what would i be looking for?
-
Hey guys i have a form that clients fill out for a credit application.. in my address section i have address and if less then 2 years previous address.. but it takes alot of space for a rare usage.. i would like to make like a check box if less then 2 years and it would open on check the added fields for address... i was looking up accodion ..seen ajax and JQ.... what would be the best?