Login     Sign up
Jcow Master (@falcone)
113 months ago
499 Views

file: includes/libs/account.module.php
function index

Original code
[code]
if (sql_update($newacc,tb().'accounts')) {
sql_query("update ".tb()."accounts set var1='{$_POST['var1']}',var2='{$_POST['var2']}',var3='{$_POST['var3']}',
var4='{$_POST['var4']}',var5='{$_POST['var5']}',var6='{$_POST['var6']}',var7='{$_POST['var7']}' where id='{$client['id']}' ");
[/code]

for 8 fields
[code]
if (sql_update($newacc,tb().'accounts')) {
sql_query("update ".tb()."accounts set var1='{$_POST['var1']}',var2='{$_POST['var2']}',var3='{$_POST['var3']}',
var4='{$_POST['var4']}',var5='{$_POST['var5']}',var6='{$_POST['var6']}',var7='{$_POST['var7']}',var8='{$_POST['var8']}' where id='{$client['id']}' ");
[/code]
for 9 fields

[code]
if (sql_update($newacc,tb().'accounts')) {
sql_query("update ".tb()."accounts set var1='{$_POST['var1']}',var2='{$_POST['var2']}',var3='{$_POST['var3']}',
var4='{$_POST['var4']}',var5='{$_POST['var5']}',var6='{$_POST['var6']}',var7='{$_POST['var7']}',var8='{$_POST['var8']}' ,var9='{$_POST['var9']}' where id='{$client['id']}' ");
[:/code]

file: includes/libs/ss.inc.php
function newss

[code]
if ($parr[0] != 'account' && $parr[0] != 'member') {
if (!strlen($client['fullname']))
redirect('account/index/1');
for($i=1;$i<=7;$i++) {
$col = 'var'.$i;
$key5 = 'cf_var_required'.$i;
$required = get_gvar($key5);
if ($required) {
if (!strlen($client[$col]) && !allow_access(3)) {
redirect('account/index/1');
}
}
}
}
[/code]

change 7 to 8 or 9 (or 10,......)

1 people followed this question
0

I put this code to 15 questions:

if (sql_update($newacc,tb().'accounts')) {
sql_query("update ".tb()."accounts set var1='{$_POST['var1']}',var2='{$_POST['var2']}',var3='{$_POST['var3']}',
var4='{$_POST['var4']}',var5='{$_POST['var5']}',var6='{$_POST['var6']}',var7='{$_POST['var7']}',var8='{$_POST['var8']}' ,var9='{$_POST['var9']}'
var10='{$_POST['var10']}',var11='{$_POST['var11']}',var12='{$_POST['var12']}',var13='{$_POST['var13']}',var14='{$_POST['var14']}' ,var15='{$_POST['var15']}'
where id='{$client['id']}' ");

This error:

SQL query error!
Error infomation:[SQL]
update jcow_accounts set var1='deportista de base',var2='futbol',var3='Rapido Bouzas', var4='Juvenil',var5='Liga Gallega',var6='10',var7='Media Punta',var8='Regate - Velocidad' ,var9='Con ficha en el R.Bouzas' var10='R.Madrid - Borussia - R.C.Celta de Vigo',var11='Reus - Isco',var12='5 Goles - 2 Asistencias - 1 Tarjeta Amarilla',var13='',var14='' ,var15='' where id='4'

[Error]
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'var10='R.Madrid - Borussia - R.C.Celta de Vigo',var11='Reus - Isco',var12='5 Gol' at line 3

[Error]
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'var10='R.Madrid - Borussia - R.C.Celta de Vigo',var11='Reus - Isco',var12='5 Gol' at line 3

I DO WRONG

Deporteando @albertof
113 months ago
@falcone I DO WRONG
113 months ago
@albertof one , missing before var10
113 months ago
@falcone Fixed THANKS
113 months ago
@falcone Fixed THANKS
113 months ago