DaveAmour 160 Mmmmmm beer Featured Poster

Possily remove AND Username = '".$user."'";

This is a guess though as I don't know about your db schema, application architecture etc.

DaveAmour 160 Mmmmmm beer Featured Poster

Probably the apostrophe in industry's

DaveAmour 160 Mmmmmm beer Featured Poster

You have posted this 3 times

DaveAmour 160 Mmmmmm beer Featured Poster

How about XML? Or Does Java Support Serialisation?

DaveAmour 160 Mmmmmm beer Featured Poster

Ok weird, maybe DaniWeb is hanunted?

I got an email as below - any ideas?

Email.png

DaveAmour 160 Mmmmmm beer Featured Poster

Just send it to the browser as htm rather than executing it, or debug it if your ide supports debugguing.

DaveAmour 160 Mmmmmm beer Featured Poster

Ok fair enough.

I've got a really busy day now though but look into iterating over the posted form collection and pulling out items starting with a name of "Comment" and then get the row id to update from the end of the form field name eg "Comment_1".

You will execute one SQL statement for each Comment field.

DaveAmour 160 Mmmmmm beer Featured Poster

Ok well you should really be able to get your head around this then.

Are you new to this job?

DaveAmour 160 Mmmmmm beer Featured Poster

Try debugging or outputting the sql statement then it will be easier to disgnose.

DaveAmour 160 Mmmmmm beer Featured Poster

Sorry no I don't have a php development environment setup. Is this for your job or are you a student?

DaveAmour 160 Mmmmmm beer Featured Poster

So how did that have the effect it was having?

DaveAmour 160 Mmmmmm beer Featured Poster

Can you post the entire page or is it online somewhere?

DaveAmour 160 Mmmmmm beer Featured Poster

Your welcome, a nice easy one for a change!

DaveAmour 160 Mmmmmm beer Featured Poster

Any JavaScript in your page?

DaveAmour 160 Mmmmmm beer Featured Poster

You have prodid in your url. You are getting productID though in your code.

DaveAmour 160 Mmmmmm beer Featured Poster

Ok so the problem is when you post this form back you get a load of posted values all with the same name "Comment" - see my screenshot below.

So how do you know which record to update? What you need to do is give your form fields a name which identifies the row - eg Comment_1, Comment_2 etc.

Then you can parse the posted data and for each Comment update the correct record by parsing out the row id.

Does that help?

Fiddler.png

DaveAmour 160 Mmmmmm beer Featured Poster

Ok excellent!

Ok let me take a look...

DaveAmour 160 Mmmmmm beer Featured Poster

Thsi isn't rendered html. It has php code in. Do you understand what rendered html is?

DaveAmour 160 Mmmmmm beer Featured Poster

Ok thanks

DaveAmour 160 Mmmmmm beer Featured Poster

I still feel there may be more instructions than what was posted. We need the poster to confirm or deny this otherwise we cannot talk of facts.

DaveAmour 160 Mmmmmm beer Featured Poster

Because image_id cannot be both 7 and 9 right?

What is it you want to achieve?

Maybe

sql = "SELECT * FROM image_upload WHERE location='article' AND (image_id='7' Or image_id='9')";

DaveAmour 160 Mmmmmm beer Featured Poster

Hi

