- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 23
- Posts with Upvotes
- 21
- Upvoting Members
- 20
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 3
Re: So, do you have more code than what is posted above. Go through the above instructions step by step... Look for @ signs in the string, determine what is left and right of that, use striptags() to remove <>, use str_replace to remove semi; commas, start with some of this … | |
Re: I've made some relevant changes to your code to try to extract unique records. [CODE] <?php //database connect info here include('config.php'); //check for file upload if(isset($_FILES['csv_file']) && is_uploaded_file($_FILES['csv_file']['tmp_name'])){ //upload directory $upload_dir = "csv_dir/"; //create file name $file_path = $upload_dir . $_FILES['csv_file']['name']; //move uploaded file to upload dir if (!move_uploaded_file($_FILES['csv_file']['tmp_name'], $file_path)) … | |
Re: At some point, unclear in your code, you are multiplying qty x rate for each item, so $item_total = qty x rate; although, I do not see this in your code here. anyway I am assuming this is happening in your while loop as you are doing each item. so … | |
Re: here is a really great script to protect your directory. you can change the $LOGIN_INFORMATION array to read in all of your records from your db or at least authenticate against that instead of an internally stored list in the script. anyway, I have used this for over a year … | |
Re: try to set the CURLOPT_HTTPHEADER something like this: curl_setopt($ch, CURLOPT_HTTPHEADER, Array("User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15") ); | |
Re: That is not how the 'link' element works in rss. rss is designed to be consumed by an rss reader, and the link element will work properly in that context. If you want to have a clickable 'link' on that page you must put it in the description element of … | |
Re: In your case, this is what I would do, I'm not sure how many duplicates you are getting in a set of say, 10,000 codes, but I would start with a set number, say 50 or 100. so function_being_called($number_to_return) where $number_to_return is your 10000. Add 50 or 100 to that … | |
Re: you need to connect to the database before that function is available: broj1 said: Mind you the connection to mysql has to be established in order to use this function. BTW: It is recommended to switch to mysqli extension. move line 14 in your file to line 3: require "dbc.php"; … | |
Re: What values are you not getting? mysql_real_escape_string($oBookNode->getElementsByTagName('field')->item(0)->nodeValue), to get the value of the second 'field' tag change item to (1) mysql_real_escape_string($oBookNode->getElementsByTagName('field')->item(1)->nodeValue), ran on my machine: output =: sql = INSERT INTO timestamp_table (learningpermit, applicantname, penid, email, phone,firststroke) VALUES ('LOO4', 'Kaifi', 'AJX-AAQ-JFN-5Z', '123@abc.com', '123456', '1352793331') | |
Re: Your question is unclear. What is a computer alarm? do you have any code to show? What is this 'alarm' supposed to do? | |
Re: steelshark is right, use jquery, I use 5 browsers on a daily basis and have pop-up blockers turned on on all of them. use a modal window or a collapsible div to show /hide a login box. | |
Re: Tizag.com has much better example code than www3. page 1, input form: [CODE]<html> <head> <script type="text/javascript"> function showUser(str){ var ajaxRequest; // The variable that makes Ajax possible! if (str=="") { document.getElementById("txtHint").innerHTML=""; return; } try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers … | |
Re: It appears as though you want to upload multiple files. This code will not do that and there are some major issues within it. First off, never, ever, allow user input to create directories on your site. This is really bad practice: `move_uploaded_file( $_FILES["images"]["tmp_name"][$key], "../speed_west/imagini/$an/$nume/" . $_FILES['images']['name'][$key]);` 2, you should … | |
Re: onsubmit="return validate(this)" add a semicolon; onsubmit="return validate(this);" also, make sure your validate function is returning true if validated, false if not. | |
Re: > header("location: " . $row['id'] / ".php"); I also like the idea of storing the full url in the database, but your current script is trying to divide on line 23. it should be something like: `header("location: " . $row['id']."/index.php");` with the slash being outside of the raw ". $php … | |
| Re: try this: [CODE] <script type="text/javascript"> //Calculator formulae function multiply(){ document.Form.result.value = ((form.inputA.value * form.inputB.value * form.inputC.value * 150) / 1000000) ; } </script> [/CODE] |
Re: try to assign your get function to a variable... [CODE] function test() { var data data = $.getJSON('singleday.php?dld='+ id+'&chkdag=' + 1, function(json) {sday=json}); OtherFunction(data); } function OtherFunction(data) { for (var i in sday) { // do somthing } } [/CODE] | |
Re: Your logic is flawed... and it appears that the id's on delete would not work properly, for instance if you have 5 records and 3 and 5 are chosen to be deleted, by your logic, 5 would not be deleted as it is now id 4 because you would delete … | |
Re: [CODE] form action="welcome.php" method="post"> Name: <input type="text" name="fname" /> Age: <input type="text" name="age" /> <input type="submit" /> </form> <?php // check to see if the submit button has been pressed, if it has display your variables, if not... don't if isset($_POST['submit']) { ?> Welcome <?php echo $_POST["fname"]; ?>!<br /> You … | |
Re: change you code around a little, move your currenttotal declaration to above the get_buttons call, and add currenttotal=0 to the end of that call, this should be a good place to start: [CODE] // move this above the function getButtons call. var currenttotal = 0; function getButtons() { for(var i … | |
Re: what do you mean adding javascript to the hamburger quantity and price? do you need to total the values of items selected? you still have not explained what you are trying to do...? | |
Re: Ardav is wise i've seen many of his posts. but I must interject djbrown, not on what he was saying... but pagination, on a form, no no no. It can be done, but I don't think it is the route you should take, you would have to store all of … | |
Re: first off, don't use $_REQUEST, you should have $_POST or $_GET values, update your code to reflect that. also to make sure $data isn't empty you may want to try something like: [CODE] if ($data = mysql_fetch_array($result)) { $id = $data['id']; $link = $data['link']; $gambar = $data['gambar']; } [/CODE] | |
Re: I understand it is accepted practice not to, but please learn to use braces { } in your code. trust me. today I am working on the javascript part of a form that is over 1500 lines long. with several 100 - 150 lines of if / else if statements. … | |
Re: you need to add some sort of onclick function or event to your button. [CODE] <script type="text/javascript"> function redirect(url) { window.location = url; } </script> <h2><center>Product Preview</center></h2> <p> <form method ="post" action ="product_edit.php" > <p> <input name="tambah_produk" type="button" value="Tambah Produk" onclick='redirect("product_edit.php")' /> </p> </form> [/CODE] | |
Re: I found this one (Galleria) works pretty well straight out of the box: [URL="http://galleria.aino.se/"]http://galleria.aino.se/[/URL] | |
| Re: you can try something along the lines of the following: [CODE] select * from (product left join product_attribute on product.product_code = product_attribute.productcode) left join product_attribute_types on product_attribute.attribute_id = product_attriubute_types.attribute_id; [/CODE] |
| |
Re: you can simply try to change your query [CODE] $query="Select sum(Amountspent) from Moneyout"; //or if by cateegory $query="Select sum(Amountspent) from Moneyout where category='x'"; [/CODE] | |
Re: line 76 in the code above is not proper, it is mixed html / php mixing javascript and php is not proper either [CODE] // get rid of the html comment tag on last line: //from <!-- <?php require('footer.php'); ?> // to <?php require('footer.php'); ?> // bad code!. if($username == … |