Server Validation

QuestionsServer Validation
Azhar asked 1 year ago

Hello Abu,

This code is not working for me, is there anything problem with this:

function add_client($data)
$check_sql = “SELECT count(*) as c from clients where statusid = 4”;

$rs = mysql_fetch_assoc(mysql_query($check_sql));

if ($rs[“c”] > 0)
phpgrid_error(“Status already exist in database”);

mysql_query(“INSERT INTO clients VALUES (null,'{$data[“params”][“name”]}’,'{$data[“params”][“gender”]}’,'{$data[“params”][“company”]}’)”);

1 Answers
Abu Ghufran Staff answered 1 year ago


mysql_* funtions are deprecated in php 5.5+

You should replace it with mysqli functions by referring php docs. Or
Use datagrid db layer functions to call database.

Events are supported in full version.

Abu Ghufran - Dev Team
Grid 4 PHP Framework
Your Answer

12 + 19 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?