Jump to content

atlanta

Members
  • Posts

    172
  • Joined

  • Last visited

    Never

Everything posted by atlanta

  1. You will need to looking into C# coding.. which is more of a windows application programming language rather as php is web based so you will probably have to do a combination of both.
  2. Yea try just using \n also i seen you put the password in the session you just output it as the array value. Putting the password in the session is a security hole.
  3. Yea you have to remember that you have to put the relative location.
  4. First Create a page that reads from a table that has the images url,id number and shows a picture of the image along with a comment box etc..<br> then have another table that holds the comments for certain images by id.
  5. atlanta

    In URL

    that being said i created a solution for you <? $coupon = explode("/",$_SERVER['PHP_SELF']); if ($coupon[1] == "coupon=free") { echo "you have a free coupon"; } else { echo "You pay full price"; } ?>
  6. atlanta

    In URL

    it didnt work because your url isnt calling any GET parameters you have to add a ? before coupon to make the next part , part of the $_GET['coupon'] variable.
  7. Yes that is exactly what im looking for except instead of having images to display the status, i need it to be text. Many thanks Tom Bullock ok just use this and change the text as wanted <?php $server = "127.0.0.1"; $port = "80"; $timeout = "10"; if ($server and $port and $timeout) { $verbinding = @fsockopen("$server", $port, $errno, $errstr, $timeout); } if($verbinding) { ?> <font color="green">Online</font> <? } else { ?> <font color="red">Offline</font> <? } fclose($verbinding); ?>
  8. I say do the method he gave you just put it into an if command . for instance if($user = "admin") { dont filter; } else { filter using the preg_replace }
  9. explode on ',' <? $test = "'something1','something2','1,2,3'"; $test2 = explode("','",$test); echo $test2[0]; echo $test2[1]; echo $test2[2]; ?>
  10. Yea i think generating a random string is the best because then if the user uses that password for everything it wont be compromised!
  11. <?php $server = "127.0.0.1"; $port = "80"; $timeout = "10"; if ($server and $port and $timeout) { $verbinding = @fsockopen("$server", $port, $errno, $errstr, $timeout); } if($verbinding) { echo "<img src='./images/on.gif'>Website is online<br>"; } else { echo "<img src='./images/off.gif'>Website is offline<br>"; } fclose($verbinding); ?>
  12. Well i know when i made a upload script a while back it created the folder as owner = 0
  13. The reason you get the error is because the server creates your folder as nobody i believe and you are giving it 777 chmod which web users arent allowed to access this .. you want to chown the folder to your webuser name. Check you Ftp program and look at the owner field if u have one it should have a number and if the new folder has 0 then that is the problem above But like cooldude832 said you should use the DB that way and just allow them to have a directory for space ... the method you are using is pretty senseless!
  14. I think using get to call the file is a bad idea unless you filter the input,
  15. My suggestion is on the forgot password page select the user's email from the database have the script generate a random string then send this to the user in a email at the end of the script.. and allow them to reset the password with the correct random string entered!
  16. You might want to use a database it is much easier to manage than using flatfile
  17. you could set the cookie like so.. setcookie("TestCookie", $_POST['thenameofformitem']); or $_COOKIE['cookiename'] = $_POST['thenameofformitem']; i believe you can do that.
  18. im guessing im not understanding your question ... enough... could you elaborate ??... do you just wanna echo the data that is put into the form??<br>also you may want to filter those inputs for the form so you dont have any injection of code on your page
  19. yea try above if doesnt work post the rest of the code with the site_url variable etc.. so we can see any other error that might cause it to not work
  20. the only thing is to check to make sure that the values coming from the DB of the match the values that are put into the if statements .. i took out the db function and made mine static and go the script to work fine so hit me up in a PM if u need help on it
  21. Here is the new mofidied code. The last problem was I forgot a field and didn't close a ( with a ): <?php define("DATABASE_SERVER","localhost"); define("DATABASE_USERNAME","root"); define("DATABASE_PASSWORD","webmaster"); define("DATABASE_NAME","flhospital"); $mysql = mysql_connect(DATABASE_SERVER, DATABASE_USERNAME, DATABASE_PASSWORD) or die("could not connect"); mysql_select_db(DATABASE_NAME) or die ("could not connect to database"); function quote_smart($value) { if (get_magic_quotes_gpc()) { $value = stripslashes($value); } if (!is_numeric($value)) { $value = "'" . mysql_real_escape_string($value) . "'"; } return $value; } $Query = sprintf("UPDATE main SET Key=%s, PERIOD=%s, PERIOD_DATE=%s, PERIOD_DESC=%s, MARKER=%s, ACT=%s, MA_1=%s, LPL_1=%s, UPL_1=%s, GREEN=%s, RED=%s, POS=%s, NEG=%s, DV=%s, CV=%s, MV=%s, PV=%s, MA_3=%s, LPL_3=%s, UPL_3=%s, BELOW=%s, WITHIN=%s, ABOVE=%s WHERE RowID=%s", quote_smart($_POST['keyid']), quote_smart($_POST['period']), quote_smart($_POST['period_date']), quote_smart($_POST['period_desc']), quote_smart($_POST['marker']), quote_smart($_POST['act']), quote_smart($_POST['ma1']), quote_smart($_POST['lpl1']), quote_smart($_POST['upl1']), quote_smart($_POST['green']), quote_smart($_POST['red']), quote_smart($_POST['pos']), quote_smart($_POST['neg']), quote_smart($_POST['dv']), quote_smart($_POST['cv']), quote_smart($_POST['mv']), quote_smart($_POST['pv']), quote_smart($_POST['ma3']), quote_smart($_POST['lpl3']), quote_smart($_POST['upl3']), quote_smart($_POST['below']), quote_smart($_POST['within']), quote_smart($_POST['above']), quote_smart($_POST['rowid'])); $Result = mysql_query( $Query ) or die (mysql_error()); ?> Its in your query statement put ` around your field names
  22. hey ok i got the code edit to where it works can you send me the url where u have the error i want to see what error you get
  23. http://www.w3schools.com/php/
×
×
  • 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.