-
Posts
158 -
Joined
-
Last visited
Everything posted by titan21
-
I didn't look into this in too much detail but am thinking this may help... http://www.peej.co.uk/projects/phphttpdigest.html
-
problem sending output to a browser while php script is running
titan21 replied to kevinkhan's topic in PHP Coding Help
You'll need to this with Javascript or if you're feeling brave AJAX - I'd stick with Javascript to begin with tho! -
I don't want to say that I am 100% sure but I don't think this is possible. PHP is an interpreted language so it is never compiled, (Please - anyone correct me if I am wrong!) You could however, create a script using PHP on the command line to execute the script. You running Windows/*nix?
-
Advice on how to check for duplicate results in query
titan21 replied to sfraise's topic in PHP Coding Help
Not sure I am totally understanding you but you could amend your SQL to include "LIMIT 1" so that it only returns one record. P.S - I think this thread needs to be moved to SQL Help - but I'm not sure how to do that! -
If you absolutely need to splice your pHP with your HTML, then place ob_start() as the first line of PHP code, above your HTML DOCTYPEs etc and then the last statement, after everything else, should be ob_flush().
-
Ha ha! I obviously wasn't paying attention - yeh AbraCadaver is right - u don't need that HTML!
-
Try ob_start() and ob_flush() - this will stop anything being sent to the browser before the request completes http://uk3.php.net/manual/en/function.ob-start.php
-
It won't show up in the source since it's the DOM that is being manipulated - not the source. That said, you can still access the element as normal through Javascript. I've attached two files for general_particulars2.php and vessal_of_owner.php with some slight amendments. Basically when "imono2"'s value changes you will see an alert showing the value which shows that "imono2" can still be accessed. If you use Chrome - you can use that to see what has been generated after an AJAX call. Firebug in Firefox does the same thing. [attachment deleted by admin]
-
No worries - I've been asleep too!! Okay - first thing I noticed is that in "general_particulars2.php", you are trying to set the InnerHTML of an element called "imono" but I couldn't see this in your markup? I get an error stating that the Javascript is trying to set the property of a null object. Which element are you trying to alter?
-
Trouble when procesing the text input values with ajax.
titan21 replied to morfasto's topic in Javascript Help
Did u amend the Javascript as I mentioned? Just one thing - when I mention "url" - I obviously mean that you substitute this with wherever add_comment.php is located. -
Trouble when procesing the text input values with ajax.
titan21 replied to morfasto's topic in Javascript Help
Um - hopefully this will help: 1. In your AJAX, you have used: ajax.open("POST", data); it should be: ajax.open("POST", url); also you have used: ajax.send(null) when it should be: ajax.send(data) You should be sending data when it;s a POST with ajax.send Wanna try that and let me know how you get on? -
Trouble when procesing the text input values with ajax.
titan21 replied to morfasto's topic in Javascript Help
Are you getting Javascript errors? Using Firebug in Firefox or Chrome may be able to help? -
Hopefully I am understanding this a little more - is "inono" a <select> element? In which case - the root <select> element is not being replaced, only the contents between <select> and </select> is being replaced. Could you try surrounding that entire area with a <div> and use that to change the contents? If you attach all the relevant files - I'll test it on my server and let you know what I find out - easiest way I think!
-
Trouble when procesing the text input values with ajax.
titan21 replied to morfasto's topic in Javascript Help
Can you output the result of print_r($_POST) This will check if anything is actually being POST'ed. -
No worries - could you mark this thread as solved as a favour?
-
No problem! Bit difficult since I'm not there to help - but we'll get there (I hope!)
-
Trouble when procesing the text input values with ajax.
titan21 replied to morfasto's topic in Javascript Help
You need to put them in quotes: $_POST['id'] etc... -
Okay - can you clear your cookies and reload the page? Also - can you check that the session directory is writeable by the web server?
-
Try <?php $id = "123456789"; $pass = "bach"; $query = "DELETE FROM my_form WHERE member = ('$id') && password = ('$pass')"; $result = mysql_query($query); $affected = mysql_affected_rows(); if($affected == 0) { //nothing was deleted } else { //something was deleted } ?>
-
Okay - first order of business is sorting out the session errors. Does the path /home/a3443899/temporary/sessions/ exist on your server? If so, is there anything in there? I know this doesn't seem to be related to your initial issue, but sorting out other errors usually results in shedding light on your original query.