Posts
 
Reputation
Joined
Last Seen
Ranked #425
Strength to Increase Rep
+8
Strength to Decrease Rep
-2
94% Quality Score
Upvotes Received
48
Posts with Upvotes
41
Upvoting Members
36
Downvotes Received
4
Posts with Downvotes
4
Downvoting Members
3
11 Commented Posts
~119.01K People Reached

197 Posted Topics

Member Avatar for dean.ong.14
Member Avatar for Dani

Just came across my first daniweb google hit. Searched on "Coldfusion wamp" past year. 8th link on page.

Member Avatar for j.khurram
11
5K
Member Avatar for paulkd

...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 …

Member Avatar for NaReSh_12
1
11K
Member Avatar for James_43

Hi James, I think your second listing should actually be coded:- $listing = [ 'one' => $x, 'two' => $y, 'three' => $z ];

Member Avatar for James_43
0
196
Member Avatar for James_43

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' => …

Member Avatar for James_43
0
333
Member Avatar for James_43

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 …

Member Avatar for paulkd
0
265
Member Avatar for Firmace

<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; …

Member Avatar for diafol
0
1K
Member Avatar for giao.can

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

Member Avatar for Mashetty
0
5K
Member Avatar for phfilly
Member Avatar for gcardonav
Member Avatar for dhani09
Member Avatar for DaveyMoyes

Hi, Syntax error :-) `setTimeout(function(){alert("my message");location.replace("/new-page.php");},1000);`

Member Avatar for anitha407
0
6K
Member Avatar for david.roun.7_1

<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>

Member Avatar for david.roun.7_1
0
235
Member Avatar for yankeefan24

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 …

Member Avatar for danarashad
0
318
Member Avatar for kanoy83
Member Avatar for <M/>
Member Avatar for ashutosh08
0
211
Member Avatar for Mok858
Member Avatar for NextCom
Member Avatar for dheerajvermawd

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); ?>

Member Avatar for paulkd
0
279
Member Avatar for Sanjay_6
Member Avatar for laura301019

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.

Member Avatar for EvolutionFallen
0
114
Member Avatar for ehpratah

What is it's purpose in refreshing every 10 seconds? Do you record the amount of times it's reloaded?

Member Avatar for ehpratah
0
361
Member Avatar for Edwin_2
Member Avatar for davy_yg

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();

Member Avatar for davy_yg
0
327
Member Avatar for Waado

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?

Member Avatar for JorgeM
0
1K
Member Avatar for klemme

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;

Member Avatar for paulkd
0
3K
Member Avatar for sruthisru

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'); }

Member Avatar for paulkd
0
243
Member Avatar for BadManSam

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 :-)

Member Avatar for Derice
-1
421
Member Avatar for kelley82879
Member Avatar for msz900

Are you saying that none of your pages are displaying $_SESSION['username'] ?

Member Avatar for jkon
0
304
Member Avatar for cgull

I saw this blog [article](http://phpixie.com/blog/benchmarking-autoloading-vs-combining-classes-into-a-single-file/) yesterday on a similar topic.

Member Avatar for jkon
0
219
Member Avatar for prnjn
Member Avatar for dean.ong.14

There's no need for two forms. A single form will suffice. The form handler can redirect based on form information received.

Member Avatar for diafol
0
180
Member Avatar for yaragalla_mural
Member Avatar for judah.raine
Member Avatar for corestaples
Member Avatar for urbanthistleuk

This is done using JavaScript not PHP. It is "client-side" scripting/programming.

Member Avatar for urbanthistleuk
0
220
Member Avatar for best4earn

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"

Member Avatar for paulkd
0
215
Member Avatar for Nadera

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(); });

Member Avatar for paulkd
0
299
Member Avatar for designershiv
Member Avatar for techxaidz

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 = …

Member Avatar for techxaidz
0
390
Member Avatar for flynismo
Member Avatar for Lonestar Jack

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.

Member Avatar for Lonestar Jack
0
527
Member Avatar for mutago

In .htaccess Options All -Indexes will turn directory browsing off More on [htaccess](http://perishablepress.com/stupid-htaccess-tricks/#sec3)

Member Avatar for paulkd
0
330
Member Avatar for patk570
Member Avatar for sabarinadh.ch

echo '<li><a style="text-decoration :none" href="playerslist.php?id='.$rows['id'].'">'.substr($rows['name'],0,50).'</a></li>';

Member Avatar for sabarinadh.ch
0
167
Member Avatar for gahhon

$(document).ready(function() { clearTextBox(); }); function clearTextBox() { $('#txtName').val = ""; $('#txtContactEmail').val = ""; $('#txtMessage').val = ""; } $('#btnReset').on("click",function() { clearTextBox(); })

Member Avatar for gahhon
0
289
Member Avatar for Indians
Member Avatar for Indians

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.

Member Avatar for paulkd
0
237
Member Avatar for davy_yg

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.

Member Avatar for Nmalik1
0
119

The End.