Jump to content

tipjones

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

tipjones's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I am new to php and am working on a project where I need to add a print button on a php page. I have the following code: <form><input type="button" value=" Print this page " onclick="window.print();return false;" /></form> But it dos not work when inserting it to the php file but works when in a html file.Any help will be a great help! Thanks in Advance!!
  2. bobleny Thanks! I think your approach will work!!
  3. tourpe, This is my view source code: <body bgcolor="#CCCCCC" text="#000000"> <p align="center"> </p> <p align="center"><strong><font size="3" face="Georgia"><em><font size="5">GEORGIA</font></em></strong></p> <p align="center"><strong><font size="3" face="Georgia"><em><font size="5">UNIFORM TRAFFIC CITATION, SUMMONS AND ACCUSATION</font></em></strong></p> </body> <br>Name: Tiffanie Nicole Jones Jones<br/> Is there any way to make the multiple tabs show?
  4. thrope, I am new to this forum and don't know about view source. Hope you can view the source code. <code> <body bgcolor="#CCCCCC" text="#000000"> <p align="center"> </p> <p align="center"><strong><font size="3" face="Georgia"><em><font size="5">GEORGIA</font></em></strong></p> <p align="center"><strong><font size="3" face="Georgia"><em><font size="5">UNIFORM TRAFFIC CITATION, SUMMONS AND ACCUSATION</font></em></strong></p> </body> <?php $dbcnx = @mysql_connect("localhost", "tiffanie", "272420"); if (!$dbcnx) { echo( "<p>Unable to connect to the " . "database server at this time.</p>" ); exit(); } if (! @mysql_select_db("AMDU") ) { echo( "<p>Unable to locate " . "database at this time.</p>" ); exit(); } echo('<br>'); //Retrieving values for sect3 of ticket $weather = $_REQUEST['weather']; $traffic = $_REQUEST['traffic']; $lighting = $_REQUEST['lighting']; $road_cond= $_REQUEST['rdcond']; $road_type = $_REQUEST['rdtype']; $comvecinfo = $_REQUEST['comvecinfo']; /* echo $weather; echo '<br>'; echo $traffic; echo '<br>'; echo $lighting; echo '<br>'; echo $road_cond; echo '<br>'; echo $road_type; echo '<br>'; echo $comvecinfo; echo '<br>'; */ $sql="SELECT Lic FROM tickets"; $r = mysql_query($sql); $val = mysql_fetch_assoc($r); $tempval = $val['Lic']; //Entering data from sect3 of ticket into database $result = mysql_query("UPDATE tickets SET weather = '$weather', traffic = '$traffic', lighting = '$lighting', road_cond = '$road_cond', road_type = '$road_type', comvecinfo = '$comvecinfo' WHERE Lic ='$tempval'"); $sql1="SELECT State FROM tickets"; $test = mysql_query($sql1); $value = mysql_fetch_assoc($test); $tempval1 = $value['State']; $result1 = mysql_query("SELECT Lic,LicClass_Type, Lic_Endorsements, Lic_Expiration,First_Name, Middle_Name,Last_Name FROM $tempval1 WHERE Lic ='$tempval'"); //$val1 = mysql_fetch_assoc($result1); while ($row = mysql_fetch_array($result1,MYSQL_ASSOC)) { echo 'Name: ' . $row['First_Name'] ."\t".$row['Middle_Name'] ."\t".$row['Last_Name'] ."\t \t\t\t\t".'License Class: ' .$row['LicClass_Type']. '<br/>' ; }//while ?> </code> The output is:Name: Tiffanie Nicole Jones License Class: C
  5. thorpe, No it isn't! Why is this happening, in my soruce code it is tabbed! Can this be fixed?
  6. thorpe, Thanks for the prompt response. I am looking in my php file b/c there is where I want to echo the statement so in my php file I have echo "The big brown\t\t\t\t\t\t\t\t\t\tdog!"; and only on tab is printing. I have this code between <?php and ?>.
  7. bobleny, Thanks for the input!! However, I don't understand fully what you mean. Could you give me a in detail example. When I did the following in my code: echo "The big brown\t\t\t\t\t\t\t\t\t\tdog!"; It printed The big brown dog. For some reason it is not printing the multiple tabs I have. What can I do to make it print ALL of the tabs. I really need for this to print with the multiple tabs. PLEASE HELP!
  8. Thanks, This helps but when using \t it only allow me to tab once, how do I tab multiple of times. Or is it possile to include multiple spaces. I know in html you can include how may times you want a space and it will include a space. Also, I know you can inculde" " in php and it will give you one space but if you include " "it will also give one space which should be about four spaces. I am trying to output the following but with several spaces in between each heading: Name: Phone: Address: Any help will be a great help!!
  9. Hello, I am new to php and wanted to know how to tab text when displaying in php! For example, I want to output the following: Hello World !. After World I want to tab and then print !. I know in html this can be done by putying \t, I have tired this in php and it didn't work. ANY ADVICE WILL BE A GREAT HELP!! Thanks In Advance
×
×
  • 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.