PHP - Display Ms Word Into Html ????
Hai
here is the senioro. i am having a .doc file called one.doc it contain a CV of the student. now i want to display it in the browser. that is this is your CV preview. check it. how to achive this please help me Similar TutorialsHi, I'm trying to read MS word docs by php but no result so far. I've been using COM applications to open a word doc but not working properly for me, so I thought it would be cool to convert word doc to the HTML and read those, do you have any Idea if it's possible? thanks I have done this successfully in the past, but this time not working. I have 4 different html sections and I only want the individual section to display if a variable is set or is set to a specified term. But this code shows all of the sections no matter what, even though I'm using if() and elseif(). This code sample is the whole page, excuse the length, but only way to fix what I am doing wrong. <head> <?php require_once ('includes/auth.php'); require_once ('includes/config.php'); require_once ('includes/connect.php'); $action = $_POST['action']; $agencyid = $_POST['agencyid']; function clean($str) { $str = @trim($str); if (get_magic_quotes_gpc()) { $str = stripslashes($str); } return mysql_real_escape_string($str); } if (isset($_POST['next1'])) { $fieldrep = clean($_POST['fieldrep']); $agencytype = clean($_POST['typeofagency']); $agencyent = clean($_POST['typeofent']); $exclusive = clean($_POST['exclusivity']); $capcarrier = clean($_POST['formcapt']); $contdate = clean($_POST['contdate']); $agencyname = clean($_POST['agencyname']); $physstr = clean($_POST['physstr']); $physcity = clean($_POST['physcity']); $physstate = clean($_POST['physstate']); $physzip = clean($_POST['physzip']); $physcount = clean($_POST['physcounty']); $mailstr = clean($_POST['mailstr']); $mailcity = clean($_POST['mailcity']); $mailstate = clean($_POST['mailstate']); $mailzip = clean($_POST['mailzip']); $mailcount = clean($_POST['mailcounty']); $fedtaxid = clean($_POST['fedtaxid']); $w9payto = clean($_POST['w9payto']); $agencylic = clean($_POST['agencylic']); $busphone = clean($_POST['bustele']); $busfax = clean($_POST['busfax']); $eandocar = clean($_POST['eocarrier']); $eandopolnum = clean($_POST['eopolnum']); $agencyemail = clean($_POST['agencyemail']); $website = clean($_POST['agencywebsite']); $car1name = clean($_POST['topcar1']); $car1prem = clean($_POST['topcardol1']); $car2name = clean($_POST['topcar2']); $car2prem = clean($_POST['topcardol2']); $car3name = clean($_POST['topcar3']); $car3prem = clean($_POST['topcardol3']); $car4name = clean($_POST['topcar4']); $car4prem = clean($_POST['topcardol4']); $car5name = clean($_POST['topcar5']); $car5prem = clean($_POST['topcardol5']); $perline = clean($_POST['perslineper']); $comline = clean($_POST['commlineper']); $lifeline = clean($_POST['lifelineper']); $sccar1 = clean($_POST['carrier1']); $sccar2 = clean($_POST['carrier2']); $sccar3 = clean($_POST['carrier3']); $sccar4 = clean($_POST['carrier4']); $sccar5 = clean($_POST['carrier5']); $choicepoint = clean($_POST['choicepoint']); $clientinfo = "INSERT INTO agency SET fieldrep = '$fieldrep', agencytype = '$agencytype', agencyent = '$agencyent', exclusive = '$exclusive', capcarrier = '$capcarrier', contdate = '$contdate', agencyname = '$agencyname', physstr = '$physstr', physcity = '$physcity', physstate = '$physstate', physzip = '$physcount', mailstr = '$mailstr', mailcity = '$mailcity', mailstate = '$mailstate', mailzip = '$mailzip', mailcount = '$mailcount', fedtaxid = '$fedtaxid', w9payto = '$w9payto', agencylic = '$agencylic', busphone = '$busphone', busfax = '$busfax', eandcar = '$eandcar', eandopolnum = '$eandopolnum', agencyemail = '$agencyemail', website = '$website', car1name = '$car1name', car1prem = '$car1prem', car2name = '$car2name', car2prem = '$car2prem', car3name = '$car3name', car3prem = '$car3prem', car4name = '$car4name', car4prem = '$car4prem', car5name = '$car5name', car5prem = '$car5prem', perline = '$perline', comline = '$comline', lifeline = '$lifeline', sccar1 = '$sccar1', sccar2 = '$sccar2', sccar3 = '$sccar3', sccar4 = '$sccar4', sccar5 = '$sccar5', choicepoint = '$choicepoint'"; $newclient = mysql_query($clientinfo) or die(mysql_error()); $agencyid = mysql_insert_id(); } if (isset($_POST['next2'])) { $name = clean($_POST['name']); $title = clean($_POST['emptype']); $ownership = clean($_POST['ownership']); $yrsins = clean($_POST['yrsins']); $profdesig = clean($_POST['profdesig']); $resstr = clean($_POST['resstr']); $rescity = clean($_POST['rescity']); $resstate = clean($_POST['resstate']); $reszip = clean($_POST['reszip']); $rescounty = clean($_POST['rescounty']); $social = clean($_POST['social']); $dob = clean($_POST['dob']); $tele = clean($_POST['tele']); $inslicense = clean($_POST['inslicense']); $emptype = clean($_POST['emptype']); $agencyid = clean($_POST['agencyid']); $empinsert = mysql_query("INSERT INTO employees SET name = '$name', title = '$title', ownership = '$ownership', yrsins = '$yrsins', profdesig = '$profdesig', resstr = '$resstr', rescity = '$rescity', resstate = '$resstate', reszip = '$reszip', rescounty = '$rescounty', social = '$social', dob = '$dob', tele = '$tele', inslicense = '$inslicense', emptype = '$emptype', agencyid = '$agencyid'")or die(mysql_error()); } if(isset($_POST['addemp'])) { $name = clean($_POST['name']); $title = clean($_POST['emptype']); $ownership = clean($_POST['ownership']); $yrsins = clean($_POST['yrsins']); $profdesig = clean($_POST['profdesig']); $resstr = clean($_POST['resstr']); $rescity = clean($_POST['rescity']); $resstate = clean($_POST['resstate']); $reszip = clean($_POST['reszip']); $rescounty = clean($_POST['rescounty']); $social = clean($_POST['social']); $dob = clean($_POST['dob']); $tele = clean($_POST['tele']); $inslicense = clean($_POST['inslicense']); $emptype = clean($_POST['emptype']); $agencyid = clean($_POST['agencyid']); $empinsert = mysql_query("INSERT INTO employees SET name = '$name', title = '$title', ownership = '$ownership', yrsins = '$yrsins', profdesig = '$profdesig', resstr = '$resstr', rescity = '$rescity', resstate = '$resstate', reszip = '$reszip', rescounty = '$rescounty', social = '$social', dob = '$dob', tele = '$tele', inslicense = '$inslicense', emptype = '$emptype', agencyid = '$agencyid'")or die(mysql_error()); } if (isset($_POST['submit'])) { $captive = clean($_POST['captive']); $mgastruc = clean($_POST['mgastruc']); $pastdue = clean($_POST['pastdue']); $suits = clean($_POST['suits']); $crimes = clean($_POST['crimes']); $suspensions = clean($_POST['suspensions']); $submitfinal = mysql_query("UPDATE agency SET captive = '$captive', mgastruc = '$mgastruc', pastdue = '$pastdue', suits = '$suits', crimes = '$crimes', suspensions = '$suspensions', completed = 'Yes' WHERE ID = '$agencyid'") or die(mysql_error()); } ?> </head> <body> <div id="containerfull"><!-- Use"containerfull" for 100% width. For fixed width, use "container980", "container760" or "container600" (the number is the layout width in pixels). --> <div id="header"> <h1><a href="http://www.yoursite.com/"><img width="400" height="100" src="images/logo.jpg" /></a></h1> </div> <div id="menu"> <ul> <li><a href="index.html">Home</a></li> <li><a class="current" href="signup.html">Signup a Producer</a></li> </ul> </div> <?php if (isset($_POST['next1'])) { ?> <div id="main"> <div id="containerfull"> <h3>D. Employee Information</h3> <table> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> <p> <tr> <td>Owner Name</td><td colspan="9"><input type="text" size="50" maxlength="75" name="name" tabindex="1" /></td> </tr> <tr> <td>Employee Type</td><td><select size="1" name="emptype" tabindex="2"> <option value="Owner">Owner</option> <option value="Employee">Employee</option> </select></td> </tr> <tr> <td>% Ownership</td><td> </td><td><input type="text" size="3" maxlength="3" name="ownership" tabindex="2" /></td><td> </td><td>Years In Insurance</td><td><input type="text" size="3" maxlength="3" name="yrsins" tabindex="3" /></td><td> </td><td>Professional Designations</td><td><input type="text" size="25" maxlength="50" name="profdesig" tabindex="4" /></td> </tr> <tr> <td>Resident Address</td><td colspan="8"><input type="text" size="50" maxlength="75" name="resstr" tabindex="5" /></td> </tr> <tr> <td> </td><td>City</td><td><input type="text" size="20" maxlength="45" name="rescity" tabindex="6" /></td><td>State</td> <td> <select tabindex="6" name="resstate" size="1" tabindex="10"> <option value="AL">AL</option> <option value="AK">AK</option> <option value="AZ">AZ</option> <option value="AR">AR</option> <option value="CA">CA</option> <option value="CO">CO</option> <option value="CT">CT</option> <option value="DE">DE</option> <option value="DC">DC</option> <option value="FL">FL</option> <option value="GA">GA</option> <option value="HI">HI</option> <option value="ID">ID</option> <option value="IL">IL</option> <option value="IN">IN</option> <option value="IA">IA</option> <option value="KS">KS</option> <option value="KY">KY</option> <option value="LA">LA</option> <option value="ME">ME</option> <option value="MD">MD</option> <option value="MA">MA</option> <option value="MI">MI</option> <option value="MN">MN</option> <option value="MS">MS</option> <option value="MO">MO</option> <option value="MT">MT</option> <option value="NE">NE</option> <option value="NV">NV</option> <option value="NH">NH</option> <option value="NJ">NJ</option> <option value="NM">NM</option> <option value="NY">NY</option> <option value="NC">NC</option> <option value="ND">ND</option> <option value="OH">OH</option> <option value="OK">OK</option> <option value="OR">OR</option> <option value="PA">PA</option> <option value="RI">RI</option> <option value="SC">SC</option> <option value="SD">SD</option> <option value="TN">TN</option> <option value="TX">TX</option> <option value="UT">UT</option> <option value="VT">VT</option> <option value="VA">VA</option> <option value="WA">WA</option> <option value="WV">WV</option> <option value="WI">WI</option> <option value="WY">WY</option> </select> </td><td>Zip</td><td><input type="text" size="10" maxlength="10" name="reszip" tabindex="8" /></td><td>County</td><td><input type="text" size="25" maxlength="45" name="rescounty" tabindex="9" /></td> </tr> <tr> <td>Social Security #</td><td><input type="text" size="11" maxlength="11" name="social" tabindex="10" /></td><td> </td><td>Date Of Birth</td><td><input type="text" size="10" maxlength="10" name="dob" tabindex="11" /></td><td>Home Telephone</td><td><input type="text" size="12" maxlength="12" name="tele" tabindex="12" /></td> </tr> <input type="hidden" value="<?php echo $agencyid; ?>" name="agencyid" /> <input type="hidden" value="addemp" name="action" /> <tr> <td><input type="submit" value="Add Employee" name="addemp" tabindex="12" /></td><td><input type="submit" value="Next" name="next2" tabindex="13" /></td> </tr> </form> </table> <?php } elseif (isset($_POST['next2'])) { ?> <div id="main"> <div id="containerfull"> <h3>F. Questions</h3> <table> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> <tr> <td>1. Is agent/agency affiliated with ANY captive entity or carrier?</td><td><select size="1" name="captive" tabindex="1"> <option value="No">No</option> <option value="Yes">Yes</option> </select></td> </tr> <tr> <td>2. Is agent/agency affiliated with ANY MGA structure?</td><td><select size="1" name="mgastruc" tabindex="2"> <option value="No">No</option> <option value="Yes">Yes</option> </select></td> </tr> <tr> <td>3. Any account current or unearned commission balances past due to any company?</td><td><select size="1" name="pastdue" tabindex="3"> <option value="No">No</option> <option value="Yes">Yes</option> </select></td> </tr> <tr> <td>4. Any judgements or suits pending against the Agency?</td><td><select size="1" name="suits" tabindex="4"> <option value="No">No</option> <option value="Yes">Yes</option> </select></td> </tr> <tr> <td>5. Have you or anyone in your Agency ever been convicted of a felony crime in any state or federal court?</td><td><select size="1" name="crimes" tabindex="5"> <option value="No">No</option> <option value="Yes">Yes</option> </select></td> </tr> <tr> <td>6. Any license suspensions in the past five years?</td><td><select size="1" name="suspensions" tabindex="6"> <option value="No">No</option> <option value="Yes">Yes</option> </select></td> </tr> <tr> <td><label for="explainyes">Explain any yes answers:</label><textarea cols="60" rows="10" wrap="VIRTUAL" maxlength="1000" name="explainyes" tabindex="7"></textarea></td> </tr> <tr> <td><h3>G. Checklist (Please include the following paperwork when submitting to corporate office)</h3></td> </tr> <input type="hidden" value="submit" name="action" /> <input type="hidden" value="<?php echo $agencyid; ?>" name="agencyid" /> <tr> <td><input type="submit" value="Submit" name="submit" tabindex="8" /></td> </tr> </form> </table> <?php } elseif (isset($_POST['adduser'])) { ?> <div id="containerfull"> <div class="left"> <p> <table> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> <tr> <td>Employee List</td> </tr> <?php $emplistquery = mysql_query("SELECT * FROM employees WHERE agencyid = '$agencyid'") or die(mysql_error()); while ($emplist = mysql_fetch_array($emplistquery)) { ?> <tr> <td>Name:</td><td><?php echo $emplist['name']; ?></td><td>Title:</td><td><?php echo $emplist['title']; ?></td> </tr> <?php } ?> </table> </p> </div> <div class="clear"> </div> </div> <div id="main"> <div id="containerfull"> <h3>D. Employee Information</h3> <table> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> <p> <tr> <td>Owner Name</td><td colspan="9"><input type="text" size="50" maxlength="75" name="name" tabindex="1" /></td> </tr> <tr> <td>Employee Type</td><td><select size="1" name="emptype" tabindex="2"> <option value="Owner">Owner</option> <option value="Employee">Employee</option> </select></td> </tr> <tr> <td>% Ownership</td><td> </td><td><input type="text" size="3" maxlength="3" name="ownership" tabindex="2" /></td><td> </td><td>Years In Insurance</td><td><input type="text" size="3" maxlength="3" name="yrsins" tabindex="3" /></td><td> </td><td>Professional Designations</td><td><input type="text" size="25" maxlength="50" name="profdesig" tabindex="4" /></td> </tr> <tr> <td>Resident Address</td><td colspan="8"><input type="text" size="50" maxlength="75" name="resstr" tabindex="5" /></td> </tr> <tr> <td> </td><td>City</td><td><input type="text" size="20" maxlength="45" name="rescity" tabindex="6" /></td><td>State</td> <td> <select tabindex="6" name="resstate" size="1" tabindex="10"> <option value="AL">AL</option> <option value="AK">AK</option> <option value="AZ">AZ</option> <option value="AR">AR</option> <option value="CA">CA</option> <option value="CO">CO</option> <option value="CT">CT</option> <option value="DE">DE</option> <option value="DC">DC</option> <option value="FL">FL</option> <option value="GA">GA</option> <option value="HI">HI</option> <option value="ID">ID</option> <option value="IL">IL</option> <option value="IN">IN</option> <option value="IA">IA</option> <option value="KS">KS</option> <option value="KY">KY</option> <option value="LA">LA</option> <option value="ME">ME</option> <option value="MD">MD</option> <option value="MA">MA</option> <option value="MI">MI</option> <option value="MN">MN</option> <option value="MS">MS</option> <option value="MO">MO</option> <option value="MT">MT</option> <option value="NE">NE</option> <option value="NV">NV</option> <option value="NH">NH</option> <option value="NJ">NJ</option> <option value="NM">NM</option> <option value="NY">NY</option> <option value="NC">NC</option> <option value="ND">ND</option> <option value="OH">OH</option> <option value="OK">OK</option> <option value="OR">OR</option> <option value="PA">PA</option> <option value="RI">RI</option> <option value="SC">SC</option> <option value="SD">SD</option> <option value="TN">TN</option> <option value="TX">TX</option> <option value="UT">UT</option> <option value="VT">VT</option> <option value="VA">VA</option> <option value="WA">WA</option> <option value="WV">WV</option> <option value="WI">WI</option> <option value="WY">WY</option> </select> </td><td>Zip</td><td><input type="text" size="10" maxlength="10" name="reszip" tabindex="8" /></td><td>County</td><td><input type="text" size="25" maxlength="45" name="rescounty" tabindex="9" /></td> </tr> <tr> <td>Social Security #</td><td><input type="text" size="11" maxlength="11" name="social" tabindex="10" /></td><td> </td><td>Date Of Birth</td><td><input type="text" size="10" maxlength="10" name="dob" tabindex="11" /></td><td>Home Telephone</td><td><input type="text" size="12" maxlength="12" name="tele" tabindex="12" /></td> </tr> <input type="hidden" value="<?php echo $agencyid; ?>" name="agencyid" /> <td><input type="submit" value="Cancel & Next" name="next2" tabindex="12"/></td><td><input type="submit" value="Add Employee" name="addemp" tabindex="13" /></td><td><input type="submit" value="Next" name="next2" tabindex="14" /></td> </form> </table> <?php } elseif (isset($_POST['submit'])) { ?> <table> <form action="print.php" method="POST"> <tr> <td>Information Submitted</td> </tr> <tr> <td>Print</td><td><select size="1" name="printname" tabindex="1"> <option value="Application">Application</option> <option value="Agreement">Agreement</option></td> </tr> <input type="hidden" value="<?php echo $agencyid; ?>" name="agencyid" /> <input type="hidden" value="submit" name="action" /> <tr> <td><input type="submit" value="Print" name="print" tabindex="2" /></td> </tr> </form> </table> <?php } else { ?> <div id="feature"> <div class="left"> <p> <table> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> <tr> <td>Field Rep:</td><td><input type="text" size="25" maxlength="40" name="fieldrep" tabindex="1" /></td> </tr> <tr> <td>Type of Agency:</td><td><input type="text" size="25" maxlength="40" name="typeofagency" tabindex="2" /></td> </tr> <tr> <td>Type of Entity:</td><td><input type="text" size="25" maxlength="40" name="typeofent" tabindex="3" /></td> </tr> </table> </p> </div> <div class="right"> <p> <table> <tr> <td align="right">Exclusivity:</td><td><input type="text" size="25" maxlength="40" name="exclusivity" tabindex="4" /></td> </tr> <tr> <td align="right">Former Captive Carrier:</td><td><input type="text" size="25" maxlength="40" name="formcapt" tabindex="5" /></td> </tr> <tr> <td align="right">Contract Date:</td><td><input type="text" size="25" maxlength="40" name="contdate" tabindex="6" /></td> </tr> </table> </p> </div> <div class="clear"> </div> </div> <div id="main"> <div id="containerfull"> <h3>A. Agency Information</h3> <p> <table> <tr> <td>Agency Name</td><td colspan="4"><input name="agencyname" type="text" size="65" maxlength="65" tabindex="6" /></td> </tr> <tr> <td>Physical Address</td><td colspan="2"><input type="text" size="25" maxlength="50" name="physstr" tabindex="7" /></td><td>City</td><td><input type="text" size="25" maxlength="40" name="physcity" tabindex="7" /></td> </tr> <tr> <td> </td><td>State</td><td> <select tabindex="6" name="physstate" size="1" tabindex="8"> <option value="AL">AL</option> <option value="AK">AK</option> <option value="AZ">AZ</option> <option value="AR">AR</option> <option value="CA">CA</option> <option value="CO">CO</option> <option value="CT">CT</option> <option value="DE">DE</option> <option value="DC">DC</option> <option value="FL">FL</option> <option value="GA">GA</option> <option value="HI">HI</option> <option value="ID">ID</option> <option value="IL">IL</option> <option value="IN">IN</option> <option value="IA">IA</option> <option value="KS">KS</option> <option value="KY">KY</option> <option value="LA">LA</option> <option value="ME">ME</option> <option value="MD">MD</option> <option value="MA">MA</option> <option value="MI">MI</option> <option value="MN">MN</option> <option value="MS">MS</option> <option value="MO">MO</option> <option value="MT">MT</option> <option value="NE">NE</option> <option value="NV">NV</option> <option value="NH">NH</option> <option value="NJ">NJ</option> <option value="NM">NM</option> <option value="NY">NY</option> <option value="NC">NC</option> <option value="ND">ND</option> <option value="OH">OH</option> <option value="OK">OK</option> <option value="OR">OR</option> <option value="PA">PA</option> <option value="RI">RI</option> <option value="SC">SC</option> <option value="SD">SD</option> <option value="TN">TN</option> <option value="TX">TX</option> <option value="UT">UT</option> <option value="VT">VT</option> <option value="VA">VA</option> <option value="WA">WA</option> <option value="WV">WV</option> <option value="WI">WI</option> <option value="WY">WY</option> </select></td><td>Zip</td><td><input type="text" size="5" maxlength="10" name="physzip" tabindex="9" /></td><td>County</td><td><input type="text" size="20" maxlength="40" name="physcounty" tabindex="10" /></td> </tr> <tr> <td>Mailing Address</td><td colspan="2"><input type="text" size="25" maxlength="50" name="mailstr" tabindex="7" /></td><td>City</td><td><input type="text" size="25" maxlength="40" name="mailcity" tabindex="7" /></td> </tr> <tr> <td> </td><td>State</td><td> <select tabindex="6" name="mailstate" size="1" tabindex="8"> <option value="AL">AL</option> <option value="AK">AK</option> <option value="AZ">AZ</option> <option value="AR">AR</option> <option value="CA">CA</option> <option value="CO">CO</option> <option value="CT">CT</option> <option value="DE">DE</option> <option value="DC">DC</option> <option value="FL">FL</option> <option value="GA">GA</option> <option value="HI">HI</option> <option value="ID">ID</option> <option value="IL">IL</option> <option value="IN">IN</option> <option value="IA">IA</option> <option value="KS">KS</option> <option value="KY">KY</option> <option value="LA">LA</option> <option value="ME">ME</option> <option value="MD">MD</option> <option value="MA">MA</option> <option value="MI">MI</option> <option value="MN">MN</option> <option value="MS">MS</option> <option value="MO">MO</option> <option value="MT">MT</option> <option value="NE">NE</option> <option value="NV">NV</option> <option value="NH">NH</option> <option value="NJ">NJ</option> <option value="NM">NM</option> <option value="NY">NY</option> <option value="NC">NC</option> <option value="ND">ND</option> <option value="OH">OH</option> <option value="OK">OK</option> <option value="OR">OR</option> <option value="PA">PA</option> <option value="RI">RI</option> <option value="SC">SC</option> <option value="SD">SD</option> <option value="TN">TN</option> <option value="TX">TX</option> <option value="UT">UT</option> <option value="VT">VT</option> <option value="VA">VA</option> <option value="WA">WA</option> <option value="WV">WV</option> <option value="WI">WI</option> <option value="WY">WY</option> </select></td><td>Zip</td><td><input type="text" size="5" maxlength="10" name="mailzip" tabindex="9" /></td><td>County</td><td><input type="text" size="20" maxlength="40" name="mailcounty" tabindex="10" /></td> </tr> <tr> <td>Federal Tax ID</td><td colspan="2"><input type="text" size="11" maxlength="11" name="fedtaxid" tabindex="11" />(99-9999999)</td><td>W9 Pay to Name</td><td colspan="2"><input type="text" size="25" maxlength="40" name="w9payto" tabindex="12" /></td> </tr> <tr> <td>Agency License Number</td><td><input type="text" size="15" maxlength="15" name="agencylic" /></td> </tr> <tr> <td>Business Telephone</td><td colspan="2"><input type="text" size="25" maxlength="25" name="bustele" tabindex="13" /></td><td>Business Fax</td><td><input type="text" size="25" maxlength="25" name="busfax" tabindex="14" /></td> </tr> <tr> <td>E&O Carrier</td><td colspan="2"><input type="text" size="25" maxlength="50" name="eocarrier" tabindex="14" /></td><td>Policy #</td><td colspan="2"><input type="text" size="25" maxlength="40" name="eopolnum" tabindex="15" /></td> </tr> <tr> <td>Agency Email Address</td><td colspan="4"><input type="text" size="40" maxlength="50" name="agencyemail" tabindex="16" /></td> </tr> <tr> <td>Website Address</td><td colspan="4"><input type="text" size="60" maxlength="75" name="agencywebsite" tabindex="17" /></td> </tr> <tr> <td colspan="10"><h3>B. Top 5 Carriers You Represent Now, Include Premium</h3></td> </tr> <tr> <td colspan="2">1. <input type="text" size="30" maxlength="45" name="topcar1" tabindex="18" /></td><td colspan="2">$ <input type="text" size="30" maxlength="45" name="topcardol1" tabindex="19" /></td> </tr> <tr> <td colspan="2">2. <input type="text" size="30" maxlength="45" name="topcar2" tabindex="20" /></td><td colspan="2">$ <input type="text" size="30" maxlength="45" name="topcardol2" tabindex="21" /></td> </tr> <tr> <td colspan="2">3. <input type="text" size="30" maxlength="45" name="topcar3" tabindex="22" /></td><td colspan="2">$ <input type="text" size="30" maxlength="45" name="topcardol3" tabindex="23" /></td> </tr> <tr> <td colspan="2">4. <input type="text" size="30" maxlength="45" name="topcar4" tabindex="24" /></td><td colspan="2">$ <input type="text" size="30" maxlength="45" name="topcardol4" tabindex="25" /></td> </tr> <tr> <td colspan="2">5. <input type="text" size="30" maxlength="45" name="topcar5" tabindex="26" /></td><td colspan="2">$ <input type="text" size="30" maxlength="45" name="topcardol5" tabindex="27" /></td> </tr> <tr> <td colspan="10"><h3>Percentage of Business Written</h3></td> </tr> <tr> <td align="right">Personal Lines</td><td>%<input type="text" size="3" maxlength="3" name="perslineper" tabindex="28" /></td><td align="right">Commercial Lines</td><td>%<input type="text" size="3" maxlength="3" name="commlineper" tabindex="29" /></td><td align="right">Life/Health</td><td>%<input type="text" size="3" maxlength="3" name="lifelineper" tabindex="30" /></td> </tr> <tr> <td colspan="10"><h3>C. Carriers to be provided through</h3></td> </tr> <tr> <td colspan="10">1.<select size="1" name="carrier1" tabindex="31"> </select></td> </tr> <tr> <td colspan="10">2.<select size="1" name="carrier2" tabindex="32"> <option selected="selected"></option> </select></td> </tr> <tr> <td colspan="10">3.<select size="1" name="carrier3" tabindex="33"> <option selected="selected"></option> </select></td> </tr> <tr> <td colspan="10">4.<select size="1" name="carrier4" tabindex="34"> <option selected="selected"></option> </select></td> </tr> <tr> <td colspan="10">5.<select size="1" name="carrier5" tabindex="35"> <option selected="selected"></option> </select></td> <tr> <td colspan="10"><h3>ChoicePoint Node ID</h3><input type="text" size="40" maxlength="40" name="choicepoint" tabindex="36" /></td> </tr> </tr> <tr><td><input type="submit" value="Next" name="next1" tabindex="37" /></td></tr> </table> <?php } ?> </p> <div class="clear"> </div> </div> <div class="clear"> </div> </div> Hello every one I need Ur Help... In mY site i have one page which name is invoice.php,but when i click a link in invoice.php,one page is generated which name is make invoice.php, but i want makeinvoice.php page should display as pdf..... Please Help me..... Thanks In Advance Hello, I'm pretty new to php and have a small problem I can't figure out. I have passed some copy (john & mary) from a small form to a url with php (i used urlencode). The code in the url looks like this john+%26+mary. My problem is, how do I display the %26 as an actual ampersand (&) on the html page? Here is the snippet of code that I am currently using to display the names. <?php echo htmlentities($_GET['gallery']); ?> I have searched and searched and can't find anything to figure this out. Any help would be great. Thanks. Hi, i'm getting an error when I load my php code in a browser. Here's my code snippet: <?php mysql_connect("localhost","root"); mysql_select_db("something"); $bellProductsArray=array(1=>"Apple_iPhone3GS.jpg",2=>"Apple_iPhone4.jpg"); $result=mysql_query("SELECT Name, Manufacturer FROM bellProducts WHERE ID=1"); $row=mysql_fetch_assoc($result); print "Name: {$row['Name']} Manufacturer: {$row['Manufacturer'] }"; ?> <img src=<?php array_values($bellProductsArray); ?> alt="Apple iPhone 3GS" title="Apple iPhone 3GS" /> **I can't get it to display the first image (eg: Apple_iPhone3GS.jpg), I made sure that I have the image in same directory. please help!1! hi again, after I clicked a particular data to edit, it will bring me to a html which i created, UpdateRecordForm.html In there, how do i retrieve the data from database so it will show the data in the textbox that i can edit it. Code: [Select] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>adding a new data record</title> </head> <body> <form id="form1" name="form1" method="post" action="processUpdateRecord.php"> <p> <label>Student Number: <input name="StudentNumber" type="text" id="StudentNumber" size="10" /> </label> </p> <p> <label>First Name: <input name="FirstName" type="text" id="FirstName" size="20" /> </label> </p> <p> <label>Last Name: <input name="LastName" type="text" id="LastName" size="20" /> </label> </p> <p> <label>Email Address: <input name="EmailAddr" type="text" id="EmailAddr" size="50" /> </label> </p> <p> <label>Telephone: <input name="PhoneNumber" type="text" id="PhoneNumber" size="20" /> </label> </p> <p> <input type="submit" name="submit" id="submit" value="Update Record" /> </p> </form> </body> </html> I have the following code that searches my database and displays results in a table: $fields = array("field1", "field2", "field3") $cols = implode (', ', $fields); $result= mysql_query (" SELECT $cols FROM tablename WHERE ................... "); if (!$result) {die('Could not search database: ' . mysql_error());} if($result) { if(mysql_num_rows($result) == 0) { return "Sorry. No records found in the database"; } else { $table = "<table border='1' cellpadding='5' cellspacing='5'>"; while($arr = mysql_fetch_array($result, MYSQL_ASSOC)) { $table .= "\t\t<tr>\n"; foreach ($arr as $val_col) { $table .= "\t\t\t".'<td>'.$val_col.'</td>'."\n"; } $table .= "\t\t</tr>\n"; } $table .= "</table>"; echo $table; } mysql_free_result($result); } As you can see each of the MySQL table fields specified by $fields is displayed in a new column in the html table. I want to change this so that e.g. "field3" is displayed in a new row instead. So, instead of the html table looking like: | "field1-result1" | "field2-result1" | "field3-result1" | | "field1-result2" | "field2-result2" | "field3-result2" | | "field1-result3" | "field2-result3" | "field3-result3" | I want it to look like: | "field1-result1" | "field2-result1" | | "field3-result1" | | | "field1-result2" | "field2-result2" | | "field3-result2" | | | "field1-result3" | "field2-result3" | | "field3-result3" | | I guess this is quite straightforward, but I can't work it out! Pls help! Thanks. hi there, the code below is suppose to display something like the attachement "code2" but instead it displays something like attachement "code1" please assist in find what is wrong with my echo lines.
<?php $counter = 2; $sqlq="select * from state WHERE status = 0 "; $categorysqlq = mysql_query($sqlq); $varq = mysql_num_rows($categorysqlq); while($catfetchq = mysql_fetch_array($categorysqlq)) { $cnty = $catfetchq[0]; $sqllq="select * from vehicle WHERE country = '$cnty' "; $categorysqllq = mysql_query($sqllq); $numsql = "select * from branchaddr WHERE state = '$cnty' "; $numquery = mysql_query($numsql); $varqa = mysql_num_rows($numquery); $cntyfetchq= mysql_fetch_array($numquery); if($varq != 0){ if($counter == 2){ echo "<tr><td><a href=\"transport2.php?id=".$cntyfetchq['state'].">".$catfetchq[1]."(<span style=\"color:red\">".$varqa."</span>)</a></td>"; $counter--; } else{ echo "<td><a href=\"transport2.php?id=".$cntyfetchq['state'].">".$catfetchq[1]."(<span style=\"color:red\">".$varqa."</span>)</a></td></tr>"; $counter = 2; } } } ?>Attached Files code1.png 12.65KB 0 downloads code2.png 25.34KB 0 downloads In the code below, I am trying to produce a google-like page where the user can type keywords and pages of search results are displayed. The main difficulty I am encountering is that when the browser changes pages, it forgets everything about current data. Perhaps I should include the display of pages inside the HTML form ? How can I fix this code ? Here is the contents of my searchpage.php file : <?php $keywords=''; $display_search_results=''; if(isset($_POST['search_submitted'])) { $keywords=$_POST['keywords']; $search_results=array(); $totalNbrOfItems=20; for($k=1;$k<=$totalNbrOfItems;$k++) { $search_results[$k]='Your keywords '$keyowrds.' have been found in item number '.$k; } $nbrOfItemsParPage = 5; $nbrOfPages = ceil($totalNbrOfItems / $nbrOfItemsParPage); // Compute current page $current_page = (isset($_GET['page']))?intval($_GET['page']):1; $display_pages=($nbrOfPages<2)?'<p>Page : ':'<p>Pages : '; for ($i = 1 ; $i <= $nbrOfPages ; $i++) { if ($i == $current_page) //No link to the current page { $display_pages=$display_pages.$i.' '; } else { $display_pages=$display_pages.'<a href="searchpage.php?'. 'page='.$i.'">'. $i . '</a> '; } } $display_pages=$display_pages.'</p>'; $display_items=''; $start=$nbrOfItemsPerPage*($current_page-1); for($k=1;$k<=$nbrOfItemsParPage;$k++) { $display_items=$display_items.($search_results[$start+$k]).'<br>'; } $display_search_results=$display_pages.$display_items; } echo '<form method="post" action="searchpage.php">'. ' Type your keywords here : <br><br>'. '<textarea cols="65" rows="1" '. 'id="keywords_id" name="keywords">'.$keywords.'</textarea>'. '<input type="submit" name="search_submitted" id="search_submitted_id" value="Search" /> '. '</fieldset>'. '</form>'; echo $display_search_results; ?> I have the following code in html: <html> <head> <script type="text/javascript"> <!-- function delayer(){ window.location = "http://VARIABLEVALUE.mysite.com" } //--> </script> <title>Redirecting ...</title> </head> <body onLoad="setTimeout('delayer()', 1000)"> <script type="text/javascript"> var sc_project=71304545; var sc_invisible=1; var sc_security="9c433fretre"; </script> <script type="text/javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript> <div class="statcounter"><a title="vBulletin statistics" href="http://statcounter.com/vbulletin/" target="_blank"><img class="statcounter" src="http://c.statcounter.com/71304545/0/9c433fretre/1/" alt="vBulletin statistics" ></a></div></noscript> </body> </html> Is a basic html webpage with a timer redirect script and a stascounter code. I know a bit about html and javascript, but almost nothing about php. My question is: How a can convert this html code into a php file, in order to send a variable value using GET Method and display this variable value inside the javascript code where says VARIABLEVALUE. Thanks in adavance for your help. Hi guys, I'm trying to export records from php to ms word which appends text + image. i have got this code from http://www.thaicreate.com/php/php-word.application-addpicture.html Code: [Select] <html> <head> <title>ThaiCreate.Com PHP Word.Application Tutorial</title> </head> <body> <? $wdColorDarkRed = "&H80"; $wdAlignParagraphCenter = "1"; $wdAlignParagraphLeft = "0"; $wdParagraph = "4"; $wdHorizontalPositionMargin = "0"; $wdTableLeft = "-999998"; $wdCollapseEnd = "0"; $Wrd = new COM("Word.Application"); $DocName = "MyDoc/MyWord.doc"; //$strPath = realpath(basename(getenv($_SERVER["SCRIPT_NAME"]))); // C:/AppServ/www/myphp $Wrd->Application->Visible = False; $WrdDoc = $Wrd->Documents->Add(); $MyRange1 = $WrdDoc->Paragraphs->Add->Range; $MyRange1->ParagraphFormat->Alignment = $wdAlignParagraphCenter; $MyRange1->Font->Name = "Verdana"; $MyRange1->Font->Size = "30"; $MyRange1->Font->Bold = True; $MyRange1->InsertBefore(chr(13).chr(13)."www.ThaiCreate.Com".chr(13)."Version 2009"); $MyRange1->InlineShapes->AddPicture(realpath("thaicreate-2009.gif")); //$WrdDoc->InlineShapes->AddPicture(realpath("thaicreate-2009.gif")); //$WrdDoc->Shapes->AddPicture(realpath("thaicreate-2009.gif"),0,0,MyRange1); //$WrdDoc->Shapes->AddPicture(realpath("thaicreate-2009.gif"),0,0,Wrd->Selection->Range); $MyRange2 = $WrdDoc->Paragraphs->Add->Range; $MyRange2->ParagraphFormat->Alignment = $wdAlignParagraphCenter; $MyRange2->Font->Name = "Verdana"; $MyRange2->Font->Size = "15"; $MyRange2->Font->Bold = True; $MyRange2->InsertBefore(chr(13).chr(13)."PHP,ASP and ASP.NET Tutorial"); $MyRange2->InlineShapes->AddPicture(realpath("doc.gif")); $MyRange3 = $WrdDoc->Paragraphs->Add->Range; $MyRange3->ParagraphFormat->Alignment = $wdAlignParagraphCenter; $MyRange3->Font->Name = "Verdana"; $MyRange3->Font->Size = "10"; $MyRange3->Font->Bold = True; $MyRange3->Font->Color = $wdColorDarkRed; $MyRange3->Underline = True; $MyRange3->InsertBefore(chr(13).chr(13).chr(13).chr(13)."All Rights Reserved"); //$WrdDoc->SaveAs($strPath."/".$DocName); $WrdDoc->SaveAs(realpath($DocName)); $Wrd->Application->Quit; $Wrd = null; ?> Word Created <a href="<?=$DocName?>">Click here</a> to Download. </body> </html> This is the best code i've found so far that guides on how to format the text in ms word via PHP. All set to go but one thing that I am trying to accomplish : to have a clickable email address (hyperlink) in the same ms word file. i have got this code somewhere from the net: Code: [Select] $MyRange3->Hyperlinks->Add({range}, 'http://www.google.com', '','',' hyperlink text to display'); // where {range} refers to as anchor according to that website this methods could be found in ms word visual basic editor (Alt+F11) then object browser (F2) when i replace the {range} above with let say variable $MyRange3. Code: [Select] $MyRange3->Hyperlinks->Add($MyRange3, 'http://www.google.com', '','',' hyperlink text to display'); The output will be produced but overwriting everything in $MyRange3 and displays only the hyperlink. I would like the email address (hyperlink) to appear at the end of $MyRange3 text. example output Code: [Select] All right reserved [u]hyperlink text to display[/u] anyone can shed some light on this. I have this code below the browser shows correct data but when i export to word I see $proc output not the switch data like on the the browser page
How should code be written to show the same on word doc .
I'm new to this learning by trial and error Please go easy on me .
Thanks
<td> <? I'm going to post the code that I am currently using and then explain what I'm trying to do. I hope I can explain it well enough. <?php if (!isset($_POST['submit'])) { echo'<leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0"> <center><form name="fairlistlist" method="POST" action="'.$_SERVER['PHP_SELF'].'"> <TABLE width="450" height="119" border=0 cellPadding=3 cellSpacing=2 bgcolor="#fff568"> <TBODY> <TR> <TD class=mainText width="100"><b>Event Name</b></TD> <TD width="305" class=frmInput> <INPUT class=mainFormBox style="WIDTH: 320px" type="text" name=" fairname"></TD> </TR> <TR> <TD class=mainText width="100"><B>Event Address</B></TD> <TD class=frmInput> <INPUT name="fairadd" type="text" class=mainFormBox id="fairadd" style="WIDTH: 320px"></TD> </TR> <TR> <TD class=mainText width="100"><b>Event City</b></TD> <TD class=frmInput> <INPUT name="faircity" type="text" class=mainFormBox id="faircity" style="WIDTH: 320px"></TD> </TR> <TR> <TD class=mainText width="100"><b>Event County</b></TD> <TD class=frmInput> <INPUT name="faircty" type="text" class=mainFormBox id="faircty" style="WIDTH: 320px"></TD> </TR> <TR> <TD class=mainText width="100"><b>Event State</b></TD> <TD class=frmInput> <INPUT name="fairstate" type="text" class=mainFormBox id="fairstate" style="WIDTH: 320px"></TD> </TR> <TR> <TD class=mainText width="100"><b>Event Country</b></TD> <TD class=frmInput> <INPUT name="fairctry" type="text" class=mainFormBox id="fairctry" style="WIDTH: 320px"></TD> </TR> <TR> <TD class=mainText width="100"><b>Event Opening Date</b></TD> <TD class=frmInput> <INPUT name="fairopen" type="text" class=mainFormBox id="fairopen" style="WIDTH: 320px"></TD> </TR> <TR> <TD class=mainText width="100"><b>Event Closing Date</b></TD> <TD class=frmInput> <INPUT name="fairclose" type="text" class=mainFormBox id="fairlose" style="WIDTH: 320px"></TD> </TR> <TR> <TD class=mainText width="100"><b>Event Contact Email</b></TD> <TD class=frmInput> <INPUT name="fairmail" type="text" class=mainFormBox id="fairmail" style="WIDTH: 320px"></TD> </TR> <TR> <TD class=mainText width="100"><b>Event Website</b></TD> <TD class=frmInput> <INPUT name="fairweb" type="text" class=mainFormBox id="fairweb" style="WIDTH: 320px"></TD> </TR> <TR> <TD class=frmDescription width="56"> </TD> <TD class=frmInput> <div align="right"> <input type="submit" name="submit" value="Add my Event" /> </div></TD> </TR> </TBODY> </TABLE> </form></center> </body>'; //note that I added a new field called submit and it's hidden .. } else { /*I added addslashes() so it escape any special char in the form .. if you want to show your inserted record , you need to use stripslashes() to remove any slashes from the record .. this is only to avoid some security problems in the query ..*/ $fairname=trim(addslashes($_POST['fairname'])); $fairadd=trim(addslashes($_POST['fairadd'])); $faircity=trim(addslashes($_POST['faircity'])); $faircty=trim(addslashes($_POST['faircty'])); $fairstate=trim(addslashes($_POST['fairstate'])); $fairctry=trim(addslashes($_POST['fairctry'])); $fairopen=trim(addslashes($_POST['fairopen'])); $fairclose=trim(addslashes($_POST['fairclose'])); $fairmail=trim(addslashes($_POST['fairmail'])); $fairweb=trim(addslashes($_POST['fairweb'])); include("Connections/local.php"); $link = mysql_connect($hostname_local,$username_local, $password_local) or die("Could not connect"); mysql_select_db('fair123') or die("Could not select database"); $insert=mysql_query("INSERT INTO events (fairidnum, fairname, fairadd, faircity, faircty, fairstate, fairctry, fairopen, fairclose, fairmail, fairweb) VALUES('NULL', '$fairname', '$fairadd', '$faircity', '$faircty','$fairstate', '$fairctry','$fairopen', '$fairclose', '$fairmail', '$fairweb')")or die('couldn\'t Insert record into database :'.mysql_error()); header( 'Location: event_added.php' ) ; } ?> Especially look at the code part here $insert=mysql_query("INSERT INTO events (fairidnum, fairname, fairadd, faircity, faircty, fairstate, fairctry, fairopen, fairclose, fairmail, fairweb) VALUES('NULL', '$fairname', '$fairadd', '$faircity', '$faircty','$fairstate', '$fairctry','$fairopen', '$fairclose', '$fairmail', '$fairweb')")or die('couldn\'t Insert record into database :'.mysql_error()); header( 'Location: event_added.php' ) ; } ?> this is where I am having problems it was reading echo your record has been successfully added to the database What I want is for it to open up a new page with my menu and my css and all that good crap to a page where it will read the following Your information has been added to our database We have added Event name = "whatever the event's name was" Event address = "address:" so on and so on for all the fields in my form that was submitted to the database. with just using the echo command it always opened to just a blank page no formatting and no css as well as no all important links Can you please tell me what I'm doing wrong or where I can find a good guideline that Is easy to understand on how to do this? Thanks in advance Oh also I don't care if that page get's indexed by google or yahoo or not actually prefer it don't get indexed to be honest Hey guys i found this script that works great for what i need .. se i have this script that i did for my body (loan application) now i would like to export the info in a word doc <?php $ExcelFileName="test.doc"; header("Content-type: application/x-ms-download"); header("Content-Disposition: attachment; filename=$ExcelFileName"); header('Cache-Control: public'); $content=<<<EOD echo 'php'; whatever you want to write here including a php script it will be included in a string and then go in the output for a doc file EOD; echo $content; ?> so im trying to eco all the content in the database.. i tryed all the DB connection is there.. ao i place this after the (echo 'php' while($info = mysql_fetch_array($fileLIST)){; echo $info['PERS_F_NAME']; }; i get this? Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/autosspe/public_html/admin/loan/word.php on line 21 how to take a word in php or explode based on luas Bangunan :xxx For example I have string $string =" Kondisi Properti : Bagus Dilengkapi Perabotan : Unfurnished Sertifikat : Lainnya Daya Listrik : 2200 Watt Kamar Tidur : 3/1 Kamar Mandi : 2/1 Luas Bangunan : 92 m² Luas Tanah : 126 m² Jumlah Lantai : - Kondisi Properti : Bagus Sekali Dilengkapi Perabotan : Unfurnished Sertifikat : SHM - Sertifikat Hak Milik Daya Listrik : 6600 Watt Saluran Telepon : 1 Garasi : 3 Kamar Tidur : 4/1 Kamar Mandi : 3/1 Luas Bangunan : 300 m² Luas Tanah : 228 m² Jumlah Lantai : 2.5 "; eg I want to take every "Luas bangunan: xxx" Thanks I have a CMS with basic toolbar and have major issues with copying and pasting from MS Word. I have a code below that I would like to test cleaning up MS Word.... Code: [Select] <?php function word_cleanup ($str) { $pattern = "/<(\w+)>(\s| )*<\/\1>/"; $str = preg_replace($pattern, '', $str); return mb_convert_encoding($str, 'HTML-ENTITIES', 'UTF-8'); } ?>And would like to add it onClick within code below, but it doesn't seem to do anything...... Code: [Select] <?php //we will have to dynamically generate either the edit and delete buttons or //the save button here depending on numevent. if($numMain!=-1) { echo("<tr><td colspan='2' align='center'><input type='submit' id='button' name='edit' value='Save Changes' onClick=\"saveChanges('edit'); onClick=\"function('word_cleanup');\"><input type='submit' id='button' name='delete' value='Delete' onClick=\"saveChanges('delete');\"></td></tr></table></form>"); } else { echo("<tr><td colspan='2' align='center'><input type='submit' id='button' name='save' value=' Save ' onClick=\"saveChanges('save'); onClick=\"function('word_cleanup');\"></td></tr></table></form>"); } ?> Any help, tips, suggestions would be so greatly appreciated. Hey, I have a word filter which is dectecting strings that are only embedded in words. Which i don't want it to do. For example: If i want to filter "FR" and some one puts france - it flags it because france contains FR. How do i make it only look for "FR" on its own seperated from a word instead of it flagging nearly all words with the two letters together? Heres my filter: $text = 'testing'; //this should not return 1 // fill this array with the bad words you want to filter and their replacements $bads = array ("test"); foreach($bads as $key => $search_needle) { if(stristr($text, $search_needle) == TRUE) { return(1); break; } } hey im tring to match words which contain double s at the end...ie. address, business, class etc...so that is so i can put a ' at the end...
class'
if (preg_match("/ss$/", $name)) { $name = $name . "'"; }any help with the regular expression would be great thank you How can I sort a string alphabetically? I thought about creating an array ('a'=>0, 'b'=>1) etc, but didn't manage to work. So how can I do this? is there a predefined function for this? or I should create the algorithm? Thanks, Example: $word = 'cbad432'; // should become: '234abcd' Hi there, Can someone tell me an easy way to highlight a word in a page using PHP? I only need to highlight 1 word, for example "hello". Thanks |