SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: longtext column

  1. #1
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    226
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question longtext column

    m using a longtext column in a table
    and when m trying to upload the following text its not being uploaded
    HTML Code:
    What is a Valid License
    
    	
    
    Answers to general questions about licenses that explain your rights and responsibilities.
    	
    
    	
    
    What is a 'legal' or valid license?
    	
    
    	
    
    Each Microsoft software product has a license that is documented in a license agreement. The license agreement gives the user the right to use the software but varies according to the type of license bought. This software is protected by copyright and trade mark laws that state that it cannot be copied without copyright holder's permission.
    	
    
    	
    
    Do I own the software I buy?
    	
    
    	
    
    No - a software license only gives you the legal right to use a piece of software within the parameters laid down by the owner of the rights of that software. You only own the license to use that piece of software - not the software itself.
    	
    
    	
    
    What does a license look like?
    	
    
    	
    
    This depends on the type of license you have bought. If you have bought a retail packaged Microsoft software program, you will receive an End User License Agreement (EULA).
    
    EULAs are usually pieces of paper that come in the retail box with your software, manuals and other documentation. However, paper EULAs are being phased-out in favour of online versions available when you first load the software. Be wary of EULAs that do not come with a software program - these are likely to be fake licenses that are worthless pieces of paper.
    	
    
    	
    
    With a license, can I use the software on any of my PCs?
    	
    
    	
    
    No. When you buy a program, unless your license specifically says otherwise, you're buying the rights to use it on just the one PC. It's illegal to copy a single license version onto multiple PCs without a license to do so. If you do copy it without the correct license, then you will be breaking the law and unnecessarily exposing yourself and/or your business to legal action.
    	
    
    	
    
    If I buy my PCs with software already on them - what then?
    	
    
    	
    
    When you buy a PC with the software pre-installed by the system builder or manufacturer, you should also be supplied with an End User License Agreement (EULA) for the software on the machine. If you're not, your software may not be legal.
    	
    
    	
    
    If you need to have multiple copies of software then the most cost-effective and legal way to buy the correct licenses is probably through a volume licensing programme. These are designed to meet the requirements of a wide range of customers including: individuals, small to medium-sized businesses, large organizations, the education, charity and government sectors, and developers.

  2. #2
    SitePoint Guru
    Join Date
    Jul 2005
    Location
    Orlando
    Posts
    634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're going to have to show some code, and errors you're getting, to receive help.

  3. #3
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    226
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the form which m using to upload is
    PHP Code:
    <table class="primary" align="center">
    <
    tr>
            <
    td nowrap="yes" colspan="2"><div align="center">
                
              <
    p><strong><font face="Verdana">Create New Circular</font></strong
              </
    p>
                <
    p>&nbsp; </p>
              </
    div></td></tr>
        <
    tr>
            
          <
    td valign="top"><strong><font face="Verdana">Topic :</font></strong></td>
            <
    td valign="top"><input name="topic" type="text" id="topic" size="50" /></td></tr>
    <
    tr><td valign="top" class="primary"><strong><font face="Verdana">Circular Description</font>:</strong></td>
    <
    td valign="top" class="primary"><textarea name="a_answer" cols="100" rows="18" id="a_answer" ></textarea></td>
    </
    tr>
    <
    tr>
    <
    td valign="top"  colspan="2" class="primary" align="center"><input type="submit" name="Submit" value="Post" class="button"> <input type="reset" name="Submit2" value="Cancel" class="button">
    </
    tr>
    </
    table>
    </
    td>
    </
    form

  4. #4
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    226
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    code where m retriving it and storing it into database
    PHP Code:
    $topic=$_POST['topic'];
    $detail =$_POST['a_answer'];
    $datetime=date("d/m/y h:i:s"); 
    $sql="INSERT INTO $tbl_name(id,topic, detail, datetime)VALUES('null', '$topic', '$detail','$datetime')";
    $result=mysql_query($sql); 

  5. #5
    SitePoint Guru
    Join Date
    Jul 2005
    Location
    Orlando
    Posts
    634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sundry thoughts.

    1. Your HTML is muck. You need to learn about CSS and XHTML 1.1 standards.
    2. Related to #1, you don't have a form opening tag.
    3. In your PHP script, you don't define $tbl_name, but you're using it in the query.
    4. Immediately below $result = mysql_query( $sql ) put the following: echo mysql_error(); If there is a SQL error, it'll tell you. Just for debugging, of course.
    5. You need to read about and deal with SQL injection. Your code is very insecure and could lead to the deletion of your database.

  6. #6
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You need to escape your fields so that quotes in them aren't taken literally. Escaping is vital for security and you shouldn't EVER put user-input variables into queries without escaping them.

    PHP Code:
    $topic MySQL_Real_Escape_String($_POST['topic']);
    $detail MySQL_Real_Escape_String($_POST['a_answer']);
    $sql="INSERT INTO $tbl_name(topic, detail, datetime)VALUES('{$topic}', '{$detail}', NOW())";
    $result=MySQL_Query($sql); 
    Edit:

    I agree with UFTimmy's comments. Scrap the tables and learn CSS and (X)HTML-semantics.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  7. #7
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    226
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i have all these
    i just provided with the necessary parts of the code

  8. #8
    SitePoint Addict
    Join Date
    Mar 2009
    Posts
    226
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You need to escape your fields so that quotes in them aren't taken literally. Escaping is vital for security and you shouldn't EVER put user-input variables into queries without escaping them.

    PHP Code:


    $topic = MySQL_Real_Escape_String($_POST['topic']);
    $detail = MySQL_Real_Escape_String($_POST['a_answer']);
    $sql="INSERT INTO $tbl_name(topic, detail, datetime)VALUES('{$topic}', '{$detail}', NOW())";
    $result=MySQL_Query($sql);
    thanks it worked

  9. #9
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    By the way, your HTML should be more like:

    PHP Code:
    <form action="..." method="...">
        <
    h3>Create New Circular</h3>
        <
    label id="topicLabel" for="topic">Topic :</label>
            <
    input name="topic" id="topic" type="text" />
        <
    label id="a_answerLabel" for="a_answer">Circular Description:</label>
            <
    textarea name="a_answer" id="a_answer"></textarea>
        <
    input type="submit" name="Submit" value="Post" class="button">
        <
    input type="reset" name="Submit2" value="Cancel" class="button">
    </
    form
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •