Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8797903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:57:09+00:00 2026-06-13T23:57:09+00:00

Ive been trying to create a form that save the info in my database…

  • 0

Ive been trying to create a form that save the info in my database… sounds pretty easy but I have messy documentation (or I am not so smart), I just want to send some parameters on my submit, in the other side catch them and save some info at the database….

So, I did this:

in my component/views/myview/tmpl/default.php I wrote this:

<form action="index.php">
<input type="submit" value="test" />
</form>

Then, I went to my file view.html.php on /mycomponent/view/component/view.html and I do this:

$this->get('SaveClient');

and in my model I did this (only for trying):

public function getSaveClient(){

  $query ="
      Insert into client ( `id_client` ,`test`)
      VALUES 
      (NULL , '1')
  ";
  $db = & JFactory::getDBO();
  $db->Execute($query);
}

But still.. doesnt work, any idea how to make it work??

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:57:10+00:00Added an answer on June 13, 2026 at 11:57 pm

    You haven’t defined the table name correctly. It should be #__tablename. Once you have tried this and it still doesn’t work, try using the following code below instead.

    public function getSaveClient($test){ 
        $db = JFactory::getDBO();
        $data = new stdClass();
        $data->id_client = null;
        $data->test = $test;
        $db->insertObject( '#__tablename', $data, 'id_client' );  
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to create a database of equations that my windows form application
i've been trying to create a vb6 code that will randomize 10 questions but
i am trying to create a fade effect with the following...ive been told im
I've been trying to create a dynamically named JSON property but I keep hitting
I've been trying to create a script for myself that will allow me to
I'm trying to create a web form that contains checkboxes, among other input elements,
I've been trying to create my own custom LiveValidation ( LiveValidation.com ) function that
I'm playing around with MVC3 and trying to create a simple contact form that
So, I've been trying to create a record.however I created it successfully but the
I'm trying to create a form that will create a table of pricing for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.