Jump to content

techker

Members
  • Posts

    812
  • Joined

  • Last visited

Everything posted by techker

  1. Hey guys i have a products site and i put an edit product page , i need to put in a form of select box the database info but highlight the result in the table.. ok so lets say product car name id type brand ---> select box to edit the brand (select * from Brands) but incase he does not want to change that info i need the default to be the info stores already? brand Honda -->select box highlight Honda this is the select i have div class="form-group"> <label for="exampleInputName2">Brand : <? echo $row['Brand'] ?></label> <select name="Brand"> <?php while ($row2 = mysqli_fetch_array($result2)) { echo "<option value='".$row2['Name']."'>".$row2['Name']."</option>"; } ?>
  2. interesting. thx for the info i will read up on it.
  3. so the output would be $string = ".echo row['description'];."; echo nl2br($string);
  4. Hey guys i have a for to upload for a car dealership i did ,in the form there is a text box for descrption. the guy wants to be able to insert a description like: ........................... this is a car test .features one .features 2 ....... this car is fully equipeed... .......................... but now the form insert in the database all messt up it becomes one text... is there a way to insert it in the database as he puts it?
  5. ya i found a way to install apache server in it and access it remotly.but the gpio is not activating..will figure that part..thx!
  6. i sent out a request .. in the cpanel i only have basic php ini values that i can mod....
  7. i don't think i have access...i will check the cpanel to see
  8. Hey guy's i doing a Rasperry Pi garage door app and got this code in a tutorial: $q=$_GET["q"]; if(isset($_GET['q']) && $_GET['q'] == 1) { error_reporting(E_ALL); exec('gpio write 7 0'); usleep(1000000); exec('gpio write 7 1'); echo" garage is Open"; } i modified it to return a response. but i get an error file from server PHP Warning: exec() has been disabled for security reasons in /home/techker/public_html/Garage/getcd.php on line 15 is there an alternative or way around this ?
  9. ok let me restart..sometimes i tend to right what i think in my own words..lol ok i extracted usernames and emails from databases. now we installed a new script and we want to import the username and emails in that main database. so this script it needs the main user table to have username and email a the date. once that is done user_profile user_count user_Activity needs to have the id generated from user table inserted.
  10. the database is new.so all the emails will be unique. i have about 1200 emails..lol so first step is insert into the user database the select user id from the database and insert into the profile and others.. but i need to add them individually..not all in one table.
  11. Hey guy's my body has a few social media site and want's to merge them all in one. i extracted all the username and emails from all DB i need to insert the username and email in the new database and once that is done take the userID an isert it in 4 other databases so the first step is user then the others are for profiles and settings..if i don't do it the user lands on a 404 since the profile was not created.. is there a way to do this automated.. i inserted the usernames in Database Dump on the same server
  12. ya i think i need to site down with my body on this..lol the drag and drop is a good idea..just need to make a database that will store the order that he sets it with an id. then extract by order by.. Hey thx for the help guys!
  13. true i can always use update.. how can i auto increment a field starting from 1.. and if you delete the product it needs to reset the fields..cause if i delete the order 3 there will be missing a 3 in the order..
  14. can you correct this? $num= $_POST['num']; $CheckNum = mysql_query("SELECT Order from Products WHERE Order = '$num'"); while($test = mysql_fetch_array($CheckNum)) if ($test ) { echo "Is not valide"; }
  15. there should be a way to warn before he submits?cause if he makes like 3 errors it can take a long time to add a single product.. maybe a select box that shows only the numbers not taken?
  16. but how can i warn the user ?
  17. Hey guy's i made a small catalog style for my body's shop,in the admin he inserts and deletes products. but he would like to order the products the way he wants to,not by Id or ASC desc... so i added a field order inserts 1 to 10 lets say. so how can i do it so first there is not replicates and second when i do my query how can i make it order by numbering 1 to 10..
  18. the textare is for a dealership script im doing for my body..just to add cars.. see,so i would change the class for WSYIWYG?but then the others? <code> <label>SHORT DESCRITION</label> <textarea name="Description_short" cols="55" rows="4" class="text-input textarea" ></textarea> <label>SHORT FR</label> <textarea name="Description_short_FR" cols="55" rows="4" class="text-input textarea" ></textarea> <label>FULL DESCRIPTION</label> <textarea name="Description_long" cols="55" rows="6" class="text-input textarea" ></textarea> <label>FULL DESCRIPTION FR</label> <textarea name="Description_long_FR" cols="55" rows="6" class="text-input textarea" ></textarea> </code>
  19. Hey guys,i noticed that when i try to add more then one ID:wysiwyg on my textarea it only works on one.. is there a way to have lets say 3 wysiwyg textarea?? do i need to add a class wysiwyg2 wysiwyg3....
  20. hey guys i have this invoice im working on but my clients want's the invoice id start at a specific number? do it put that number in phpmyadmin direct on the line null?or can i do it another way?
  21. im going to post my code.it's in a for.. <form id="submit_form" action="ADD.php" method="post" > SUB ::<span id="small_total"></span><br /> TPS :: <span id="tps"></span><br /> TVQ :: <span id="tvq"></span><br /> GRAND TOTAL :: <span id="grand_total"></span><br /> <div class="action_bar"> <input type="submit" name="submit" /> </div> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="42%">PRODUCT</td> <td width="11%">QTY</td> <td width="10%">PRICE</td> <td width="37%">TOTAL</td> </tr> <tr> <td><p class="large"><input type="text" id="street" class="item_title" name="obj1"> </p></td> <td> <p class="small"> <input type="text" id="number" value="0" class="item_quantity" name="qty1"></p> </td> <td><p class="small"> <input type="text" value="0"class="item_price" name="price1"></p> </td> <td><span class="item_small_total"></span></td> </tr> <tr> <td><p class="large"><input type="text" id="street" class="item_title" name="obj2"> </p></td> <td> <p class="small"> <input type="text" id="number" value="0" class="item_quantity" name="qty2"></p> </td> <td><p class="small"> <input type="text" value="0"class="item_price" name="price2"></p></td> <td><span class="item_small_total"></span></td> </tr> <tr> <td><p class="large"><input type="text" id="street" class="item_title" name="obj3"> </p></td> <td> <p class="small"> <input type="text" id="number" value="0" class="item_quantity" name="qty3"> </p></td> <td><p class="small"> <input type="text" value="0"class="item_price" name="price3"></p> </td> <td><span class="item_small_total"></span></td> </tr> <tr> <td><p class="large"> <input type="text" id="street" class="item_title" name="obj4"> </p></td> <td> <p class="small"> <input type="text" id="number" value="0" class="item_quantity" name="qty4"> </p></td> <td><p class="small"> <input type="text" value="0"class="item_price" name="price4"></p> </td> <td><span class="item_small_total"></span></td> </tr> <tr> <td><p class="large"><input type="text" id="street" class="item_title" name="obj5"> </p></td> <td> <p class="small"> <input type="text" id="number" value="0" class="item_quantity" name="qty5"></p> </td> <td><p class="small"> <input type="text" value="0"class="item_price" name="price5"></p> </td> <td><span class="item_small_total"></span></td> </tr> <tr> <td><p class="large"><input type="text" id="street" class="item_title" name="obj6"> </p></td> <td> <p class="small"> <input type="text" id="number" value="0" class="item_quantity" name="qty6"></p> </td> <td><p class="small"> <input type="text" value="0"class="item_price" name="price6"></p> </td> <td><span class="item_small_total"></span></td> </tr> <tr> <td><p class="large"><input type="text" id="street" class="item_title" name="obj7"> </p></td> <td> <p class="small"> <input type="text" id="number" value="0" class="item_quantity" name="qty7"></p> </td> <td><p class="small"> <input type="text" value="0"class="item_price" name="price7"></p> </td> <td><span class="item_small_total"></span></td> </tr> </table> </form>
  22. Hey guys i got an invoice form that has the totals in a span id SUB ::<span id="small_total"></span><br /> TPS :: <span id="tps"></span><br /> TVQ :: <span id="tvq"></span><br /> GRAND TOTAL :: <span id="grand_total"></span><br /> so its part of a form,when i submit to add to databse i can't seem to figure out how to get the values of the id? i have tried a few things with no success.. exp in the add.php page(form submit action) $GT = "<script language='javascript'>document.getElementById(grand_total);</script>";
  23. ok i think i got it. $q1 = "UPDATE si_invoice_items SET tax1 =(SELECT ROUND(SUM(unit_price* $TAX1/100),2))"; $res1 = mysql_query($q1); $row3 = mysql_fetch_assoc($res1); $q2 = "UPDATE si_invoice_items SET tax2 = (SELECT ROUND(SUM(unit_price* $TAX2/100),2))"; $res2 = mysql_query($q2); $row2 = mysql_fetch_assoc($res2);
  24. hey guys i have a complex code that i would like to automate.. So i modified an invoice program(simple invoices) for Quebec Taxes. added 2 columns in database si_invoice_items tax1 and tax1 so in that database there is a field called unit_price so what i did is set up a query that calculates the taxes on that column unit_price and inserts in calumn tax1 TPS and tax2 TVQ so that part is fine but the only way i seen to do it is to make a table and echo the database si_invoice_items and put a button (convert to QC tax)so when you press it executes the querry: but my issue is is that im running the query from a specific id is there a way to make the query go true all the rows and convert?then i can set up a CRON job to excute it every hour or so.. TAX1=5.00; $TAX2 =9.975; $id=$_GET['id']; $q1 = "SELECT SUM(unit_price) AS TotalPrice FROM `si_invoice_items` where `invoice_id`= $id"; $res1 = mysql_query($q1); $row3 = mysql_fetch_assoc($res1); $TotalItems=$row3['TotalPrice']; $subtotal = ($TotalItems * $TAX1/100) ; $subtotal2 = ($TotalItems * $TAX2/100) ; $price3 = $TotalItems + $subtotal + $subtotal2; $total= round($price3, 2); $taxt1=round($subtotal, 2); $taxt2=round($subtotal2, 2); $TotalItems2=round($TotalItems, 2); mysql_query("UPDATE `si_invoice_items` SET `tax1` = $taxt1, `tax2` = $taxt2 WHERE `invoice_id` = $id");
  25. lol i settle it..uhh but still don't understand all of it.. $inv = $i->getResultsWhere('order by itemCode DESC LIMIT 0, 1 '); changed the limit... {foreach from=$inv item=itemCode} <td class="responsive">{$itemCode->itemCode}</td> <td class="responsive">{$itemCode->itemDesc}</td> <td class="responsive">{$itemCode->qtyOnHand}</td> <td class="responsive">${$itemCode->itemRetail}</td> this? if im correct from $inv is the query the you associate it to item that becomes $itemcode
×
×
  • 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.