- Strength to Increase Rep
- +8
- Strength to Decrease Rep
- -2
- Upvotes Received
- 48
- Posts with Upvotes
- 41
- Upvoting Members
- 36
- Downvotes Received
- 4
- Posts with Downvotes
- 4
- Downvoting Members
- 3
197 Posted Topics
Re: line 73 is missing a semi-colon | |
Re: Just came across my first daniweb google hit. Searched on "Coldfusion wamp" past year. 8th link on page. | |
...was asked for some php file upload code, so I thought I would post some stripped down, barebones code that I use in admin/dashboard pages to add/change images associated with products. Please see attached image for folder setup. The code uses the [jQuery Form](http://malsup.com/jquery/form/) plugin by Mike Alsup. **index.php** has … | |
Re: Hi James, I think your second listing should actually be coded:- $listing = [ 'one' => $x, 'two' => $y, 'three' => $z ]; | |
Re: Hi, Try not to use for loops to iterate an array. I'm not sure what you are trying to achieve, but i've constructed similar data and looped through it. Hope it helps. $array = array( '798D25C0DEABD' => array('quantity' => 1, 'price' => 20.5), '40B2B0FA3D222' => array('quantity' => 1, 'price' => … | |
Re: Hi James, $response[] = will create (if it doesn't exist) or append the right-hand value to the $response array. So if $html->data->identifier is a simple string, e.g. 'Price', then a new array would be ['Price'] or array(0=>'Price') $order->get_items() appears to be a nested object not an array. I've created a … | |
Re: <style>.selected {background: yellow}</style> <?php $menu[] = array('menu_id' => 1, 'menu_text' => 'Home'); $menu[] = array('menu_id' => 2, 'menu_text' => 'Service'); $menu[] = array('menu_id' => 3, 'menu_text' => 'About Us'); $menu[] = array('menu_id' => 4, 'menu_text' => 'Contact Us'); $selected = (isset($_GET['side']) and !preg_match('/\D/',$_GET['side'])) ? $_GET['side'] : 0; $i = 0; … ![]() | |
Re: If your checkboxes are there to purely signify that there will be content in a corresponding text field, then I would lose the checkboxes and simply check for form field content in your form handler. You have too any forms. "There can only be one" (Highlander) :D | |
Re: What is part ? is it a string of html or a numeric ? | |
Re: Hi, .val() is for form values. you need to use .text() | |
Re: dhani09 are you open to using jQuery? | |
Re: Hi, Syntax error :-) `setTimeout(function(){alert("my message");location.replace("/new-page.php");},1000);` | |
![]() | Re: <img src="" id="pics"> <script> var m=new Date(); var imageArray = [ "Holiday/HolidayDesktops/Newyear.jpg", "Holiday/HolidayDesktops/Vday.jpg", "Holiday/HolidayDesktops/St.Patday.jpg", "Holiday/HolidayDesktops/Easter.jpg", "Holiday/HolidayDesktops/MemorialDay.jpg", "Holiday/HolidayDesktops/NatFlagDay.jpg", "Holiday/HolidayDesktops/July4.jpg", "Holiday/HolidayDesktops/WomensEqualityDay.jpg", "Holiday/HolidayDesktops/LaborDay.jpg", "Holiday/HolidayDesktops/Halloween.jpg", "Holiday/HolidayDesktops/Thanksgiving.jpg", "Holiday/HolidayDesktops/Christmas.jpg", ]; document.getElementById("pics").src=imageArray[m.getMonth()]; </script> ![]() |
Re: It's actually an HTML form. :-) You will need to use JavaScript and Ajax (jQuery make things easier). Your JavaScript will be called by your main file (the one with the form) and will simply run Ajax code to post all your form variables to a form handler. The form … | |
Re: Can you show the HTML form code? | |
Re: Very happy with CodeIgniter 2+ May attempt to learn Laravel 4 some time in the future. | |
Re: Can you post some of the table, including the select. | |
Re: Hi, I would hope that you have some PHP knowledge. If so, here is some very basic code to save your uploaded file to the server. You will need to substitute your own $dest value. post-cv-action.php <?php $filename = $_FILES['attachment']['name']; $source = $_FILES['attachment']['tmp_name']; $dest = $_SERVER['DOCUMENT_ROOT'].'/test/'; move_uploaded_file($source,$dest.$filename); ?> | |
Re: It would help if the CSS page were available. | |
Re: Instead of this route, you could allow the user to enter two recipients separated by either a comma or semi-colon - similar to how many email clients work. | |
Re: What is it's purpose in refreshing every 10 seconds? Do you record the amount of times it's reloaded? | |
Re: IF you are emailing the contents of a form. In your form handler:- $this->load->library('email'); $this->email->from('your@example.com', 'Your Name'); $this->email->to('someone@example.com'); $this->email->cc('another@another-example.com'); $this->email->bcc('them@their-example.com'); $this->email->subject($yourFormSubject); $this->email->message($concatOfFormFieldsYouWantToSend); $this->email->send(); | |
Re: What are you trying to achieve? I can understand reloading a page every x seconds, but why would you display a page and then x seconds later reload the page just once? | |
Re: overwrite line 16 (above) with this:- $id = 1000; $key = array_search($id, $cart['data']['product_id']); if($key!==FALSE) { unset($cart['data']['product_id'][$key]); unset($cart['data']['quantity'][$key]); } print_r($cart); die; | |
Re: Using your original code and looking at header in the php.net documentation I've constructed this:- if(file_exists($filename)) { header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.$filename.'"'); readfile($filename); } else { die('not ok'); } | |
Re: You just need to read a little more. Here's one [article](http://www.phphaven.com/article.php?id=65) from a google search. I've picked mysqli rather than mysql as mysql is so last year :-) | |
Re: Are you saying that none of your pages are displaying $_SESSION['username'] ? | |
Re: I saw this blog [article](http://phpixie.com/blog/benchmarking-autoloading-vs-combining-classes-into-a-single-file/) yesterday on a similar topic. | |
Re: Can you post the HTML that you want JavaScript to work with? | |
Re: There's no need for two forms. A single form will suffice. The form handler can redirect based on form information received. ![]() | |
Re: You might need a [css reset](http://www.cssreset.com/). ![]() | |
Re: Is the site available for us to view? | |
Re: No. (now waiting to be corrected:) Do you "own/control" both sites? | |
Re: This is done using JavaScript not PHP. It is "client-side" scripting/programming. | |
Re: 1. There are many evolving technology areas. It is difficult to decide where your focus efforts. JavaScript is a key web technology. Don't start with jQuery (or similar libraries), learn raw JavaScript first. 2. APIs - weather, maps, paypal, amazon, stripe. Google "public apis" | |
Re: I've not tested this but I don't think you need to iterate your selectors to add the keyup event handler. You should be able to use the following code:- $(".txtt").keyup(function() { calculateSum(); }); | |
Re: Are your pages publicly viewable? | |
Re: There are so many ways to play with this. I've used an array to complement the table structure and seeded the array with either text (to display) or 1 (which currently displays a hyphen and if not set increment a counter. <?php $rows = 14; $columns = 5; $ins = … | |
Re: Is there more than one field in the form? ![]() | |
Re: Hi Jack, You're not explaining your problem too well. Looking at the code you have provided there are is no "content", just strings in arrays, which, syntax errors aside, display as expected. | |
Re: In .htaccess Options All -Indexes will turn directory browsing off More on [htaccess](http://perishablepress.com/stupid-htaccess-tricks/#sec3) | |
Re: How do you know which is my timezone? | |
Re: echo '<li><a style="text-decoration :none" href="playerslist.php?id='.$rows['id'].'">'.substr($rows['name'],0,50).'</a></li>'; | |
Re: $(document).ready(function() { clearTextBox(); }); function clearTextBox() { $('#txtName').val = ""; $('#txtContactEmail').val = ""; $('#txtMessage').val = ""; } $('#btnReset').on("click",function() { clearTextBox(); }) | |
Re: select tax+rate as total from table ![]() | |
Re: I would increment 1,2,3 and preprend 000000. If your two columns are numerically in sync, as auto-increment would suggest, then you could use a formula and not have a ref column. | |
Re: If you apply a style of display:inline-block, set the width and add a margin-right or margin-left to the hyperlink tags this should do it. |
The End.