Dani - I sent you a message and I got an email saying you replied but I have nothing in my Inbox :(

Any ideas?

DaveAmour 160 Mmmmmm beer Featured Poster

It says see section marked TODO. That's not there.

The poster has to settle this disagreement - no point in us speculating about it all day long.

DaveAmour 160 Mmmmmm beer Featured Poster

I creaetd a test article to see how it works and am now ready to create a real one. I can't delete the test one though. Is that functionality not there or can you do it for me please?

I could change all the text in this one for my real one but I'm still left whith a load of uploaded images I don't want.

DaveAmour 160 Mmmmmm beer Featured Poster

Sorry you have misunderstood what I asked for.

If you run your code so you are viewing the other page in your browser and then you view the source - ie the rendered html - then show me that please.

Thanks

DaveAmour 160 Mmmmmm beer Featured Poster

But that is not instructions, that is just a list.

DaveAmour 160 Mmmmmm beer Featured Poster

Ok not sure about that then, sorry :(

DaveAmour 160 Mmmmmm beer Featured Poster

Cool glad it worked.

DaveAmour 160 Mmmmmm beer Featured Poster

I think you can use double buffering - you will need to Google it, its been a while since I did animation.

DaveAmour 160 Mmmmmm beer Featured Poster

It says the instructions are in Quiz.java

"as shown in the instructions in Quiz.java"

DaveAmour 160 Mmmmmm beer Featured Poster

Probably unclosed tag or speech marks.

DaveAmour 160 Mmmmmm beer Featured Poster

I'm back now. Can you show me the rendered html - the view source - this will make it easy for me to explain what you need to do.

DaveAmour 160 Mmmmmm beer Featured Poster

Ok its a bit more complicated that it first appeared then.

I'm off out now,might be able to help later. Meanwhile maybe someone else cn help?

DaveAmour 160 Mmmmmm beer Featured Poster

Ok thought so.

So when you post back, you need to update all comments right? It looks like you are just running one sql statement at the moment right?

DaveAmour 160 Mmmmmm beer Featured Poster

Does this form render multiple rows with multiple comment boxes?

DaveAmour 160 Mmmmmm beer Featured Poster

You have records in the table?

DaveAmour 160 Mmmmmm beer Featured Poster

Something like this I think?

$sql="UPDATE customer SET COMMENT='$_POST[COMMENT]' WHERE MSISDN= '$_POST[MSISDN]';"

DaveAmour 160 Mmmmmm beer Featured Poster

echo your $sql to see what it actually is.

DaveAmour 160 Mmmmmm beer Featured Poster

Print out your sql statement and if it looks ok would be a good place to start.

I don't do PHP but the Where statement looks suspicious to me.

DaveAmour 160 Mmmmmm beer Featured Poster

If you want us to do your homework you could at least post the homework instructuions.

DaveAmour 160 Mmmmmm beer Featured Poster

Apologies I just realised I gave a php link - don't know why I did that. Fortunatley languages are so simillar that my answer is right anyway!

DaveAmour 160 Mmmmmm beer Featured Poster

You will hate it at first, then find it tolerable then you will love it!

Do try putting this on though as it will give you an easier transition:

http://classicshell.net/

DaveAmour 160 Mmmmmm beer Featured Poster

PS - here are some explanations: http://www.w3schools.com/php/func_math_ceil.asp

DaveAmour 160 Mmmmmm beer Featured Poster

Try using Math.round instead

DaveAmour 160 Mmmmmm beer Featured Poster

It varies considerably depending on how long someone stares at the screen before entering something.

Try starting a timer on line 9 and finishing it on line 24 and seeing how long it takes that way. The trouble with that is that by measuring the code you are changing the code. It will give you a rough idea though.

Also the time varies depending on the input given.

DaveAmour 160 Mmmmmm beer Featured Poster

void is a return type. In programming languages methods or functions may return something. What type of data they return is usually specified in the method signature. If they don't return anything then void can be used to signify this.

C++ types can easily be found on many website such as http://www.tutorialspoint.com/cplusplus/cpp_data_types.htm

DaveAmour 160 Mmmmmm beer Featured Poster

Is this WinForms, WPF, WebForms, MVC?

DaveAmour 160 Mmmmmm beer Featured Poster

You can try with a cable or maybe even buy a usb network adapter such as:

http://www.ebuyer.com/262952-tp-link-tl-wn822n-wireless-n300-high-gain-usb-adapter-tl-wn822n

DaveAmour 160 Mmmmmm beer Featured Poster

If you do decide to try Asp.net then don't bother with WebForms, go straight for MVC would be my advice.

DaveAmour 160 Mmmmmm beer Featured Poster

Or maybe you could increase that 5000 limit just a little :)