HOME       >>       Programming

Questions?! PHP


alex1985

What is the standard code for PHP to add articles to your databse, for instance.


jlhaslip

$query = "INSERT INTO users (first_name, last_name, email, password, registration_date) VALUES ('$fn', '$ln', '$e', SHA('$p'), NOW() )"; $result = @mysql_query ($query); // Run the query. if ($result) { // If it ran OK. // Send an email, if desired. // Print a message.}
Use the MySql INSERT command. The above code Inserts a user's information for registering the User into a Login database.

Adjust according to your database design.

There are some good Tutorials over at the w3schools site.


alex1985

The next question. I need create an abstract to database, then, when the user press the button, called read more, for instance, it leads to a full article or story. Can you write the whole process, please.


rvalkass

The next question. I need create an abstract to database, then, when the user press the button, called read more, for instance, it leads to a full article or story. Can you write the whole process, please.

Short answer, no. How this would be done depends on whether you want the abstract automatically generated, or whether you want it entered by the user. Secondly, how are you uniquely identifying each article in the URLs you are using, and how are they uniquely identified in the database? Finally, we need to know in what sort of coding context you're using this. Are you using object-orientated code, or not? Are you using any frameworks, such as Zend?

alex1985

I wanted that the admin can only enter the info for abstract



VIEW DESKTOP VERSION REGISTERGET FREE HOSTING

Xisto.com offers Free Web Hosting to its Members for their participation in this Community. We moderate all content posted here but we cannot warrant full correctness of all content. While using this site, you agree to have read and accepted our terms of use, cookie and privacy policy. Copyright 2001-2019 by Xisto Corporation. All Rights Reserved.