Jump to content

syed

Members
  • Posts

    151
  • Joined

  • Last visited

Everything posted by syed

  1. Your csvData variable is assigned the value of account number and order number, but it appears that there is no usage of the comma to separate the values. It should be something like this $cvsData = $accountnumber . "," .$ordernumber . "\n"; What you should do is before saving to the csv file. Store the data into a 2D array as such. $DataColumn[] = $accountnumber; $DataColumn[] = $ordernumber; $DataRow[] = $DataColumn; Now that you have the data stored into a 2D array you can do some sorting using some of the array functions.
  2. Use the get method for searches not post.
  3. What do you mean maximize a function. Please explain.
  4. When you say you have a problem, what exactly is the problem.
  5. It appears you have an extra single quote in that line in your csv file. Check that line in your file and make sure there are no single quotes that are not escaped
  6. <script language="javascript"> function doInsert(){ var container = document.getElementById("the_hidden_container"); container.innerHTML = "<input type=\"hidden\" name=\"salary\" id=\"salary\" value=\"33000\" />"; } </script> <form> Sample Text <div id="the_hidden_container"></div> Sample Text <input type="button" value="Insert Hidden Field" onclick="doInsert()" /> </form> If you test it in firefox, click the button, then select both sample text and click view source, you will see the hidden input field has been inserted into the div tag. Hope that helps.
  7. Are you saying each row is wrapped in a form tag?
  8. Hope this helps <script language="javascript"> function doSearch(){ var filter = document.getElementById("filter").value; var search = document.getElementById("search").value; var submit = false; if ((filter) && !(search)){ alert("please enter a search criteria to filter by"); submit = false; }else if ((filter) && (search)){ alert(filter + "=" + search); submit = true; }else if (search){ alert("firstname=" + search); submit = true; }else{ alert("please enter a search criteria"); submit = false; } if (submit){ alert("All done submitting now"); document.form.submit(); } } </script> <form action="" method="post" name="form"> <select name="filter" id="filter"> <option value="">Select</option> <option value="firstname">First Name</option> <option value="lastname">Last Name</option> <option value="email">Email</option> </select> <input type="text" name="search" id="search" /> <input type="button" name="btnSearch" value="Search" onclick="doSearch()" /> </form>
  9. You spelled color as lower case on your form but in your php code, your spelling it as uppercase.
  10. //Colour Search Box if($_POST['Colour'] != "") { echo "Colour has a value"; } else { echo "Colour box is empty!"; }
  11. have you tried printing the length first to make sure that the value is 0 when colour has a value.
  12. Wat you need to do is read each line of the text file into a 2D array. after the data is loaded into a 2D array you can then use a loop and an if statement to loop through the array and do a comparison, you can break out of the loop if you find a match. That's the easy bit. Now you need to increase the number for that record, you could update the array and then create a new file using the data from the array.
  13. The most quickest way to do this without any php coding, is to use css. Place all your images in a div with a fixed with such as 100x100px then float the div to the left. The image divs should appear in container with a set width such as 500px. The logic is, after five divs are positioned next to each other, they would total up 500px, this will result in the next div being pushed to the next row automatically. Example <div style="width:500px;"> <div style="width:100px; float:left;">Div1</div> <div style="width:100px; float:left;">Div2</div> <div style="width:100px; float:left;">Div3</div> <div style="width:100px; float:left;">Div4</div> <div style="width:100px; float:left;">Div5</div> <div style="width:100px; float:left;">Div6</div> </div> The first five divs will appear on the first row, div6 will appear on the next row. Hope that helps
  14. Firstly let me just say this is a PHP forum so if you want such non php related questions answered quickly, I would suggest posting on relevant sections. Now to try an answer your question, it appears to me that your radio buttons are working independently that is you can select them both, which is not the purpose of a radio button. What you need to do is give both the radio buttons the same name. This will allow you to select only one of the options.
  15. Convert your time to a timestamp, then add 1800 seconds to the timestamp then convert it back to a formatted time.
  16. Marius B There are different application states, GET is one of them. Using GET allows you to submit data to a webserver for processing or simply maintain data from one page to another. However, there are limitations, that is using GET, you can only send a certain amount of data. I don't know the exact number about 300 something characters in the url. Also your data is clearly visible, so you would not send password using GET.
  17. You should dynamically build the sql string. Loop through your $_GET variable and build the sql string. $param = $_GET; $i = 0; $sql = "SELECT * FROM ucn WHERE"; foreach ( $param as $key => $value ){ if ( $i == 0 ){ $sql . = " " . $key . "='" . $value . "'"; }else{ $sql . = " AND " . $key . "='" . $value . "'"; } $i++; } I've not tested the above code but basically, if you give all your textbox's the same name as your table columns, you can then loop through the $_GET variable, appending the key which is your table column name and the value which is your search criteria. This is assuming your GET variable only contains search criteria ( column names). You need play around with the code. Hope it helps.
  18. $_SESSION['$knum'] = $_POST['$knum']; remove single quotes $_SESSION[$knum] = $_POST[$knum];
  19. The same reason why there are so many youtube clones or social networking sites.
  20. use print_r($_POST), see what $_POST contains
  21. Are you creating a data scraper?
  22. I think this is what you want. http://www.snippetbank.net/detail/snippetdetail/4-php/6-network/24-Validate-Email-Domain-With-MX-Record.html
×
×
  • 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.