- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
27 Posted Topics
Hello, I have this home work question to be solved on a cloud ide: Create a class called ShoppingCart. Create a constructor that takes no arguments and sets the total attribute to zero, and initializes an empty dict attribute named items. Create a method add_item that requires item_name, quantity and … | |
Hello, I have a php page (category.php) that loads its content from the database when a link is clicked from another page. For example a a link that looks like this `<a href = "category.php?category=cars">Cars</a>` when clicked will pull all the items from the database under the cars category and … | |
I''m trying to process a form without page reload using jQuery post as shown below: <script type="text/javascript"> $('#settingsForm').submit( function(){ $('input[type=submit]', this).attr('disabled', 'disabled ');}); function scheck(){ var oldanswer = $("#oldanswer"); var newquestion = $("#newquestion"); var newanswer = $("#newanswer"); var url = "settingsupdate.php"; //This part of the code works fine. Errors are … | |
I'm trying to push items into an array. Each time a user clicks a book link, the id of the book is supposed to be added to an array.(The name and id of the book are pulled from the database.) But when i push a new book id, the existing … | |
I'm implementing something similar to a shopping cart - a "my favorites" page for products. Users can click on an "add to favorites" link and add products to a favorites table from which they can view the details of those products at a later time. There's no purchase on the … ![]() | |
I'm working on a website with a sign-up form. I've been able to perform validation without page reload, printing appropriate error messages.However i'm trying to implement an interface i've seen on a couple of websites, where a user is guided to fill certain fields like password that come with restrictions, … | |
I'm trying to do a username availability check on my website, i.e during registration, it checks if a username is taken or still available. However when i execute i get no result at all,nothing happens. My code: **Registration page** ***register.php**: * //this form posts to the same script. //In this … ![]() | |
I have a drop-down list, which contains a list of over 150 schools. Each school in this drop-down list is located in one of 30 states. What i'm trying to implement is this: If a user chooses a school from the "select" list, the text box below it would automatically … | |
I have an HTML dropdown list which i'm populating from a database. My question is how can i retrieve the value of a selected item from this dropdown list using AJAX? Thanks in advance. | |
I have the following css style for a div #central_content { float:left; width:697px; margin:-5px 0px 0px 0px; padding:0px 0px 0px 0px; position:relative; } Everything displays perfectly on 100% zoom in Google chrome. When i zoom out the contents within this div get messed up, aligning themselves to the left of … | |
I have this loop where i'm adding items to a session array. like this: $SQL = "SELECT * FROM tbl_product where id ='{$cartid}'"; //execute the query $result = mysql_query($SQL); //add the resultant data into a session array while($row = mysql_fetch_assoc($result)){ $_SESSION['cartItems'][] = $row; } Somewhere in my HTML document, i'm … | |
I have an array that looks like this: `Array ( [0] => Array ( [id] => 2 [name] => test product1 [description] => test [quantity] => 1 [price] => 188 [status] => Brand New [category] => Computer Software [subcategory] => Music Software [postdate] => 2013-05-19 [prodimage] => [user] => admin … | |
I'm using the following code for my paging on my script <?php $pn = 0; $result = mysql_query("SELECT * FROM tbl_product WHERE category = '$cat' ORDER BY id ASC "); $nr = mysql_num_rows($result); if (isset($_GET['pn'])) { // Get pn from URL vars if it is present $pn = $_GET['pn'];// filter … | |
I'm reading data from my DB and displaying it in a table like this while($row = mysql_fetch_row($result)){ $_SESSION['edit'] = $row[1];//it says undefined index 'edit' echo '</tr>'; echo ' <td class="product"><a href="manage-products-2.php?prod_id ='.$row[0].'">'.$row[1].'</a></td>';//it says undefined index 'prod_id' echo'<td class="quantity">'.$row[5].'</td>'; echo '<td class="item_price">'.$row[4].'</td>'; echo '<td class="item_total">'.$row[6].'</td>'; echo '<td class="item_unsold"><a href = "manage-products.php?prod … | |
I'm retrieving products from my database and listing them in a while loop. Like this <?php while($row = mysql_fetch_row($result)){ echo '<div class="product_info">'; echo '<div class="category_product_title"><a href="category-page.php">Product</a>'; echo '</div>'; echo '<div class="category_product_number">#'.$row[0].'('.$row[1].')'.'</div>';//prints id and name echo '<div class="category_product_description">'.$row[2].'</div>';//prints description echo '<div class="category_product_price">'.$row[4].'TL</div>';//prints price echo '<div class="category_details"><a href="productpage2.php">DETAILS</a></div>';//The link to list the … | |
I have some html code in my php script which i'm executing through echo. Suppose i want to access an image on the server which is saved in my uploads folder from within that echo, how do i do it? I tried this $image = $row[8] //fetching the image name … | |
Hi, I'm wondering how i can upload images into a database and display an uploaded image at the same time. For example when the upload button is clicked, the image is inserted into the database and displayed in the frame. (It doesn't matter whether the page reloads or not). I … ![]() | |
I have the following code to draw any polygon on an HTML5 canvas on a button click. The user supplies the radius, sides, x and y co-ordinates. Using the sides any regular polygon should be drawn. First we move to the perimeter using moveTo() and then draw lines using lineTo() … | |
I'm trying to create something like a breadcrumb based on what is selected from a drop down list. For example if a user selects accessories from a list and then goes on to select from another drop down list scarfs. I want to be able to show: You selected accessories … ![]() | |
I have the following tables **tbl_cat** -- id(pk), category (PRODUCT CATEGORIES) **tbl_subcat** - id, catid, subcat (catid is a foregin key referencing id in **tbl_cat** ) - SUB CATEGORIES I want to prepopulate my tables with categories and sub-categories of products. it's quite straightforward to insert categories in **tbl_cat** but … | |
I have the following code that gets input from users on a button click and draws on a canvas but when i click the button nothing works. Here's the code: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link href="mycss.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js.js"></script> <title>CANVAS</title> </head> <body> <canvas … | |
Hi, I have the following tables **tbl_user** - id, username, password **tbl_userprofile** - id, userid, name, surname, gender, nationality,address, mobile, department, email, question, answer. userid is a foreign key in **tbl_userprofile** referencing id in **tbl_user** I'm trying insert a new user into **tbl_userprofile**. But i'm not sure how to go … | |
This is my first PHP script, to add a user to my website but i keep getting these errors Cannot send session cache limiter - headers already sent Cannot modify header information - headers already sent mysql_num_rows expects parameter 1 to be resource boolean given I have a basic understanding … ![]() | |
Hi, I have a database (OLEDB) on which i perform operations like insert, delete and update. When i carry out these operations, the changes are reflected in the database during runtime but when i close the form everything goes back to normal. How can i get these modifications to relfect … | |
Hi Suppose you want to read from a file in a loop with strings of various lengths into a single string variable e.g if your file contents are such as Steve West , 14/10/1985, Indiana, FARh+ , 01234567890, Sht. Mehmet Emin Street No:1 Gocmenkoy Nicosia KKTC Marcus Chaplin, 13/11/1978 ,Colorado … | |
I'm so confused on how to calculate the running time of an algorithm. i've searched online but i can't seem to understand any of the explanations hence my question: how do you calculate the running time of any algorithm? Please i'd love an explanation with any example or you can … | |
Good day everyone.. I'm very very new to javascript, i found this tutorial i was reading and it said to insert the below javascript code to a HTML document between the <body> </body> tags. The code is : <script language=“JavaScript”> <!- - document.writeln(“Hello, welcome to my page.” ); //--> </script> … |
The End.