Jump to content

cherankrish

Members
  • Posts

    5
  • Joined

  • Last visited

cherankrish's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. hi,i need to design a sql table for ecommerce solution.it should have three type of accounts.business account and seller account and consumer account. i did create a table name usertable it has a row name authorizationid and i also create a table name authorization.and make a relation ship with user table.i need more infomation how to make my work neet and how can i make it more professional. can any one help me .my main problem is should i have to create a one main user table or three tables insteed for that.or should i have to create only one table and assingn all rows that can comes with useraccount business account and consumer account after that if it is a user account make other columns hidden.i dont know weather is this correct or not... any one can ple......ase?
  2. i was working on dreamweaver and msaccess.now i download my msaccess databae from the remote server then send it to my testing server.after that i checked the connection via dreamweaver .both connections were ok.loclconnection and testing server connection.after that i create a recordset .but dreamweaver said "loading database schema" after five minutes a alert appered with out text but a "?" mark.i was trying more than five minutes to solve this problem can any one do this??
  3. cherankrish

    php header

    //this is my code have a look please<?php$hostname_consolutiondb = "localhost";$database_consolutiondb = "solutions_db";$username_consolutiondb = "root";$password_consolutiondb = "";$consolutiondb = mysql_pconnect($hostname_consolutiondb, $username_consolutiondb, $password_consolutiondb) or trigger_error(mysql_error(),E_USER_ERROR); function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue;}$editFormAction = $_SERVER['PHP_SELF'];if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);}if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO tbl_question (intcatid, textname, textemail, textheading, textquestion, dtedate, rating, bitapproved) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['intcatid'], "int"), GetSQLValueString($_POST['textname'], "text"), GetSQLValueString($_POST['textemail'], "text"), GetSQLValueString($_POST['textheading'], "text"), GetSQLValueString($_POST['textquestion'], "text"), GetSQLValueString($_POST['dtedate'], "date"), GetSQLValueString($_POST['rating'], "int"), GetSQLValueString($_POST['bitapproved'], "int")); mysql_select_db($database_consolutiondb, $consolutiondb); $Result1 = mysql_query($insertSQL, $consolutiondb) or die(mysql_error()); $insertGoTo = "index.php"; if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo),false);}mysql_select_db($database_consolutiondb, $consolutiondb);$query_rs_category = "SELECT * FROM tbl_category ORDER BY Id ASC";$rs_category = mysql_query($query_rs_category, $consolutiondb) or die(mysql_error());$row_rs_category = mysql_fetch_assoc($rs_category);$totalRows_rs_category = mysql_num_rows($rs_category);?><!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=iso-8859-1" /><title>Post Question!!</title><link href="stylesheets/tables.css" type="text/css" rel="stylesheet" /><style type="text/css"><!--.style1 { font-size: 24px; font-weight: bold;}.style2 {color: #000000}--></style></head><body><table width="100%" border="0"> <!--DWLayoutTable--> <tr> <td height="48" valign="top"><img src="pagepics/yoohee.gif" width="243" height="46" /></td> <td rowspan="2" valign="top" bgcolor="#EFEFE4"><p><img src="pagepics/input.jpg" width="251" height="252" /></p> <p><span class="style1">Y</span><strong>ou can ask any kind of question in yoohee </strong>solutions IT ,Home,Relationship whetever.but<br /> dont put any nasty questions or badwords.Our world wide useres will answer your question with in few seconds </p> </td> </tr> <tr> <td height="142" valign="top"><form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1"> <table> <tr valign="baseline"> <td nowrap="nowrap" align="right">Your Name:</td> <td><input type="text" name="textname" value="" size="60" /></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Mail ID:</td> <td><input type="text" name="textemail" value="" size="60" /></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Category:</td> <td><select name="intcatid"> <?phpdo { ?> <option value="<?php echo $row_rs_category['Id']?>"><?php echo $row_rs_category['text_category']?></option> <?php} while ($row_rs_category = mysql_fetch_assoc($rs_category)); $rows = mysql_num_rows($rs_category); if($rows > 0) { mysql_data_seek($rs_category, 0); $row_rs_category = mysql_fetch_assoc($rs_category); }?> </select> </td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Heading:</td> <td><textarea name="textheading" cols="60"></textarea></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right">Question:</td> <td><textarea name="textquestion" cols="60" rows="5"></textarea></td> </tr> <tr valign="baseline"> <td nowrap="nowrap" align="right"> </td> <td><input name="submit" type="submit" value="Post Question" /></td> </tr> </table> <input type="hidden" name="dtedate" value="<?=date('Y/m/d');?>" /> <input type="hidden" name="rating" value="2" /> <input type="hidden" name="bitapproved" value="1" /> <input type="hidden" name="MM_insert" value="form1" /> </form> <p> </p></td> </tr> <tr> <th colspan="2" bgcolor="#CCCCCC" ><span class="style2">www.Yoohee.lk<br /> <br /> <br /> </span></th> </tr></table></body></html><?phpmysql_free_result($rs_category);?>
  4. cherankrish

    php header

    while i try to insert a query in to my db php throws a error Warning: Cannot modify header information - headers already sent by (output started at C:\webroot\solutions\post.php:3) in C:\webroot\solutions\post.php on line 58what can i do?
  5. if i include my php page[it has connection string] into another php page my apache server throwing an error and ask me to shut down.any body can help me?becoze im a asp guy new to php and mysql...
×
×
  • Create New...