Jump to content

samshel

Members
  • Posts

    837
  • Joined

  • Last visited

Everything posted by samshel

  1. M not sure...but i think u can do something like this use IMAP functions in PHP..
  2. <?php $con = mysql_connect("host" , "database" , "pw"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("databasename", $con); //when clicked on particular application link, IGN for that record will be passed by GET method to this page. $applicationID = $_GET['ign']; //Code here to show form and text box to adde comments... form should submit to this page itself... // assumption form has a submit button called btnAddSubmit and textbox called txtComments, //add a field called admin_comments in table... // also make sure u pass the ign to the form action URL example...form action should be // thispage.php?ign=<?php echo $_GET['ign'] ?> if(isset($_POST['btnAddSubmit']) && trim($_POST['txtComments']) != "") { $result = mysql_query("UPDATE application SET `admin_comments` = '". mysql_real_escape_string($_POST['txtComments']) ."' WHERE `IGN` = '".$_GET['ign']."'"); } //to see particular application, $result = mysql_query("SELECT * FROM application WHERE `IGN` = '".$ign."'"); echo "<table border='1'> <tr> <th>In Game Name</th> <th>Comments:</th> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['ign'] . "</td>"; echo "<td>" . $row['comment'] . "</td>"; echo "<td>" . $row['admin_comment'] . "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?> something like this... BTW i am a guy
  3. please post if u have already tried some code...
  4. works for me if i hard code the variables. means there may be a problem with URL.. please view source ur page in IE and post the the part with a href and img
  5. what is the JS error is it showing?
  6. this is a JS problem..please post in appropriate forum.
  7. u r already generating an alphanumeric key when the user posts the announcement.. you can use the same. in the PHP script u will link with cath-all do the following: sudo code //connect to datbase //Use the TO email field to extract aplhanumeric key...us can use explode() for this.. //fire query to fetch user email address from datbase using this alphanumeric key. //send mail. is this what r u trying to do? if not please excuse me...
  8. Try Java script...PHP is server side.. if u already have all the information u need in ur page (Quantity & Cost), u dont need to go to server to calculate something... Use Javascript to do that.
  9. i think it is better option not to write the prices with commas in the first place in the file which u r loading..ofcourse u should have control of that script.. if u want to do it here, u will have to loop through all rows using for loop, format the price properly and use INSERT...so u can no more use LOAD FILE this is again as per my knowledge..there can be better ways.
  10. yes u should...simple way ereg_replace("," , "", "1,000"); TIP: never use/store number with thousad seperators in DATABASE or doing operations. Thousand seperators should be used only for displaying...
  11. <?php echo "GET...."; var_dump($_GET); echo "POST...."; var_dump($_POST); this will show u if variables are passed properly to the page or not..
  12. r u sending topic variable via GET i.e. URL ?
  13. prepare a form first...just like u did for inserting asking only for IGN number with field name as ign..submit the form to your page above..and add the following code: <?php $con = mysql_connect("host" , "database" , "pw"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("databasename", $con); $ign = mysql_real_escape_string($_POST['ign']); $result = mysql_query("SELECT * FROM application WHERE `IGN` = '".$ign."'"); echo "<table border='1'> <tr> <th>In Game Name</th> <th>Comments:</th> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['ign'] . "</td>"; echo "<td>" . $row['comment'] . "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?>
  14. mktime(0, 0, 1, date("n"), date("j") , date("Y"));//Start of day 12:01 AM mktime(23, 59, 59, date("n"), date("j") , date("Y"));//Start of day 11:59:59 PM
  15. include("../includes/db.php");//relative path OR include("/var/www/html/www.sitename.com/includes/db.php");//relative path OR
  16. sorry ! i am not aware of a work around for this ! but that flag is specially defined to block such thing, so my assumption is it will be difficult to fo a workaround...but may be i am wrong.
  17. i think u r using PHP4... try this.. class geocoin { var $tracknum; function geocoin($track) { $this->tracknum = $track; } function returnTrackNum() { return $this->tracknum; }
  18. class geocoin { var $tracknum; function __construct($track) { $this->tracknum = $track; } function returnTrackNum() { return $this->tracknum; } try this..
  19. class geocoin { private $tracknum; function __construct($track) { $this->tracknum = $track; } function returnTrackNum() { return $this->tracknum; } oops ..forgot the $ sign...
  20. samshel

    isset

    he means $name is different than $_POST['name']. $name is a variable u have defined, $_POST['name'] is a value which will come after u submit a form.
  21. define tracknum as member variable class geocoin { private tracknum; function __construct($track) { $this->tracknum = $track; } function returnTrackNum() { return $this->tracknum; }
  22. it should display only IGN and comment as per ur code.. check in phpmyadmin if the values are stored correctly, may be all data is in one field
  23. $validSecurityCode = md5($_POST['Spam_Code']) == $_SESSION['key']; echo $validSecurityCode; print security code on submitted page and check if it is correctly displayed.
  24. u need to filter on the username or a key like IGN..but next question would be how do we know which person is seeing the page.. you can put a login functionality in ur system and map the users with the IGN. u should get plenty of help on login in this forum.
×
×
  • 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.