Jump to content

KirstyScott

Members
  • Posts

    22
  • Joined

  • Last visited

    Never

Everything posted by KirstyScott

  1. Ty all for trying to help I'm using SQL, and the NOW() function dosen't work for me, is there any other way to get a date inserted into the database/table using a php script? if so what? ???
  2. I'm trying to find out which people have the highest amount of a column in a table (by doing my code below), but each time i do this it displays the people with an amount in the column but dosen't order it by the column i want it too...below is my code :-X select top 15 COLUMN from TABLE order by COLUMN DESC Anyone know where im going wrong on this? the table itself has around 9 columns in total if that helps anyone And does anyone know how to insert a date using php into a database at the time it was inserted? ??? i'm just learning php as if you can't tell alrdy i'll appreciate any help!
  3. I don't have a code yet, i was just asking if it was possible and if so how would i go about it, i tried the code posted first, but that updates the table before they click the link :-\ So is it possible if someone clicks a link and as soon as they click the link, a table gets updated? and how would i go about this? :-X
  4. TY darkfreaks! but i tried that and it dosen't do the thing i asked, ty for trying though Still need help on this one guys
  5. Hi all Is it possible to make a db update when someone clicks a link, if so how would i go about doing this? and if possible, make it once every 12 hours or day? ???
  6. does anyone know how i re-direct a user to my /index.php if they try and navigate to a .php file that dosen't exist? apart from saying the 404 error of 'Object not found'?
  7. The server is using XP. And does anyone know how i re-direct a user to my /index.php if they try and navigate to a php file that dosen't exist? apart from saying the 404 error of 'Object not found'?
  8. how can i prevent people from being able to create files on my htdocs, steps please - i wanna let people see the pages they're suppose to see but not able to write inside my htdocs from protection of being hacked, how do i set these permissions and what are the steps?
  9. This may sound stupid to yah but i'm quite new at php if yah can't tell already But how can i make Apache run as a user with access only to the web docs? steps plz
  10. Can anyone tell me if theres a free program that monitors your /home/ folder to make sure no new files are being created there (by a hacker), and if so could anyone recommend one for meh that's easy to install and use? Thanks
  11. Pardon but i have no clue where that is Still needin' a little help
  12. i gave the error on my first code, the botton 2 codes are my ht files
  13. i set a encripted pass in my .htpass file, but each time i try it i'm getting Server error! The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script. Even though i've tried like 8+ different sites giving me different encripted codes, all i want is to be able to login with an encripted pass, what's the problem with this? Upz, Forgot to add my htaccess file and htpass, both are in same dir. htaccess AuthName "Restricted Area" AuthType Basic AuthUserFile /home/folder/.htpasswd AuthGroupFile /dev/null require valid-user htpasswd USERNAME:ENCRIPTEDPASSHERE
  14. PHP files, but these files aren't suppose to be public files, files like config.php on so on
  15. I just created a website and want to set some permissions to "admin only" files, what are the steps in order to make these files only accessable, viewable by admins. These files will be located inside the Htdocs on C:\xampp\htdocs\ADMINFILESHERE Ty and will appreciate help on this
  16. Thanks for all your replys and help. This is my new code below <?session_start();?> <head> <title>Website report</title> </head> <body style="margin:0;background-color:#000000;"> <? include('./config.php'); if (!$_SESSION['sesuser'] == 1) {header(index.php);} else { $userform=" <table bgcolor='black' cellpadding='0' cellspacing='0' border='0' align='center'> <tr> <td width='726' height='300' valign='top' background='./content_bkgrd.gif'> <img src='./content_top2.gif' width='726' height='71' /> <table width='560' border='0' align='center' cellpadding='0' cellspacing='0'> <tr> <td> <hr color='#9f7401'> <table border='0' width='100%'> <tr width='100%'> <td align='left' width='25%'> <td align='left' width='70%'> ..:: <a href='/index.php'>Home</a> | <a href='/index.php?act=user&actu=support'>Read rules</a> | <a href='/index.php?act=logout'>Logout</a> ::.. </td> </tr> </table><hr color='#9f7401'> <table width='556' border='0' cellspacing='0' cellpadding='0'> <tr> <td colspan='3'><img src='./news_top.gif' width='556' height='49'></td> </tr> <tr> <td width='13' valign='bottom' background='./news_slice_left.gif'> </td> <td width='530' align='left' valign='top' bgcolor='#e7dbc3'> <table width='530' border='0' cellspacing='0' cellpadding='6'> <tr> <td width='143' height='35' colspan='2' bgcolor='#25120B' class='textwhite'></font><font color='#bd8e00'>Contact us</font></td> <td width='296' height='35' bgcolor='#25120B' class='textwhite'></font><font color='#bd8e00'></font></td> </tr> <tr> <td width='546' colspan='3' rowspan='6' valign='top' bgcolor='#e7dbc3' class='bodytextnews'> <br /> <form action='/web_dialogs' method='POST'><table border='0' cellpadding='3'><tr><td valign='top'><font face='times' color='black' size='2'>Send to which department?</td><td><label><input name='web_dialog[client_department_id]' type='radio' id='web_dialog_client_department_id_119' value='119'><font face='times' color='black' size='2'>Website question</label><br><label><input name='web_dialog[client_department_id]' type='radio' id='web_dialog_client_department_id_120' value='120'>Account deletion</label><br><label><input name='web_dialog[client_department_id]' type='radio' id='web_dialog_client_department_id_121' value='121'><font face='times' color='black' size='2'>Website report</label><br><label><input name='web_dialog[client_department_id]' type='radio' id='web_dialog_client_department_id_122' value='122'><font face='times' color='black' size='2'>(Other)</label><br><p></td></tr><tr><td><font face='times' color='black' size='2'><i>First</i> name:</td><td><input name='web_dialog[fname]' size='30' type='text' id='web_dialog_fname'></td></tr><tr><td><font face='times' color='black' size='2'>Account secret code:</td><td><input name='web_dialog[lname]' size='30' type='text' id='web_dialog_lname'></td></tr><tr><td><font face='times' color='black' size='2'>Valid e-mail - <font face='times' color='black' size='1'><br></td><td><input name='web_dialog[email]' size='30' type='text' id='web_dialog_email'></td></tr><tr><td colspan='2'><hr></td></tr><tr><td><font face='times' color='black' size='2'>Subject:</td><td><input name='web_dialog[visitor_subject]' size='39' type='text' id='web_dialog_visitor_subject'></td></tr><tr><td valign='top'><font face='times' color='black' size='2'>Message:</td><td><textarea name='web_dialog[message]' id='web_dialog_message' rows='10' cols='30'></textarea></td></tr><tr><td colspan='2'><hr></td></tr><tr><td colspan='2'><font face='times' color='red' size='2'> </td></tr><tr><td><font face='times' color='black' size='2'>Verification code<font face='times' color='red' size='1'> - Case sensitive </td><td><img name='CaptchaImage' src='' id='CaptchaImage' height='40' alt='Verification' width='150'></td></tr><tr><td><font face='times' color='black' size='2'>Enter code</td><td><input name='code' size='8' type='text' id='code'> <font face='times' color='red' size='1'> case sensitive </td></tr><tr><td colspan='2'><center><br><center></center><p><br> <input name='commit' type='submit' value='Send message' onclick='this.setAttribute('originalValue', this.value);this.disabled=true;this.value='Processing...';;result = (this.form.onsubmit ? (this.form.onsubmit() ? this.form.submit() : false) : this.form.submit());if (result == false) { this.value = t his.getAttribute('originalValue'); this.disabled = false };return result'></td></tr></table><input name='store' type='hidden' id='store' value='62'><input name='rand' type='hidden' id='rand' value=''><input name='web_dialog[visitor_language_id]' type='hidden' id='web_dialog_visitor_language_id' value='1'></form><script src='/javascripts/loadcaptcha.js' type='text/javascript'></script><script type='text/javascript' language='JavaScript'>LoadCaptcha(875,'5f6070a9f53935b04b6e54033fa28e08');</script><br> </td> </tr> <tr></tr> <tr height='15'></tr> <tr height='15'></tr> <tr height='15'></tr> <tr height='184'></tr> <tr height='14'> <td class='bodytextnews' colspan='3' valign='top' bgcolor='#e7dbc3' width='446' height='14'> </td> </tr> </table> </td> <td width='13' valign='bottom' background='./news_slice_right.gif'> </td> </tr> </table> <img src='./tble_btm.gif' width='556' height='49'> </form> <table width='95%' border='0' cellspacing='0' cellpadding='0'> <tr> </table> </p> </td> </tr> </table></td> </tr> <tr> <td height='57' colspan='2' style='background-image:url(./content_bottom2.gif);background-repeat:no-repeat;'></td> </tr>" //display page } I'm pretty sure i've done it all right, but the above code is giving me "Parse error: syntax error, unexpected '}' in filename.php on line 136" I'm struggling with this :-\, and would appreciate help to fix the above code
  17. That is the actual code, the reason for it not having the session_start(); at the top is because i forgot to copy it in as it's at the top
  18. Opps, i forgot to say, i do have the session_start(); at the top of each page, and i tried what yah said ngreenwood6, i put that just below the session_start(); and i'm still able to view this even being logged out ??? Help :'(
  19. Hiya, Well basically what i wanted to do, was for the below code to be only accessable useable for the registered members and any other unregistered members would be either re-directed to the /index.php or not able to access/view the file, but i'm stuck on this as i'm really new to php and sql, and if anyone can give me some advice or help me do this, it'll be much appreciated - it'll keep you busy for like, at least 1 min The almighty php code <? include('./settings.php'); if ($security == 1) { $loginform = ' <hr color="#9f7401"> Logged in as : '.$_SESSION['sesuser'].', ($_SESSION['sesadmin'] <table border="0" width="100%"> <tr width="100%"> <td align="left" width="25%"> <td align="left" width="70%"> ..:: <a href="/index.php">Home</a> | <a href="/index.php?act=user&actu=support">Read rules</a> | <a href="/index.php?act=logout">Logout</a> ::.. </td> </tr> </table><hr color="#9f7401"> <table width="556" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="3"><img src="./news_top.gif" width="556" height="49"></td> </tr> <tr> <td width="13" valign="bottom" background="./news_slice_left.gif"> </td> <td width="530" align="left" valign="top" bgcolor="#e7dbc3"> <table width="530" border="0" cellspacing="0" cellpadding="6"> <tr> <td width="143" height="35" colspan="2" bgcolor="#25120B" class="textwhite"></font><font color="#bd8e00">Contact owner</font></td> <td width="296" height="35" bgcolor="#25120B" class="textwhite"></font><font color="#bd8e00"></font></td> </tr> <tr> <td width="546" colspan="3" rowspan="6" valign="top" bgcolor="#e7dbc3" class="bodytextnews"> <br /> <form action="/web_dialogs" method="POST"><table border="0" cellpadding="3"><tr><td valign="top"><font face="times" color="black" size="2">Send to which department?</td><td><label><input name="web_dialog[client_department_id]" type="radio" id="web_dialog_client_department_id_119" value="119"><font face="times" color="black" size="2">report</label><br><label><input name="web_dialog[client_department_id]" type="radio" id="web_dialog_client_department_id_120" value="120">Website bug</label><br><label><input name="web_dialog[client_department_id]" type="radio" id="web_dialog_client_department_id_121" value="121"><font face="times" color="black" size="2">problem</label><br><label><input name="web_dialog[client_department_id]" type="radio" id="web_dialog_client_department_id_122" value="122"><font face="times" color="black" size="2">(Other)</label><br><p></td></tr><tr><td><font face="times" color="black" size="2"><i>Characters</i> name:</td><td><input name="web_dialog[fname]" size="30" type="text" id="web_dialog_fname"></td></tr><tr><td><font face="times" color="black" size="2">Account secret code:</td><td><input name="web_dialog[lname]" size="30" type="text" id="web_dialog_lname"></td></tr><tr><td><font face="times" color="black" size="2">Valid e-mail - <font face="times" color="black" size="1">so we can contact you<br></td><td><input name="web_dialog[email]" size="30" type="text" id="web_dialog_email"></td></tr><tr><td colspan="2"><hr></td></tr><tr><td><font face="times" color="black" size="2">Subject:</td><td><input name="web_dialog[visitor_subject]" size="39" type="text" id="web_dialog_visitor_subject"></td></tr><tr><td valign="top"><font face="times" color="black" size="2">Message:</td><td><textarea name="web_dialog[message]" id="web_dialog_message" rows="10" cols="30"></textarea></td></tr><tr><td colspan="2"><hr></td></tr><tr><td colspan="2"><font face="times" color="red" size="2"> </td></tr><tr><td></center><p><br><input name="commit" type="submit" value="Send message" onclick="this.setAttribute('originalValue', this.value);this.disabled=true;this.value='Processing...';;result = (this.form.onsubmit ? (this.form.onsubmit() ? this.form.submit() : false) : this.form.submit());if (result == false) { this.value = this.getAttribute('originalValue'); this.disabled = false };return result"></td></tr></table><input name="store" type="hidden" id="store" value="62"><input name="rand" type="hidden" id="rand" value=""><input name="web_dialog[visitor_language_id]" type="hidden" id="web_dialog_visitor_language_id" value="1"></form><script src="/javascripts/loadcaptcha.js" type="text/javascript"></script><script type="text/javascript" language="JavaScript">LoadCaptcha(875,"5f6070a9f53935b04b6e54033fa28e08");</script><br> </td> </tr> <tr></tr> <tr height="15"></tr> <tr height="15"></tr> <tr height="15"></tr> <tr height="184"></tr> <tr height="14"> <td class="bodytextnews" colspan="3" valign="top" bgcolor="#e7dbc3" width="446" height="14"> </td> </tr> </table> </td> <td width="13" valign="bottom" background="./news_slice_right.gif"> </td> </tr> </table> <img src="./tble_btm.gif" width="556" height="49"> </form> <table width="95%" border="0" cellspacing="0" cellpadding="0"> <tr> </table> </p> </td> </tr> </table></td> </tr> <tr> <td height="57" colspan="2" style="background-image:url(./content_bottom2.gif);background-repeat:no-repeat;"></td> </tr>; } ?> Thanks, and if you could please explain what was wrong, cause as i said, i'm really new to php and all stuff, so would appreciate it all, so i won't make the mistake again! (hopefully)
×
×
  • 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.