Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 23, 2012 12:10 AM by hubertjiang
0 Points
21 Posts
Apr 23, 2012 12:10 AM|LINK
I would like to know if this code:
<?php $class_id = empty($_POST["class"]) ? 1 : $_POST["class"]; include("Connections/database.php"); $conn = dbConnect(); if (!$conn) die("Couldn't connect to MySQL"); $query = "SELECT PTYPE, PREREQ, DES, TRA, ASS FROM type WHERE TYID=" . $class_id; $res = mysql_query($query); $arr_data = mysql_fetch_assoc($res); mysql_close($conn); $html = "<table width='100%' border='1' cellspacing='0' cellpadding='3'>\n"; $html .= "<tr><th colspan='2'>".$arr_data['PTYPE']."</th></tr>\n"; $html .= "<tr><td>Pre Requsites: </td><td>" . $arr_data['PREREQ'] . "</td></tr>\n"; $html .= "<tr><td>Desscription: </td><td> ".ucwords($arr_data['DES'])."</td></tr>\n"; $html .= "<tr><td>Training: </td><td> ".ucwords($arr_data['TRA'])."</td></tr>\n"; $html .= "<tr><td>Assessment: </td><td> ".ucwords($arr_data['ASS'])."</td></tr>"; $html .= "</table>\n"; echo $html; ?>
can be translated to Razor C# style?? is there any software which can help me?
RAZOR php
hubertjiang
0 Points
21 Posts
Wonder if it is possible to convert this code to Razor C#?
Apr 23, 2012 12:10 AM|LINK
I would like to know if this code:
<?php $class_id = empty($_POST["class"]) ? 1 : $_POST["class"]; include("Connections/database.php"); $conn = dbConnect(); if (!$conn) die("Couldn't connect to MySQL"); $query = "SELECT PTYPE, PREREQ, DES, TRA, ASS FROM type WHERE TYID=" . $class_id; $res = mysql_query($query); $arr_data = mysql_fetch_assoc($res); mysql_close($conn); $html = "<table width='100%' border='1' cellspacing='0' cellpadding='3'>\n"; $html .= "<tr><th colspan='2'>".$arr_data['PTYPE']."</th></tr>\n"; $html .= "<tr><td>Pre Requsites: </td><td>" . $arr_data['PREREQ'] . "</td></tr>\n"; $html .= "<tr><td>Desscription: </td><td> ".ucwords($arr_data['DES'])."</td></tr>\n"; $html .= "<tr><td>Training: </td><td> ".ucwords($arr_data['TRA'])."</td></tr>\n"; $html .= "<tr><td>Assessment: </td><td> ".ucwords($arr_data['ASS'])."</td></tr>"; $html .= "</table>\n"; echo $html; ?>can be translated to Razor C# style?? is there any software which can help me?
RAZOR php