Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

help on ajax calling php function


shiningc

Recommended Posts

Hi guys, I am new to this ajax idea and read a lot of tutorials, but I haven´t find what works for me.

 

Basically, I need a button (in let´s say product_info.php) whose onclick will call up a php-and-mysql function.

 

I would like to have my ajax function in product_info.php call a php-and-mysql function *inside* the same product_info.php.

 

I don´t really like the idea presented in most tutorials, where a new php file is created, because:

(1) the user of my shop can access this php file since it´s linked to the button, and

(2) I tried but have errors connecting to database even with correct username, password, etc.

 

If anyone has a better and more simple idea than ajax, please let me know!! Thanks in advance!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...