Skip to Content Skip to Menu

PROBLEM: IN THE TAB PROFILE-EDIT " WE TRYING UPDATE OUR FIELD OF OUR DATABASE AND WE CAN'T UPDATE WITH OUR CODE AJAX " IN TAB PROFILE-VIEW WORKS FINE MY CODE.

  • simios
  • simios
  • OFFLINE
  • Posts: 10
  • Thanks: 0
  • Karma: 0
9 years 11 months ago - 9 years 11 months ago #255347 by simios
Hi everyone.

We are trying update a field of our database but we can't update in the tab profile-edit with our ajax code.

The problem is this view that has relations of the profile edit and we can't update our field of our database.

We are using ajax and php to update the field of our database.

The connection in the file php:

<?


$tronchoO=$_POST;
$user_id=$_POST;

echo $tronchoO;

if($tronchoO){
mysql_connect("localhost","user","password") or die (mysql_error());
mysql_select_db("simio548_joom126") or die (mysql_error());
mysql_query("UPDATE jos_comprofiler SET oferta = '$tronchoO' WHERE jos_comprofiler.user_id = '$user_id'");
mysql_close();
}

?>

someone know because we can't update our field of our database :unsure: In the profile edit only in the profile view works fine our code.


We find this form action of the file " comprofiler.html.php ":
<form action=" simiostechnologysoftware.com/index.php/areaclientes/profile-view " method="post" id="cbcheckedadminForm" name="adminForm" enctype="multipart/form-data" class="cb_form" autocomplete="off">

We don't know use this form action but with this file [comprofiler.html.php] we can update one time my BBDD because we added our code of php to update a field inside our data base. the issue is we have another form action created with ours and the template bootstrap created a button to submit and my first button to submit redirection with this button of bootstrap.

We need know how use this form action or we try know the same rules or relations to try update our field in our database in the view proflie edit






