w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
PHP code to generate vendor code from the first letters of form data

The string concat in php is a . not a +, so i think you are trying to do a string concat here.

$vendor_code = "VH" + $w1 + $w2 + $w3 + $date;

it should be

$vendor_code = "VH" . $w1 . $w2 . $w3 . $date;

also you are not adding this string into the database you are using the hidden post var which i don't see being changed at all so I am not sure what data is in it, try changing

GetSQLValueString($_POST['vendor_code'], "text"),

to

GetSQLValueString($vendor_code, "text"),




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.