May 17, 2008

Questions?! - PHP

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

free web hosting

Questions?! - PHP

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

Reply

jlhaslip
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.

 

 

 


Reply

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.

Reply

rvalkass
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?

Reply

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

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : questions, php

  1. Php Questions?!
    From: alex1985 (19)
  2. Gd Functions
    Questions (2)
    Hi all I want begin a new project , my new project is Photo blog ( weblog and image album ) in one
    script for example you can post many image in one post at once case . so its very good and very easy
    but we have some problems . if you can plz help me to fix this problems for example : we need
    change image size for page speed ( we dont want show 16 image in one page ) * we need GD functions
    to change image size to smaller and then show smaller image at page if you know source or tutorial
    about change image size plz post here . thankx we know we can change image size (w....
  3. Javascript To Php - A Few Questions
    (1)
    I am rewriting a Javascript into PHP, but I have two questions: How can I write these functions in
    PHP? Math.floor Math.ceil I'm sure the answer is obvious, but I really can't find it...
    /laugh.gif' border='0' style='vertical-align:middle' alt='laugh.gif' /> ....
  4. 2 Questions
    (7)
    i have 2 questions about PHP...please don't answer like "use google"...or something...because i
    tried and didn't find anything..so 1. example..i have a varible called $var and it
    contains 50 characters..so how can i write only part of them (1,2,3,20)? 2. example like the one
    before... i have a varible called $var with 50 characters..how can i write the first /second
    /third.. charachter from the $var tnx;)....
  5. Wap Forum
    several questions on WAP forums (9)
    /blink.gif' border='0' style='vertical-align:middle' alt='blink.gif' /> Right i want to set up a
    wap forum for rap battling. I think i need to use php, although i might need wml not sure. so
    questions: 1) WML or PHP? 2) Can i get a forum/message board script? 3) Where can i get it? Thanks
    in advance Not making helpful thread topics and titles results in warnings, or in extreme cases, a
    ban. Don't fall into the crack. ....
  6. A Lot Of Php Questions Part 2
    (8)
    Ok, here's another. After looking at many PHP codes, I will call it "PHP Shortcuts". Do you
    still know any other "PHP Shortcuts"? Example, to "print" the visitor's IP address, I use CODE
    <html><head></head><body><?php print
    $_SERVER['REMOTE_ADDR']; ?></body></html> After seeing
    someone's codes, I saw an easy way CODE
    <?=$_SERVER['REMOTE_ADDR'];?> So, you know any more of that? And for
    MySQL, I know there are many ways to retrieve the results. ....
  7. A Lot Of Php Questions
    please do help me (3)
    First , i'm planning to use preg_match, ereg_match, etc.. I think "preg" and "ereg" uses
    something like in the Apache's RewriteModule the " " something like that... Do you know a
    tutorial that will easily teach me on how to do that? Second , I'm planning to use Apache
    Rewrite. But I really don't know how to use. Do you know a tutorial that will easily teach me on
    how to do that? Third , while openning some php scripts, I didn't get the meaning of example:
    CODE <?php $sample1->//some string here ?> What does it mean? I di....
  8. Html To Php Questions
    (3)
    Hi, I would like to know if it is safe to change HTML files to PHP files by just changing the
    dotHTML extension to dotPHP?? I tried it to a single html file because i used a php code of blog,
    and it worked. I'm using Internet Explore version 6 and it's working fine. I would like to
    know if the PHp files would work for other browsers after changing dotHTML to dotPHP extension.
    Thanks....

    1. Looking for questions, php

Searching Video's for questions, php
advertisement



Questions?! - PHP



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE