Jump to content

loveranger

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

loveranger's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. See this is what I used for process.php <?php //Create a random 10-digit alphanumeric variable function randomgen() { $length = 10; $string = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; $key = substr( str_shuffle($string), 0, $length ); return $key; } $filename = randomgen(); $file = fopen("$filename.html","w"); $body="<b>First name: </b> ".$_POST['First_name']." <b>Last Name: </b>" .$_POST['Last_name']."<br>"; $body.="<b>Address</b> ".$_POST['Address']." <b>City: </b>" .$_POST['City']."<br>"; echo fwrite($file,$body); fclose($file); ?> And this is what i get as output.... First name: dsfsdsf Last Name: dsfd Address dsfsd City: fsdfdsf As you can see Last Name and City are not aligned. Can you please modify my process.php so this can be achieved?
  2. <?php //Create a random 10-digit alphanumeric variable function randomgen() { $length = 10; $string = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; $key = substr( str_shuffle($string), 0, $length ); return $key; } $filename = randomgen(); $file = fopen("$filename.html","w"); $body="<table border="0" width="502" height="50" id="table1"> <tr> <td height="46" width="240"> <font face="Verdana" size="2">First name: </font><font face="Verdana"><font size="2"> </font>".$_POST['First_name']."<font size="2"> <br>Address: </font><font style="font-size: 5pt"> </font>" .$_POST['Address']."</td> <td height="46" width="246"> <font face="Verdana"> <font size="2">Last Name: </font>".$_POST['Last_name']."<font size="2"> City: </font><font style="font-size: 6pt"> </font>".$_POST['City']."<font size="2"> </font></font></td> </td> </tr> </table>"; echo fwrite($file,$body); fclose($file); ?> Parse error: syntax error, unexpected T_LNUMBER in /home/adfinanc/public_html/application/process.php on line 15
  3. Hey.... this is my last question. Please help me out. For the output, I want to display like this: First name: John Last Name: Smith Address: 12 Cherry street ave City: London Province: Ontario Postal Code: A1B 2C3 I've tried to make a code but it keeps displaying error.... I want the column of Last Name, City, Postal Code, etc. all to be aligned perfectly. Is this possible? How will the code look like in process.php?
  4. I'm pretty sure there is a code that automatically renames each new application numberically...
  5. thank you so much... now i just need to know how to make new application file name numerically instead of random generator.
  6. I am trying to make it display like such...... First name: Joe Last name: Smith with the code... <?php //Create a random 10-digit alphanumeric variable function randomgen() { $length = 10; $string = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; $key = substr( str_shuffle($string), 0, $length ); return $key; } $filename = randomgen(); $file = fopen("$filename.html","w"); $body = ."<b>First name</b>" $_POST['First_name'] ."<br>"; $body .= ."<b>First name</b>" $_POST['Last_name'] ."<br>"; echo fwrite($file,$body); fclose($file); ?> What's wrong? I'm getting this error... Parse error: syntax error, unexpected '.' in /home/adfinanc/public_html/process.php on line 14
  7. Also how can I make the script put the time and date of when the file was created.....any help would be greatly appreciated.
  8. thanks. instead of putting it as random number, how can i make it create a new file for each new application numerically. 1.txt 2.txt 3.txt ...etc
  9. Thanks... That looks like the exact code I'm looking for except a few conditions.... For each new application it is overwriting into test.txt. How would I have it make new .txt files for each new application? Also this is what I'm getting as output.... John<br>Smith<br> It's not using <br> properly... how to fix this?
  10. http://www.rnkprofessionalcorporation.com/website/application.htm After the user clicks submit, how do I have the file output saved in a well organized format in my server or send to me by e-mail? What's the code I have to put for process.php?
  11. OK, I've got a simple application form. Look below: http://www.rnkprofessionalcorporation.com/website/application.htm Once someone clicks submit, how do I make it send me all those information in a well organized format? To a file on my server or e-mail? What would I have to be the code in the process.php?
×
×
  • 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.