/ Published in: PHP

a function which tests the submitted page name. If that name is the
same as another page which has the same parent, then a number is added to the end
and a message is shown explaining this.
same as another page which has the same parent, then a number is added to the end
and a message is shown explaining this.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function pages_setup_name($id,$pid){ if(dbOne('select id from pages where and id!='.$id,'id')){ $i=2; while(dbOne('select id from pages where and id!='.$id,'id'))$i++; already exists. Page name amended to "' $name=$name.$i; } return $name; }
Comments
