Everything posted by webbie1985
-
Sorry to keep posting
Ahhhhh! mate you are a living LEGEND!! it didnt occur to me that i could include the jquery in the php script totally over looked it !!!
-
Sorry to keep posting
just looked through my html and there is no call for that specific path
-
Sorry to keep posting
loads fine here, just check on my ftp and there is no directory called jquery, the jquery files are located in the root of pmanagement
-
Sorry to keep posting
using jquery ui autocomplete live link is www.swifttrading.co.uk/pmanagement/index.php admin admin it is just a live test server and database
-
Sorry to keep posting
thanks a bunch, usually do just slipped my mind (!WOOPS!)
-
Sorry to keep posting
ok lol so ive been so long changed my code abit now i have a searching box for the product code using jQuery but i still cant get it to put the other data from the table in the other text boxes product description and price ill show you my new code: <script type="text/javascript"> $(document).ready(function() { $('#auto').autocomplete( { source: "search1.php", minLength: 2, }); }); </script> <div class="content" id="addpro"> <form style="text-align:right"action="saveproduct.php" method="post"> <div style="width:400px; text-align:right"> <div style="margin-left: 48px;"> Service Centre: <input name="servicecentre" type="text" /> </div> <br /> <div style="margin-left: 97px;"> PO Number: <input name="ponumber" type="text" /> </div> <br /> <div style="margin-left: 80px;"> Product Code:<input name="productcode12" type="text" id="auto" /> </div> <br /> <div style="margin-left: 80px;"> Product Description: <input name="proddesc" value=""type="text" /> </div> <br /> <div style="margin-left: 80px;"> Price: £<input id="price" name="price" type="text" /> </div> <br /> <div style="margin-left: 80px;"> Quantity: <input name="quantity" type="text" /> </div> <br /> <div style="margin-left: 80px;"> Total: £<input name="total" type="text" /> </div> <div style="margin-left: 127px; margin-top: 14px;"><input name="" type="submit" value="Save" /></div> </div> </form> </div> <?php $mysqli = new mysqli(); $text = $mysqli->real_escape_string($_GET['term']); $query = "SELECT * FROM products WHERE productcodes LIKE '%$text%' ORDER BY productcodes ASC"; $result = $mysqli->query($query); $json = '['; $first = true; while($row = $result->fetch_assoc()) { if (!$first) { $json .= ','; } else { $first = false; } $json .= '{"value":"'.$row['productcodes'].'"}'; } $json .= ']'; echo $json ; ?> Thanks millions
-
How many h1 tags per page
i agree with D4Y0's (#5) Post. make your <h2> tag look the same as your <h1> in your CSS file you can use as many <h2>'s as you want according to my SEO agency
-
best e-commerce software to use?
Prestashop all the way for me
-
First ever ecommerce site
We use prestashop it has great feature, lots of community support, hundreds of free and paid modules and templares, easy to customise, and nearly every payment gateway is available for it we use secure trading but there are hundreds that are available for it and the majority of them are installed when you install it
-
Advice please on improving design
I would probably change the white text that's in the header to black just to tie the colours in on the header, great first site well done
-
what is the best designing tool.
A lot of people over look adobe muse
-
Sorry to keep posting
D4Y0 I DID that but no errors think I need to use Ajax inlinediv said, great! lol don't know Ajax at all can you guys help as I dont have time to learn it just to do this one bit of code pleassssse
-
Sorry to keep posting
Thanks guys for your input i really appreciate it, @D4YO it still doesnt display the query result in the textbox using your code
- Best book for learning JQuery
-
Sorry to keep posting
Hi guys (Again), I'm sorry to keep posting and i am trying to figure it out my self before posting (books, google etc) but cant really find anything that helps me; What I am trying to do is for the staff to type in a product number text box (number already in database (table 1)) and echo the product description in another textbox called "product description" ready for the form to be posted to the database (table 2); Heres the PHP please dont laugh at the code as i am still learning PHP: <?php include ("db.php"); $prodsearch1 = mysql_real_escape_string($_POST['productcode']); $prodfind = mysql_real_escape_string(mysql_query("SELECT productdescription FROM products WHERE productcode = '{productcode}'")); while($row5 = mysql_fetch_array($prodfind)); ?> and HTML: <div class="content" id="addpro"> <form style="text-align:right"action="saveproduct.php" method="post"> <div style="width:400px; text-align:right"> <div style="margin-left: 48px;"> Service Centre: <input name="servicecentre" type="text" /> </div> <br /> <div style="margin-left: 97px;"> PO Number: <input name="ponumber" type="text" /> </div> <br /> <div style="margin-left: 80px;"> Product Code: <input name="productcode" type="text" /> </div> <br /> <div style="margin-left: 80px;"> Product Description: <input name="proddesc" value="<?php include ("proddesc.php"); echo $row5;?>"type="text" /> </div> <br /> <div style="margin-left: 80px;"> Price: £<input name="price" type="text" /> </div> <br /> <div style="margin-left: 80px;"> Quantity: <input name="quantity" type="text" /> </div> <br /> <div style="margin-left: 80px;"> Total: £<input name="total" type="text" /> </div> <div style="margin-left: 127px; margin-top: 14px;"><input name="" type="submit" value="Add" /></div> </div> </form> </div> Thanks again guys really appreciate your patience
- mysql_real_escape_string() Advice
-
mysql_real_escape_string() Advice
Hi guys, One of the guys on the forum warned me that my PHP code was vulnerable to MySQL injection. I have done a bit of reading and have implemented it into my code please could you tell me if i have done it right as i am a bit of a beginner when it comes to PHP and MySQL as HTML, CSS and jQuery are my specialties. Do you have to do this on all $variables or just the ones like $_POST, $_GET etc. And also could you tell me if there is a way of checking it out thanks <?php include("db.php"); $servicecentre= mysql_real_escape_string($_POST['servicecentre']); $ponumber=mysql_real_escape_string($_POST['ponumber']); $prodcode=mysql_real_escape_string($_POST['productcode']); $proddesc=mysql_real_escape_string($_POST['proddesc']); $price=mysql_real_escape_string($_POST['price']); $qty=mysql_real_escape_string($_POST['quantity']); $total=mysql_real_escape_string($_POST['total']); mysql_query("INSERT INTO purchaseorder (servicecentre,ponumber,productcode,productdescription,price,quantity,total) VALUES ('$servicecentre','$ponumber','$prodcode','$proddesc','$price','$qty','$total')"); header("location: tableedit.php#page=addpro"); ?> And the HTML <div class="content" id="addpro"> <form style="text-align:right"action="saveproduct.php" method="post"> <div style="width:400px; text-align:right"> <div style="margin-left: 48px;"> Service Centre: <input name="servicecentre" type="text" /> </div> <br /> <div style="margin-left: 97px;"> PO Number: <input name="ponumber" type="text" /> </div> <br /> <div style="margin-left: 80px;"> Product Code: <input name="productcode" type="text" /> </div> <br /> <div style="margin-left: 80px;"> Product Description: <input name="proddesc" type="text" /> </div> <br /> <div style="margin-left: 80px;"> Price: £<input name="price" type="text" /> </div> <br /> <div style="margin-left: 80px;"> Quantity: <input name="quantity" type="text" /> </div> <br /> <div style="margin-left: 80px;"> Total: £<input name="total" type="text" /> </div> <div style="margin-left: 127px; margin-top: 14px;"><input name="" type="submit" value="Add" /></div> </div> </form> </div> Thanks again guys this is a very friendly and useful forum
-
New to web development
I would recommend adobe muse if you have no coding experience at all but it is well worth learning how to code. i all ways recommend http://www.codecademy.com to help learn how to code covers HTML, CSS, PHP, jQuery, javascript and the such like. Also http://www.unlimitedwebhosting.co.uk is a good hosting company i use their re sellers plan which is only £11.99 and it is truly unlimited cloud hosting
-
All Text boxes post to database except this one plz help
Thanks for pointing this out for me, thanks for your help
-
All Text boxes post to database except this one plz help
Thank you so much for your quick reply it was driving me nuts, the only thing i have to ask is i thought where $_POST['proddesc] is i thought had to be the database column that i wanted to post to, sorry but im new to php, HTML and CSS is my specialty
-
All Text boxes post to database except this one plz help
Ok guys please help, all the other boxes post to the database except $proddesc: saveproduct.php <?php include("db.php"); $servicecentre=$_POST['servicecentre']; $ponumber=$_POST['ponumber']; $prodcode=$_POST['productcode']; $proddesc=$_POST['productdescription']; $price=$_POST['price']; $qty=$_POST['quantity']; $total=$_POST['total']; mysql_query("INSERT INTO purchaseorder (servicecentre,ponumber,productcode,productdescription,price,quantity,total) VALUES ('$servicecentre','$ponumber','$prodcode','$proddesc','$price','$qty','$total')"); header("location: tableedit.php#page=addpro"); ?> and the HTML: <div class="content" id="addpro"> <form style="text-align:right"action="saveproduct.php" method="post"> <div style="width:400px; text-align:right"> <div style="margin-left: 48px;"> Service Centre: <input name="servicecentre" type="text" /> </div> <br /> <div style="margin-left: 97px;"> PO Number: <input name="ponumber" type="text" /> </div> <br /> <div style="margin-left: 80px;"> Product Code: <input name="productcode" type="text" /> </div> <br /> <div style="margin-left: 80px;"> Product Description: <input name="proddesc" type="text" /> </div> <br /> <div style="margin-left: 80px;"> Price: £<input name="price" type="text" /> </div> <br /> <div style="margin-left: 80px;"> Quantity: <input name="quantity" type="text" /> </div> <br /> <div style="margin-left: 80px;"> Total: £<input name="total" type="text" /> </div> <div style="margin-left: 127px; margin-top: 14px;"><input name="" type="submit" value="Add" /></div> </div> </form> </div> Thanks In advanced