We have checked a .pdf of API but someone know if this attachment work well to me :(

cbapi_0.006 only administrator has space to attach this document
Last edit: 9 years 11 months ago by simios.

Please Log in or Create an account to join the conversation.

  • simios
  • simios
  • OFFLINE
  • Posts: 10
  • Thanks: 0
  • Karma: 0
9 years 11 months ago #255349 by simios
Hola a todos.

Tenemos un problema cuando usamos la vista Editar perfil(profile-edit).
Usamos lenguajes Ajax,js y php.

Cuando utilizamos nuestro codigo en esta vista Editar perfil(profile-edit) para actualizar un campo de nuestra base de datos no nos deja actualizarlo.

Si nosotros utilizamos la vista " perfil vista"(profile-view) y utilizamos el mismo codigo con el mismo php esto funciona.


Creemos que hay alguna relacion de la pestaña padre y por eso no nos deja.

codigo php :

<?


$tronchoO=$_POST;
$user_id=$_POST;

echo $tronchoO;

if($tronchoO){
mysql_connect("localhost","simio548_b1t0","stssl322") or die (mysql_error());
mysql_select_db("simio548_joom126") or die (mysql_error());
mysql_query("UPDATE jos_comprofiler SET oferta = '$tronchoO' WHERE jos_comprofiler.user_id = '$user_id'");
mysql_close();
}

?>


Tambien tenemos un problema con una redireccion o puede resolver nuestro problema si sabemos utilizar este form action y aplicarlo al codigo:

<form action=" simiostechnologysoftware.com/index.php/areaclientes/profile-view " method="post" id="cbcheckedadminForm" name="adminForm" enctype="multipart/form-data" class="cb_form" autocomplete="off">

Esto se ha sacado del archivo comprofiler.php.html

En mi codigo tengo un form action creado por mi en un boton para que actualice mi campo de la base de datos pero interfiere con el boton actualizar de la plantilla bootstrap pero solo el primer boton el segundo me redirecciona a mi archivo php pero no me actualiza mi campo por la relacion.Estos botones estan metidos atraves del tab management en la parte que te deja editar.

comprofiler.php.html:
He conseguido meter mi codigo php pero necesito saber como hago otro form action como este:

<form action=" simiostechnologysoftware.com/index.php/areaclientes/profile-view " method="post" id="cbcheckedadminForm" name="adminForm" enctype="multipart/form-data" class="cb_form" autocomplete="off">

o saber la relacion para actualizar un campo desde la vista Editar perfil (profile-edit)

Siento la parrafada espero haberme explicado mejor :(

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
9 years 11 months ago #255352 by nant
Hi and thanks for posting.

First comment - all caps in your title just makes things unreadable and discourages people from reading.

Second comment - please do not send me a private message as a follow-up for support. Give people time to help you. These are open and free forums that are driven by community members wishing to help themselves.

If you want CB Team members to reply to your posts then consider purchasing a paid membership so you can post on the paid forums.

Also when posting give version numbers of your installation - people will not help if your information is incomplete and most people will not even ask follow-up questions - they will just give up and try to help someone else.

I did read your posts and your PM.

If I understood correctly you are seeking help with some code you wrote?

I am not a coder, so I do not know what you did right or wrong.

But I do not think you can do ajax edits on a form.

We do have a plugin CB Core Fields Ajax that lets you do frontend inline editing of profile fields in profile view. It is part of the Professional membership.

Please Log in or Create an account to join the conversation.

  • simios
  • simios
  • OFFLINE
  • Posts: 10
  • Thanks: 0
  • Karma: 0
9 years 11 months ago - 9 years 11 months ago #255419 by simios



Hi,

We bought the version 1.9.1. Now we are finishing our page web to win money to buy another time your software because our need the plugin of the credit cards without holes or to have the best upgrade without doors behind. because the law in my country Spain is very hard.


But we are two students and is difficult to pay all without benefits (server,cbsubs,b4a,SSL) and is difficult in these years.

Thanks to answer.

My question is we created tabs with community builder and these tabs have two views.

1- Point view is for a user without register with the name of the point profile-view this view contains fields delimiters.

2- Point view is for a user that have register with the name of the point profile-edit this view contains Tab managements.


Issues of my code in this point of view with the name profile-edit is when we added our code Ajax and php to update the field our database because in this view we think have relations or rules to update a field of our database with name jos_comprofiler.


This issue doesn't appear in the other point of view with the name profile-view.


Could someone help me with this issue.?


Sorry for the problems created, next time we will wait the answers and thanks for the letter because we never wrote in a forum and sorry for me English and my descriptions of the issues is very difficult describe this situation without knowledge of cb_subs.
Attachments:
Last edit: 9 years 11 months ago by simios.

Please Log in or Create an account to join the conversation.

  • simios
  • simios
  • OFFLINE
  • Posts: 10
  • Thanks: 0
  • Karma: 0
9 years 11 months ago #255442 by simios
Someone know this [form action], what is doing? :huh:

<form action=" simiostechnologysoftware.com/index.php/areaclientes/profile-view " method="post" id="cbcheckedadminForm" name="adminForm" enctype="multipart/form-data" class="cb_form" autocomplete="off">
<input type="hidden" name="id" value="588">
<input type="hidden" name="task" value="saveUserEdit">
<input type="hidden" name="cbsecuritym3" value="cbm_2e70a00b_324a5df9_4995d092be5c429d93945b1807dfafc8">


<input type="hidden" name="id" value="588"> --> id of the user

<input type="hidden" name="task" value="saveUserEdit"> --> we think is another value or string pass to change the field of the data base


<input type="hidden" name="cbsecuritym3" value="cbm_2e70a00b_324a5df9_4995d092be5c429d93945b1807dfafc8"> --> we think this is the relation we commend before


Please help us someone

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
9 years 11 months ago #255462 by nant
Sorry, it is extremely difficult to understand what you are asking and what your issue is.

Even the screenshots do not help.

If you have upgraded to CB 2.0 make sure all your CB add-ons have also been updated based on this article:
www.joomlapolis.com/cb-20-addon-status

If you are still on CB 191, then make sure that all your tabs and CB Plugins are published Public.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum