Jump to content

BMurtagh

Members
  • Posts

    42
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

BMurtagh's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. figured it out.. and it was a dumb mistake of not closing a <a href> to users.php with </a>.. now it doesn't revert back thanks for those who viewed the post, if i run into any other issues I'll add to the post
  2. Hello, I'm working on a project at work in which I'm converting our old excel spreadsheets into an online php+mysql web-based system. I have the add user functionality and delete user functionality working, however I'm stuck with editing a current user's database information. I'm populating an "edit user" form with information from the DB based off of the user's ID#: $query = "SELECT * FROM Users WHERE UserID = '$id'"; if (!$result) { echo "Could not successfully run query ($query) from DB: " . mysql_error(); exit; } while($row = mysql_fetch_array($result)) { echo "<fieldset style=\"width:100\" align=\"center\"><legend><font color=\"#FFFF00\">Edit User Information</font></legend><br />"; echo "<center><form id=\"edituser\" name=\"edituser\" method=\"post\" action="">"; echo "<font color=\"#FFFF00\">Name:</font> <input type=\"text\" name=\"name\" id=\"name\" value=\"".$row['Name']."\">" . "<br /><br /><br />"; echo "<font color=\"#FFFF00\">Username:</font> <input type=\"text\" name=\"username\" id=\"username\" value=\"".$row['Username']."\">" . "<br /><br />"; echo "<font color=\"#FFFF00\">Password:</font> <input type=\"text\" name=\"password\" id=\"password\" value=\"".$row['Password']."\">" . "<br /><br /><br /><br />"; echo "<font color=\"#FFFF00\">Department:</font> <input type=\"text\" name=\"dept\" id=\"dept\" value=\"".$row['Department']."\">" . "<br /><br />"; echo "<font color=\"#FFFF00\">Location:</font> <input type=\"text\" name=\"loc\" id=\"loc\" value=\"".$row['Location']."\">" . "<br /><br /><br /><br />"; echo "<font color=\"#FFFF00\">Printer 1:</font> <input type=\"text\" name=\"print1\" id=\"print1\" value=\"".$row['Printer1']."\">" . "<br /><br />"; echo "<font color=\"#FFFF00\">Printer 2:</font> <input type=\"text\" name=\"print2\" id=\"print2\" value=\"".$row['Printer2']."\">" . "<br /><br />"; echo "<br /><br /><br /></center>"; } The main issue I'm currently running into is once the data is pulled from the DB into the textboxes, I go to click on say Name or any of the fields and it basically takes me back to the previous page (users.php) which is just a SELECT * FROM Users and displays the information in a table. On the users.php page, I have 2 post actions, one for edit & one for del: while($row = mysql_fetch_array($result)) { $edit = "<form method=\"post\" action=\"edituser.php\"><input type=\"hidden\" name=\"UserID\" value=\"".$row['UserID'] ."\"><input type=\"image\" src=\"images/edit.png\" border=\"0\" alt=\"Edit Entry\"></form>"; $delete = "<form method=\"post\" action=\"deluser.php\"><input type=\"hidden\" name=\"UserID\" value=\"".$row['UserID'] ."\"><input type=\"image\" src=\"images/del.png\" border=\"0\" alt=\"Edit Entry\"></form>"; $id = $row['UserID']; echo "<p><tr>"; echo "<td>" . $row['UserID'] . "</td>" . "<td> " . $row['Name'] . "</td>" . "<td> " . $row['Username'] . "</td>" . "<td> " . $row['Password'] . "</td>" . "<td> " . $row['Location'] . "</td>" . "<td> " . $row['Department'] . "</td>" . "<td> " . $row['Printer1'] . "</td>" . "<td> " . $row['Printer2'] . "</td>" . "</td>" . "<td align=\"center\">" .$edit . "</td><td align=\"center\">" . $delete . "</td>"; echo "</tr>"; } echo "</table></center><br /><br /><p>"; I'm still confused/unsure why when after I populate the textboxes with the user's information I'm trying to edit it reverts back. If anyone has any suggestions, tips, or code snippets for a better way to do this, I'm interested. Thanks
  3. Hi Q, The 250 status messages of look to be successful ones according to the Microsoft (http://support.microsoft.com/?id=256321) documentation as well as looking up SMTP status codes. Have you attempted to add PHP's error reporting to your code to hopefully see if there's an underlying issue? ini_set("display_errors", "1"); error_reporting(E_ALL); Another suggestion to confirm of the IIS SMTP service is working correctly would be to try using a simple ASP script that sends from the local SMTP to an address. As another side note, have you attempted to connect locally/remotely to the SMTP server using telnet? Hop on the server and type: telnet mail.domain.com(or IP of the SMTP server) 25 This can be done locally or remotely and it should reply with a 220 status code meaning the service is ready.
  4. Hello, The way I'm reading your post is that you just want to keep pinging the IP address until you break the command. You should be able to just use ping <ip address> and it will keep going until you ctrl+c to interrupt it. If you only want it to ping a certain number of times then quit on its own, use the -c option, like this: ping -c 10 xxx.xxx.xxx.xxx Example 1: ping 74.125.127.100 -- Will continuously send pings to the IP until you stop it. Example 2: ping -c 50 74.125.127.100 -- Will send ping requests 50 times and then end. BTW, that IP was from google.com to be used as an example.
  5. Hi, You might have better luck providing the code you already have or are attempting to use. People aren't just going to reply back and say "here's the code" and do it for you. Only way to learn is by doing so give it a shot, do some research and piece some code together and test it out. See how things go from there and then if extra input is needed reply back here with the code & where things stand with the development.
  6. Hi there, The code I came up with (untested) when I took a look at it would be: userip = mysql_real_escape_string($ip); $sql ="SELECT * FROM tbl_ip WHERE ip='" . $userip . "')"; $result = mysql_query($sql); if (!$result) { $message = 'Invalid query: ' . mysql_error() . "\n"; die($message); else { $is_bot = "TRUE"; } Granted this is untested, but it should at least give you a beginning and allow others to comment changes or provide similar examples.
  7. Hi, What version of PHPMyAdmin are you running? Version 3.2.0.1 is the newest stable version out and would recommend upgrading if needed and this may correct your error. If not, reply back so others can pitch in if needed.
  8. Hi there, The reason its erroring out is that a semi-colon is missing from line 34 as wildteen noted. Currently line 34 is: define('DB_COLLATE', '') It should be: define('DB_COLLATE', '');
  9. If you're able to SSH to the box, login again do ps x (if the process is running under your user) or ps aux to list all the processes and then you can 'kill' the unresponsive one according to its PID.
  10. Hi, You can put up a php page in a web-accessible directory with the code below and that should display information regarding mysql, xml, and zlib in the output if its enabled. <?php phpinfo(); ?>
  11. Hey, I think at this point it'd be best to paste the current code you're working with so people can take a look. It'll help you get on the right track quicker hopefully.
  12. Hi there, Remove <hr class="rule"/> line for each person listed and then two <br><br> tags and it'll remove the horizontal line and keep some decent, readable spacing. I also suggest getting Firebug for Firefox that allows you to do a lot of HTML and web development interaction on pages you browse to. See http://getfirebug.com/
  13. Hi AM, Put up a simple PHP info page in a web accessible directory and have the following code to output a run down of PHP on your system: <?php phpinfo(); ?>
  14. I can't access the site either, I think that's part of the issue, but can you post the code for the page where you call the includes? Thanks
  15. I would check the privileges for the root user on the database and would also attempt to connect to the database in your code & perform a select command. This would help clarify whether a connection can be made to mysql & data can be returned. If this works then the issue is isolated between Dreamweaver & MySQL.
×
×
  • 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.