Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Questions?!, PHP
alex1985
post Apr 14 2008, 01:17 PM
Post #1


Super Member
*********

Group: [HOSTED]
Posts: 387
Joined: 9-February 08
Member No.: 57,615



What is the standard code for PHP to add articles to your databse, for instance.
Go to the top of the page
 
+Quote Post
jlhaslip
post Apr 14 2008, 02:07 PM
Post #2


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,882
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



CODE
$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.
Go to the top of the page
 
+Quote Post
alex1985
post Apr 15 2008, 05:56 PM
Post #3


Super Member
*********

Group: [HOSTED]
Posts: 387
Joined: 9-February 08
Member No.: 57,615



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.
Go to the top of the page
 
+Quote Post
rvalkass
post Apr 17 2008, 07:26 PM
Post #4


apt-get moo
Group Icon

Group: [MODERATOR]
Posts: 2,055
Joined: 28-May 05
From: Hertfordshire, England
Member No.: 7,593
Spam Patrol



QUOTE(alex1985 @ Apr 15 2008, 06:56 PM) *
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?
Go to the top of the page
 
+Quote Post
alex1985
post Apr 18 2008, 09:51 PM
Post #5


Super Member
*********

Group: [HOSTED]
Posts: 387
Joined: 9-February 08
Member No.: 57,615



I wanted that the admin can only enter the info for abstract
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. A Lot Of Php Questions Part 2(8)
  2. Wap Forum(9)
  3. 2 Questions(7)
  4. Javascript To Php - A Few Questions(1)
  5. Gd Functions(2)
  6. Php Questions?!(19)


 



- Lo-Fi Version Time is now: 26th July 2008 - 08:00 AM