Jump to content

shumonira

New Members
  • Posts

    5
  • Joined

  • Last visited

shumonira's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hi I have a form to upload file. this will upload the text file. suppose 0521_2145.txt. the 1st 4 digits are the serial number. so can I get these 1st 4 digits as serial number for the Serial Number field? thank you
  2. I am really sorry for that. I tried this. now I think if I do this way, this will be better. I am really sorry.
  3. sorry about that. I will include more details here. this is my form <?php $fonts = "verdana"; $fontcolor = "#3A9BE8"; $bgcolor = "#C3D990"; ?> <!doctype html> <html> <head> <title>Student Data</title> <style> body{ font-family:<?php echo $fonts;?> } .phpcoding{ width: 900px; margin: 0 auto; background: #ddd; min-height:400px; } .headeroption, .footeroption{ background:#444; color:<?php echo $fontcolor; ?>; text-align: center; padding: 20px; } .headeroption h2, footeroption h2{ margin:0; } .maincontent{ min-height:400px; padding: 20px; background:<?php echo $bgcolor;?> } </style> </head> <body> <div class="phpcoding"> <section class="headeroption"> <h2>Student Data</h2> </section> <section class="maincontent"> <div class = "student_data"> <form action = "" method = "post"> <table> <tr> <td>ID</td> <td><input type = "text" name = "id" /></td> </tr> <tr> <td>Name</td> <td><input type = "text" name = "name" /></td> </tr> <tr> <td>Exam Date</td> <td><input type = "date" name = "examDate" /></td> </tr> <tr> <td>Browse to upload file... </br></td> <td><input type = "file" name = "browseFile" /></td> </tr> <tr> <td></br></td> <td><input type = "submit" name = "uploadFile" value = "Upload"/></td> </tr> </table> </form> </div> </section> <section class="footeroption"> <h4> <?php echo "&copy All rights reserved" ?></h4> </section> </div> </body> </html> here is the text file I just need to read the number. please let me know if I can do that thank you
  4. Hi I have a text file. I want to upload the data to php form after clicking the upload button and then it will show the data to the next page. is there anyone who can help me please. thank you
  5. Hi I have a student form. <?php $fonts = "verdana"; $fontcolor = "#3A9BE8"; $bgcolor = "#faaa3c"; ?> <!doctype html> <html> <head> <title>Php Syntax</title> <style> body{ font-family:<?php echo $fonts;?> } .phpcoding{ width: 900px; margin: 0 auto; background: #ddd; min-height:400px; } .headeroption, .footeroption{ background:#444; color:<?php echo $fontcolor; ?>; text-align: center; padding: 20px; } .headeroption h2, footeroption h2{ margin:0; } .maincontent{ min-height:400px; padding: 20px; background:<?php echo $bgcolor;?> } </style> </head> <body> <div class="phpcoding"> <section class="headeroption"> <h2>Student Data</h2> </section> <section class="maincontent"> <div class = "student_data"> <form action = "" method = "post"> <table> <tr> <td>Name</td> <td><input type = "text" name = "name" /></td> </tr> <tr> <td>City</td> <td><input type = "text" name = "city" /></td> </tr> <tr> <td>Exam Date</td> <td><input type = "date" name = "examDate" /></td> </tr> <tr> <td>Browse to upload file... </br></td> <td><input type = "file" name = "browseFile" /></td> </tr> <tr> <td></br></td> <td><input type = "submit" name = "uploadFile" value = "Upload"/></td> </tr> <tr> <td></br></td> <td><input type = "submit" name = "save" value = "Save"/></td> </tr> </table> </form> </div> </section> <section class="footeroption"> <h4> <?php echo "&copy All rights reserved" ?></h4> </section> </div> </body> </html> I have a text file "marks.txt". the text file looks like this. 3 terms marks are there for Math, Economics & English. I want to upload the data from this text file to MySQL table. I just need the numbers, so how can I avoid the String (Math, Economics and English). please help me. I don't know how to get data from text file.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.