Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. echo $premiso; echo "and for Qty use on change!";
  2. also here http://www.phpfreaks.com/forums/index.php/topic,155984.0.html
  3. $Query = "SELECT * FROM analyzer_query WHERE Employee_ID = {$_POST['Employee_ID']}"; should be $Query = "SELECT * FROM analyzer_query WHERE Employee_ID = '{$_POST['Employee_ID']}'"; Note the single quotes SELECT * FROM analyzer_query WHERE Employee_ID = '{$_POST['Employee_ID']}'";
  4. you need the Thispage = i added that back bascially you could do Thispage="www.thisISmySITE.com" but Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL") gets those details try it, see what happens <% Dim objHttp set objHttp = Server.CreateObject("Microsoft.XMLHTTP") Thispage=Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL") objHttp.open "POST", "http://www.advicediva.com.com/ad/comments/comments.php?PAGE=" & Thispage, false objHttp.Send If objHttp.status = 200 Then response.write(objHttp.responseText) End If set objHttp = nothing %>
  5. http://www.google.co.uk/search?q=php+CMS found loads
  6. erm.. your missing part of that error! inany case change to $Query = "SELECT * FROM analyzer_query WHERE Employee_ID = '{$_POST['Employee_ID']}'"; it should stop the error
  7. Okay i think i get you.. your calling from an ASP using XMLHTTP request to call a PHP page (to do stuff) but a form on the PHP page needs to contain the path of the ASP page .. Okay.. if you doing 90% of the code in ASP i would do this <% Dim objHttp set objHttp = Server.CreateObject("Microsoft.XMLHTTP") 'Get the current page (i thin the below will do it set Thispage ="http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL") 'Pass it via URL objHttp.open "POST", "http://www.yoursite.com/ad/comments/comments.php?PAGE=" & Thispage, false objHttp.Send If objHttp.status = 200 Then response.write(objHttp.responseText) End If set objHttp = nothing %> $ASPpage = urldecode($_GET['PAGE']); <input type=hidden name="href" value="$ASPpage"> Other option is PHP only <input type=hidden name="href" value="{$_SERVER['HTTP_REFERER']}"> i think thats what your looking for
  8. change from "../init.php" to "init.php"
  9. change $ret = $db_conn->Execute("SELECT * FROM analyzer_query WHERE Employee_ID = {$_POST['Employee_ID']}") or die("Please enter correct EmployeeID"); to var_dump($_POST['Employee_ID']); $Query = "SELECT * FROM analyzer_query WHERE Employee_ID = {$_POST['Employee_ID']}"; $ret = $db_conn->Execute($Query) or die("Please enter correct EmployeeID:$Query");
  10. Okay i have read this twice.. and i have no idea what your asking.. what do you want to do ?
  11. LMAO, I read it correctly but copied the wrong thing..
  12. Okay.. i haven't used ADODB, for a while but i think this should do it.. <?php require("config.php"); if($_GET['action'] == 'post') { if(!empty($_POST['Employee_ID'])) { $ret = $db_conn->Execute("SELECT * FROM analyzer_query WHERE Employee_ID = {$_POST['Employee_ID']}") or die("Please enter correct EmployeeID"); if ($ret->FieldCount() < 1) { error("blank"); exit; } } if( empty($_POST['Date']) || empty($_POST['Activity']) || empty($_POST['Miles'])) { //if everything is not filled in than prints out error message error("blank"); exit; } else $db_conn->Execute("INSERT INTO Activity_Log (`Employee_ID`, `Date`, `Activity`, `Miles`) VALUES ('{$_POST['Employee_ID']}', '{$_POST['Date']}', '{$_POST['Activity']}', '{$_POST['Miles']}')") or die("Error in connecting to the database"); header("Location: success.php?action=success"); } function error($error) { //if error is equal to blank if($error == 'blank') { echo "Please fill in all the required fields before submitting"; } } ?>
  13. check the file "msgloglist.php" exists in 'FlashChat/admin/'
  14. something like this depends on the connection type <?php require("config.php"); if($_GET['action'] == 'post') { if(!empty($_POST['Employee_ID'])) { $db_conn->Execute("SELECT * FROM analyzer_query WHERE Employee_ID = {$_POST['Employee_ID']}") or die("Please enter correct EmployeeID"); //unsure if your using ODBC if ($db_conn->odbc_num_rows < 1){ error("blank"); exit; } } if( empty($_POST['Date']) || empty($_POST['Activity']) || empty($_POST['Miles'])) { //if everything is not filled in than prints out error message error("blank"); exit; } else $db_conn->Execute("INSERT INTO Activity_Log (`Employee_ID`, `Date`, `Activity`, `Miles`) VALUES ('{$_POST['Employee_ID']}', '{$_POST['Date']}', '{$_POST['Activity']}', '{$_POST['Miles']}')") or die("Error in connecting to the database"); header("Location: success.php?action=success"); } function error($error) { //if error is equal to blank if($error == 'blank') { echo "Please fill in all the required fields before submitting"; } } ?> also echo error("blank"); should be error("blank");
  15. Okay i only skimmed the post but i think you want something like this 3 tables (as examples) Table: users userID, UserName, FirstName Table: Gifts GiftID, GiftName, GiftPrice Table: UserGifts uID, UserID, GiftID now the 'Users' table has a list of users and the 'Gifts' table a list of gifts.. so to link a gift to a users you add a new records in 'UserGifts' with the usersID and the GiftID.. make sense ? of course Gifts could be the children and the user could be the parent.. or even users be the family name and the gifts members of that family as a side note for autonumbers.. if you do an insert use mysql_insert_id() to get the autonumbers.. hope this helps EDIT: oh the uID on UserGifts table is UniqueID, (most tables should have one)
  16. you need a script.. google or the freelance section works well
  17. try here http://www.phpfreaks.com/forums/index.php/topic,155984.0.html
  18. try this <?php $i = 0; $tmpname = ""; while ($rs_prop = mysql_fetch_array($result_prop)) { ?> <tr> <td style="padding-left:5px; padding-right:2px;" width="188" height="23" bgcolor="#E9EDF4" class="style35"><span class="style10"> <?php if($rs_prop["Name"] != $tmpname) { $tmpname = $rs_prop["Name"]; echo $rs_prop["Name"]; } ?> </span></td> <td height="23" bgcolor="#E9EDF4" class="style35" style="padding-left:5px; padding-right:2px;"><span class="style10"> <?= $rs_prop["Venue_Name"]; ?> </span></td> <td height="23" bgcolor="#E9EDF4" class="body4"><div align="right"><span class="style10"> <?= $rs_prop["Quantity"]; ?> </span></div></td> <td height="23" bgcolor="#E9EDF4" class="body4"><div align="right"><span class="style10"> R <?= $rs_prop["Income"]; ?> </span></div></td> </tr> <?php $i++; }?>
  19. Can you click solved please.. (bottom left)
  20. because one of the function form->formSwitch(); is echoing that.. why not just put the File path in? or do <?php function showEntry() { $form = new forms; // create an instance of selected class $form->formSwitch(); ?> <form method="post" onsubmit="validator()"> ...
  21. \r = CR (carriage return) \n = LF (line feed) they are used for splitting into lines.. but to start a new line depends on the system.. Windows = \r\n unix = \n Mac = \r Now. if you view source your see the line are broken up.. but you need to convert this to html.. so to do this use nl2br() ie <?php $str ="Hello.\r\n\r\nText goes here.\r\n\r\nAnd a seperate paragraph here also!"; echo nl2br($str); ?> EDIT: Ahh .. too slow
  22. try this Read comments <?php //Check your connecting to the database.. (i assume thats okay) //moved the or die to the query (date is a field so use backtick) $query = "SELECT * FROM event WHERE club_id = '$club_id' ORDER BY `date` DESC"; $result = mysql_query($query)or die(mysql_error()); //Line 43 while ($row = mysql_fetch_assoc($result)) { $eventid = $row['event_id']; ?>
  23. So this is a JavaScript question? if so your in the wrong section
  24. you wouldn't use $i a better option would be <?php foreach($_POST as $copy) { //$copy will loop throught the values } ?> if you must use a while.. you could do something like this <?php $i++; $copy= current($_POST); while($i<$num) { $first=mysql_result($result,$i,"First Name"); echo $copy; //At the end $copy= next($_POST); } ?>
  25. please note the 2 options above just takes pratice.. i have spent 2 days trying to work out a problem (was a hard one) but the solution was so simple when i thought about it later
×
×
  • 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.