98 Posted Topics

Member Avatar for Sanchixx

If the file that is being 'got' by file_get_contents() has the extension '.txt' will the server parse the file as PHP? Change '.txt' to '.php' and see if it helps. If you want to keep the extension as .txt, and still have the file parsed by the server, you could …

Member Avatar for Sanchixx
0
570
Member Avatar for dancks

I see no reference to "%i" in the [manual](http://uk1.php.net/manual/en/function.sprintf.php).

Member Avatar for radow
0
376
Member Avatar for freakvista

`if($_POST['var']){`if there is no post[var] defined, I get the undefined index error. `if(isset($_POST['var'])){`I get no error. Also in this case I think the [ternary if](http://davidwalsh.name/php-shorthand-if-else-ternary-operators) syntax would be useful: `<?php echo (isset($_POST['email']) && empty($success)) ? $_POST['email'] : "";?>`

Member Avatar for freakvista
0
176
Member Avatar for tapuwa2002

[file_get_contents()](http://uk1.php.net/manual/en/function.file-get-contents.php) to get the whole csv file into a string. [explode()](http://uk1.php.net/manual/en/function.explode.php) the string on new line character giving many single $line strings. foreach loop through all $lines: [explode()](http://uk1.php.net/manual/en/function.explode.php) the $line on ',' into $pieces foreach loop through $pieces. if first $piece of line, check value: if holds value like "Product …

Member Avatar for LastMitch
0
928
Member Avatar for mpc123

You need to use a while loop: while ($row = mysql_fetch_assoc($result)){ //echo your HTML } http://uk1.php.net/manual/en/function.mysql-fetch-assoc.php

Member Avatar for LastMitch
0
210
Member Avatar for mogaka

Is this a JQuery issue? I noticed in JQuery mobile that pages are not truly loaded, and any GET vars are lost because the pages are loaded by ajax. Also this is a JQuery dialog that he is trying to pass the ID to I think. It seems the OP …

Member Avatar for adam.adamski.96155
0
106
Member Avatar for Khav

I think you need this function: http://uk1.php.net/manual/en/function.str-replace.php

Member Avatar for diafol
0
2K
Member Avatar for pawan768

Look here: http://www.php.net/manual/en/ref.filesystem.php specifically `fopen()`

Member Avatar for adam.adamski.96155
0
119
Member Avatar for arcticM

If the browser is navigating to a pdf file, it will probably try to open it with the browser plug-in unless the browser's own config tells it to pass the file to the system default application. If you offer the browser the file for download, I imagine the user will …

Member Avatar for adam.adamski.96155
0
333
Member Avatar for Mikesmusings

I would highly recommend sanitising the data before input, using an if test to check $_POST exists before any DB operations, taking the post vars and assigning to new variables. I don't think '$_POST[key]' is going to parse correctly either: $name = mysql_real_escape_string(trim($_POST['name'])); $address = mysql_real_escape_string(trim($_POST['address'])); $sql = "INSERT INTO …

Member Avatar for Mikesmusings
0
382
Member Avatar for Khav

PHP is not like Javascript, it is parsed by the server before the script is loaded in the browser. Once the page is loaded, PHP is finished until the next script load. If you want PHP to do anything in response to user input/action, you need to collect data using …

Member Avatar for Khav
0
3K
Member Avatar for guig

Your code looks good to me, I have read it all through and can't see any mistakes. I replicated your list of checkboxes and ran it and it works fine, returning an array because you named the elements with [] (unlike the poster above). How are you testing the value …

Member Avatar for simplypixie
0
261
Member Avatar for mcafeeza

Sorry if I am patronising, but are you sure your server supports short tags (line 120)? `<?= "blah blah" ?>` won't work on some servers, `<?php echo "blah blah"; ?>` works on all. Can we see the page?

Member Avatar for mcafeeza
0
1K
Member Avatar for Priti_P

http://php.net/manual/en/function.xml-parse.php I think the second user contributed note (Ashok dot 893 at gmail dot com) might be what you are looking for.

Member Avatar for Priti_P
0
2K
Member Avatar for StephenopolousINC

Hey there, you want to use the audio tag? I had a play with the w3schools page try-it: http://www.w3schools.com/tags/tag_audio.asp Using the editor I used this code - <!DOCTYPE html> <html> <body> <audio autoplay="true"> <source src="horse.ogg" type="audio/ogg"> <source src="horse.mp3" type="audio/mp3"> Your browser does not support the audio element. </audio> </body> </html> …

Member Avatar for StephenopolousINC
0
335
Member Avatar for double_cola

How are you stumped? What did you try? If you use a select menu for the choosing of the .pdfs to be merged, and a submitted form to carry the choices to a processing function it's relatively simple. You need to use javascript for the drag and drop, and to …

Member Avatar for adam.adamski.96155
0
2K
Member Avatar for moon786

If you click on one of the topics in this forum and start to type a response, and then try to navigate away from the page using the browser's back button, a javascript alert pops up verifying that you want to leave the page or stay on the page. Maybe …

Member Avatar for adam.adamski.96155
0
92
Member Avatar for ratanji

So the new row is inserted before the page is built, and PHP writes the result (success/failure) to a hidden form element. Use <body onload=""> to activate a javascript fucntion that shows the image for desired amount of time. Or use ajax to insert data via a separate php file …

Member Avatar for rayidi
0
703
Member Avatar for markee

It's possible using Javascript. Add the onblur event to the text box and attach it to a function that replicates the textbox value in the textarea.

Member Avatar for markee
1
87
Member Avatar for andyy121

It means that for each search for love that exploded in our faces, there is love searching for each of us.

Member Avatar for Bachu
-1
102
Member Avatar for holosoft

Ok, but both IF statements have the same OR clause (!== ''). Which, if evaluates to TRUE will mean your other condition (!isset) isn't tested.

Member Avatar for LastMitch
0
129
Member Avatar for geneh23
Member Avatar for LastMitch
0
232
Member Avatar for Diogo Martinho

I wrapped your code in an ajax function, and made the xml file, and it alerted Ben on all three browsers (IE, FF, Chrome) - http://www.zigstum.com/randoquote/dani.php Do you have no error console to debug javascript?

Member Avatar for adam.adamski.96155
0
206
Member Avatar for johnef_sh

> the Email don't go at all to the users Does this mean that no users ever get an email? Or does it mean that not all users get a mail, but some users get a mail?

Member Avatar for johnef_sh
0
254
Member Avatar for david.f.smith.351
Member Avatar for adam.adamski.96155
0
1K
Member Avatar for pawan768
Member Avatar for adam.adamski.96155
0
88
Member Avatar for arcticM

Hmm, that's interesting :D I'm sure there are better ways, but I would log the user's IP Address and browser agent on login either in a DB, a session variable or in a separate text file, and every time they try to perform an action, check to see if they …

Member Avatar for adam.adamski.96155
1
114
Member Avatar for ratanji

php might be involved but to display something on page for a few seconds is a task for javascript so maybe you need to start this thread in that forum to get the best chance of a relevant and timely answer i also recommend using punctuation in your post as …

Member Avatar for adam.adamski.96155
0
132
Member Avatar for bradly.spicer

Hey there, you really need to learn this step by step. The first page is the form page that allows the user to select the file that is to be deleted. This page will have a submit button which when clicked will redirect to the URL specified in the action="delete.php" …

Member Avatar for adam.adamski.96155
0
218
Member Avatar for geneh23

You can search google for 'beginner PHP tutorial'. The first result is the 'simple tutorial' on php.net website. If that is too hard, you need to grow your brain :D Good luck!

Member Avatar for diafol
0
543
Member Avatar for ismael ahm@d

Line 30: $query = 'INSERT INTO country_wise_products (coutry_id, product_id) VALUES '; should be country_id (the 'n' is missing from country). But why no error to screen (unknown column)? Is there a file error_log in the folder you are running the scripts?

Member Avatar for ismael ahm@d
0
9K
Member Avatar for maori
Member Avatar for tonyfonseca

The table opening tags, the header cells and the table closing tags need to be moved outside the while loop.

Member Avatar for tonyfonseca
0
3K
Member Avatar for austenr

I think the 'wages' the error message refers to is the $_POST['wages']. The **key** ('wages'), as the error states, does not exist in the $_POST array. <?php $errorcount=0; //add the following line to see if the $_POST array exists and what it contains. print_r($_POST); $wages=$_POST['wages']; $hours=$_POST['hours'];

Member Avatar for simplypixie
0
131
Member Avatar for Alochai

I did the same thing that you are trying to acheive by using a function in an includes file that would work out and set a few page variables on page load just as Arctic said. It's not the browser that looks for either .php or .html, it's the webserver …

Member Avatar for Alochai
0
332
Member Avatar for edsweng

I think the OP wants to know if he can store a PHP variable and a text string, in the mysql field. Presumably so that when he selects the data from the dbase, PHP parses the variable and changes it for the current date.

Member Avatar for edsweng
0
112
Member Avatar for vishalonne

I would guess that on line 38 of confirmation.php it says 'mysqli_stmt->' instead of '$mysqli_stmt->', but it would be better to see the file that gives the error.

Member Avatar for adam.adamski.96155
0
221
Member Avatar for anna.piperides

Anna, it's hard to work out what you actually want to achieve. It seems to me that you want to grab the selected size from the add to basket page and then carry that size onto the basket page and show it there also. In which case, you simply need …

Member Avatar for anna.piperides
0
164
Member Avatar for vizz

I think what Bachov is suggesting is that you have the file onlineand available for download, and you put the URL to the file into the body of the email. This is certainly the simplest way, but if you really want to send the file as an attachment these are …

Member Avatar for vizz
0
155
Member Avatar for apanimesh061

You need to use the string functions of php - http://php.net/manual/en/ref.strings.php - specifically, strpos, strlen, substr. Is this '$html->find('li') method part of a defined class? I think javascript is more suited to looping through DOM elements and grabbing the href location.

Member Avatar for adam.adamski.96155
0
97
Member Avatar for yeeitsneo

Can you not echo any errors to the screen? $sql = "INSERT into test (idnum,title,content) VALUES ('$id','$title','$content')"; if (!$resulta = mysql_query($sql)){ echo mysql_error(); die(); } If not, can you not read the error log?

Member Avatar for HunainHafeez
0
221
Member Avatar for daniel36

You can use Javascript to capture the onlcose event of the window and request that a user logs out properly, look at this page for instructions: http://royaltutorials.com/javascript-popup-onclose/ Also, you can have another field in your DB that records the time of the last action of the logged in user, and …

Member Avatar for daniel36
0
115
Member Avatar for doha786

The problem is with the `$_GET['error']` variable - in one place it is `$_GET` in the next palce it is `$GET` without the underscore. You need the underscore in both instances, `$GET` is not the same as `$_GET`. Also you *can* send the message via the URL (the get method), …

Member Avatar for doha786
0
268
Member Avatar for david.f.smith.351

`$your_email ='<" .$_GET['ID']. ">';` Your mistake was to mix the double and single quotes - `"<" .$_GET['ID'] .">"` works, and so does `'<' .$_GET['ID'] .'>'`, but not the mixture that you have. You really need to learn how to concatenate strings as you have to do this very often in …

Member Avatar for adam.adamski.96155
0
485
Member Avatar for david.f.smith.351

$data_email_sender->AddToAddr("name<" .$_GET['ID']. ">"); You don't need to echo the GET var as you are already in a PHP block. Or for tidiness, you can build the string separately - $str = "name<"; $str.= $_GET['id']; $str.= ">"; $data_email_sender->AddToAddr($str); Hope this helps.

Member Avatar for adam.adamski.96155
0
462
Member Avatar for hiyatran

Look at the fopen() and fwrite() functions: http://uk.php.net/manual/en/function.fopen.php / http://uk.php.net/manual/en/function.fwrite.php

Member Avatar for LastMitch
0
147
Member Avatar for Dendei

You have $**c**lient: $client = new SoapClient("http://localhost:8731/phpwcf/?wsdl"); and $**C**lient: $response = $Client->ENtoJP($args);

Member Avatar for adam.adamski.96155
0
715
Member Avatar for rotten69

The empty form action will leave the action as the current page, like using $_SERVER['PHP_SELF'] and will make no difference to header("Location:index.php"). I replicated your setup: <form name="form" method="post" action=""> <input name="submit" type="submit" value="submit"><form> on one page, and <?php if(isset($_POST)){ header("Location:newpage.php"); die(); } ?> on the included page, and it …

Member Avatar for adam.adamski.96155
0
208

The End.