473,323 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Insert New line in php

Hello

Actually I m just a beginner in php so I m facing very basic problems.So can u help me how to insert a new line in php?
Through search I found that "\n" is for new line character, but applying to my code its not working.

Here is my code:
Expand|Select|Wrap|Line Numbers
  1. <?php
  2. error_reporting (E_ALL ^ E_NOTICE);
  3. $con = mysql_connect("localhost","root","");
  4. if (!$con)
  5. {
  6. die('Could not connect: ' . mysql_error());
  7. }
  8. mysql_select_db("genomics", $con);
  9.  
  10. $Accession = $_GET['Accession'];
  11. $Locus = $_GET['Locus'];
  12. $Definition = $_GET['Definition'];
  13. $Sequencetype = $_GET['Sequencetype'];
  14. $Sequencelength = $_GET['Sequencelength'];
  15. $Version = $_GET['Version'];
  16. $GI = $_GET['GI'];
  17. $Organism = $_GET['Organism'];
  18. $Authors = $_GET['Authors'];
  19. $Publication = $_GET['Publication'];
  20. $Labaddress = $_GET['Labaddress'];
  21. $Dateofsequencesubmission = $_GET['Dateofsequencesubmission'];
  22. $collabrationown = $_GET['collabrationown'];
  23. $result = mysql_query("SELECT * FROM maintable WHERE Accession = '$Accession'");
  24.  
  25. while($row = mysql_fetch_array($result))
  26. {
  27. echo "Accession <input type='text' name='Accession' value='".$row['Accession']."'>";
  28. echo "Locus <input type='text' name='Locus' value='".$row['Locus']."'>";
  29. echo "Sequence length <input type='int' name='Sequencelength' value='".$row['Sequencelength']."'>";
  30. echo "Sequence type <input type='text' name='Sequencetype' value='".$row['Sequencetype']."'>";
  31. }
  32.  
  33. mysql_close($con);
  34. ?>
Nov 26 '12 #1
3 2557
phpmagesh
119 100+
Try using <br> next to input box

Expand|Select|Wrap|Line Numbers
  1. echo "Sequence type <input type='text' name='Sequencetype' value='".$row['Sequencetype']."'><br/>";
Nov 26 '12 #2
Thank You so much......but for insert a new line between Accession and locus.........what should I do???
Nov 26 '12 #3
phpmagesh
119 100+
Hope this will do for you.

Expand|Select|Wrap|Line Numbers
  1. echo "Accession <input type='text' name='Accession' value='".$row['Accession']."'><br/>";
  2. echo "Locus <input type='text' name='Locus' value='".$row['Locus']."'><br/>";
  3. echo "Sequence length <input type='int' name='Sequencelength' value='".$row['Sequencelength']."'><br/>";
  4. echo "Sequence type <input type='text' name='Sequencetype' value='".$row['Sequencetype']."'><br/>";
output as:

Expand|Select|Wrap|Line Numbers
  1. Accession <input box>
  2. Locus <input box>
  3. Sequence length <input box>
  4. Sequence type <input box>
Technically <br /> plays same role in browser as "\n".

To know more about <BR> Tag (HTML). Follow this link

http://www.w3schools.com/tags/tag_br.asp

Thanks,
Nov 26 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: beps | last post by:
hello, I have got a data list. In my Text widget each data is between the previous and the next; so they are whole in a only block. How I have to create for each data a singu Thank you very...
7
by: Beps | last post by:
hello, I have got a data list. In my Text widget each data is between the previous and the next; so they are whole in a only block. Now: |-------------------- |BushBerlusconiBlair|...
10
by: Al | last post by:
Hi, I am seeking to obtain the line number of an error once deployed with out inserting line numbers in the method. The IDE inserts line numbers but this function does not appear to be a...
3
by: Mark | last post by:
Hi All, I have wrote a sub to record events from within the database. A lot of these events are errors. The sub has the module name and function/sub name passed to it to record to the table. My...
1
by: Nalaka | last post by:
Hi, We are sending SMS messages using our ASDP.net site (C# code).... How do I add a "Line Feed" character to the string that we are sending? Any help is deeply appreciated Thanks Nalaka
18
by: W. Watson | last post by:
See Subject. It's a simple txt file, each line is a Python stmt, but I need up to four digits added to each line with a space between the number field and the text. Perhaps someone has already done...
1
by: rengaraj | last post by:
Dear Experts, I am new to XML I want to create an Interview Questions Bank (Intra Net) for our institution. I preferred to store the Question & Answer in xml sheet. But if i vew the xml in...
7
by: J.H.Kim | last post by:
Hi, everyone I saw the preprocessor "#line " in some source codes. It was like this : #line 2972 "ifupdown.nw" Please tell me what is the meaning of that "#line"? Thanks in advance.
2
by: robin1983 | last post by:
Dear All, Firstly I would like thank all senior and junior who helping and sharing the knowledge to us. Actually, I have a small query. The problem is that I have a form which have only two...
7
by: jeddiki | last post by:
Hi, I am using a function called htmlwrap() which states that it does NOT add a "<br>" to the 70 character line so that it forces a line wrap. ( the script safely wraps long words without...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.