Hi
i want to create something very simple form, with a user and password protection to my customers, to them add only the information like name, phone number, logoimagem (jpg), textare etc etc
i know that i could give them phpwcms access to do it by themself but its too damn complicated for them, and for me to simplify the phpwcms.php to them ( aka i want a direct form to insert or update a custom number of fields, that will be showed in each customer article, that means a form to be used by very ignorant people )
until know i used and install DaDaBIK (http://www.dadabik.org/) to make the form data insert/update, user and password protection
(my php knowlege to do it by myself = NULL , so i used made scripts)
there i can create a user name, and a mysql table to store the data (this future script could use the user's system built in phpwcms)
then i find and adapt this following script to call the data, and then i'm planning to make a phpinclude for each client, and put each client's database values in each client's article....
I use this very poor poor script
$ssql_=mysql_query("SELECT * FROM table WHERE id='".$_GET[id]."'")or die(mysql_error());
if(mysql_num_rows($ssql_)==0) die ('Error');
$obj=mysql_fetch_object($ssql_);
echo 'website: <strong>'.$obj->site.'</strong> image <img src=": '.$obj->image.'><br> Description: '.nl2br(strip_tags($obj->description));
i know there's a easy and better way to do it, i just went this way because i dont know how to do it...
i know that it's possible to merge this 2 "systems" and use only the phpwcms database system, or merge the 2 things better, like specify what's my customer id in the article and then transforming a replacement_tag in a template like {PHONE} in to the mysql values in a row of client's table "id=5" "phone: 545456645"
if anybody could help, or point me a place where i can find the solution...
example i want toenterprise logo to be showed in a default regular size, that's something that databik doesnt make,like phpwcms does...
its possible to insert all the data in the SUMMARY field for example, and then strip the information to where i want it?
thank u for any help,
i thing that's a script that worth it, because everybody deals with people that dont like phpwcms even before trying it...
how many times you hear it "oh its too complicate!" ( but it isnt olivier! it isnt...=) )
very very simple form, showing form field values in content
for example some one with knowledge could do a script with a replacement tag like
{MYSQL:database:user:pass:table:'the id column':'the "row" identifier':'the column of the value wanted'}
I have a table named
table1
_____
id|a|b|
1 |2|4|
2 |3|6|
and in a template i wanted to show some contents i could use
{MYSQL:database:user:pass:table11:a} = and would show 2 instead the replacement tag
or
{MYSQL:database:user:pass:table12:b} = 6
or
{MYSQL:enterprisex:user:pass:clients:name:enterprise_x:phone} = +2434234234
and this script would have a content part form also, with a login logout connected to the users part of the phpwcms part, and a option to users itself update the mysql tables, to the user enterprise_x could update his row and his phonenumber in the table clients...
i think also that the "database:user:pass" string it's not necessary in the replacement tag itself, but i dont know very well, another replacement tag one time in each article or page could cut the repeat of too many string in multiple replacement tags
for example a article could use a invisible tag like
{MYSQL_CONNECT:database:user:pass} to make the connection
and a to do the rest {MYSQL:table12:b}
but for other side, this would limit the use of one database in each article... i think....
this would be a very good "web 2.0" improvement....
i leave where, my simple idea to a future very good possible add-on
ps: my english sucks, this will to promove this script is 'selfish' in someway but i think it would help lot's of guys like me that dont know how to code php or mysql....
{MYSQL:database:user:pass:table:'the id column':'the "row" identifier':'the column of the value wanted'}
I have a table named
table1
_____
id|a|b|
1 |2|4|
2 |3|6|
and in a template i wanted to show some contents i could use
{MYSQL:database:user:pass:table11:a} = and would show 2 instead the replacement tag
or
{MYSQL:database:user:pass:table12:b} = 6
or
{MYSQL:enterprisex:user:pass:clients:name:enterprise_x:phone} = +2434234234
and this script would have a content part form also, with a login logout connected to the users part of the phpwcms part, and a option to users itself update the mysql tables, to the user enterprise_x could update his row and his phonenumber in the table clients...
i think also that the "database:user:pass" string it's not necessary in the replacement tag itself, but i dont know very well, another replacement tag one time in each article or page could cut the repeat of too many string in multiple replacement tags
for example a article could use a invisible tag like
{MYSQL_CONNECT:database:user:pass} to make the connection
and a to do the rest {MYSQL:table12:b}
but for other side, this would limit the use of one database in each article... i think....
this would be a very good "web 2.0" improvement....
i leave where, my simple idea to a future very good possible add-on
ps: my english sucks, this will to promove this script is 'selfish' in someway but i think it would help lot's of guys like me that dont know how to code php or mysql....