0

I've been working on a dynamic webpage that uses quite a bit of jQuery. I'm going to give my users the ability to post short messages similar to Facebook or Twitter and I want to use PHP/mySql to do so. So while most of the page will be written in Javascript/jQuery, I will have a div positioned on the side displaying a Facebook like status feed.

My question is this...Is it ok to readily mix PHP and jQuery/Javascript or will this lead to problems?

I'm fairly new to programming so I thought I would ask

2 Answers 2

2

Yes, that is perfectly fine, and in some situations a perfect solution, combined the powers of both.

Good to remember: Never trust the input of javascript (clientside data), it can always have been altered to mess up your website. BUt the same for for plain'ol'inputs.

To give you an example right here in SO, when someone votes, you will see the 1-up aswell-> ajax.

Sign up to request clarification or add additional context in comments.

1 Comment

As being as the OP is looking to use mysql, you should have referenced this link about SQL Injections
0

Its not a problem at all. Look into AJAX, as its designed to do exactly what you're trying to do: communicate from Client to Server in the background. This way you don't have to load a page just to send/receive data to/from the server.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.