Jump to content

codrgii

Members
  • Posts

    89
  • Joined

  • Last visited

    Never

Everything posted by codrgii

  1. I'm looking to update a sql table using php, i wish for a php script to update and insert the time it was last ran so it inserts that time into a sql table, which php function is best suited for the job and would you mind showing an example of it?
  2. codrgii

    proxys

    is it possible to detect if someone is using a proxy server? i assume so as i've seen various sites being able to, so would anyone that knows, share some examples of it below?
  3. is it possible to capture a persons ip with $_session as soon as they login? if so how? and if the session ip changes how would it be able to realise that?
  4. i'm having trouble with preg_replace, how do i make it that the preg_replace replaces any characters thats not in the list of a-z,A-Z,0-9 and only allow the characters ' ', '-', '(', ')' to be entered?
  5. I'm declaring a table name as a varable and trying to update a table using that varable name, like below. $table = "coursework"; odbc_exec($con, "UPDATE $table SET number = '1'"); but when i try that it errors, does anyone know what's to be done here?
  6. is this secure? if (!empty($_GET['act']) && (file_exists('./page/'.ggg($_GET['act']).'.php'))) { include('./pages/'.($_GET["act"]).'.php'); if not then does anyone have any good examples to make it securer?
  7. SOLVED !
  8. How do i stop people from seeing 'to display the webpage again internet explorer needs to resend the information' and just redirect them to another page instead? This often happens when someone has sent information over to my webpage, and refreshes the page, so how can i avoid this and just redirect them when this happens?
  9. and how would i use preg_replace for something like emails, where it only accepts @, . and numbers and letters (smallcase / uppercase)?
  10. using preg replace, how do i make it accept only smallcase a-z, capitals A-Z, numbers 0-9 and the characters : and _ and replace any other characters not in this list to ''? i got the numbers and letters working but not the character : and _, does anyone know how to do this?
  11. pardon but i forgot to mention how would i check to see if the user input contains at least one capital,one number and one lowercase? would it be like if(!preg_match('~[A-Za-z0-9]~', $input))
  12. how do i check in php if someone has posted at least 1 capital as their input and if they haven't then exit(); ?
  13. im really new at using mod rewrite, how would i make something like www.mysite.com/somefolder/somefile.php look like www.mysite.com/fakefolder/fakefile.php or look like www.mysite.com/folder?act=file how would that be set out in htaccess? ty for any help
  14. anyone?
  15. nobody know?
  16. im really new at using mod rewrite, how would i make something like www.mysite.com/somefolder/somefile.php look like www.mysite.com/fakefolder/fakefile.php or look like www.mysite.com/folder?act=file how would that be set out in htaccess? ty for any help
  17. my echo has stuff already inside it such as $users5 = $total + $total4; echo '<table>with info here</table><br>'.$users5.' '; the problem with that is that it dosent show the $users5 part and is blank, whys that and how do i make the result show?
  18. This is what im trying $users= odbc_exec($con, "SELECT COUNT(*) FROM TABLE"); $total = odbc_result($users, 1); $users4= odbc_exec($con, "SELECT COUNT(*) FROM TABLE4"); $total4 = odbc_result($users4, 1); $users5 = "$total + $total4"; echo ""$users5""; and it dosen't work, it collects the data from 2 different tables, and i want to add them up into one final result, how would i manage to do this?
  19. i have 2 servers running, the first server is the webserver , the second server is connected to the first server via linked server using sql, so the question is, how am i able to excute a php script on my second server via the first server on the website? how would i lay that out?
  20. Posting your actual code would help.
  21. Is it possible to use a variable as a tablename? Below is a reference on what I am trying todo. Any pointers or clues would be greatly appreciated!! $query = "UPDATE users SET '$table' = '$table'+18 WHERE id='$id'";
  22. in a form if someone is using the caps lock and entering the fields with caps, how do i process that and turn them into small case?
  23. How do i make the sp show all the results? select * from table result and the count (*) result? i've tried this but at best can only make it come back showing just 1 result from the select (last result selected)... I'll try myself and read more about how sp works in php, pretty sure this would have to be an array of results...in the meantime will appreciate any guidance on this
  24. First quote here asking what was possible, and if this was possible, you asked for codes, i gave you them, you fail. Nice one. Moving on, hopefully someone else will help me with this, providing just examples on how to show results in php using a sp, which is what i asked for at the very first post i made.
  25. Lol'ed. Your the one not reading the topic, take a min to have a lil read over it again, all your doing here is providing me with _sql_ examples disregarding your first post which didn't help but was in php, i don't need to improve any part of the procedure, as it's fine and doing what im asking it to, all i need is advice and guidance on how to do it as i previously said in my earlier post - ignore the codes if you have to, i just needed a few examples how to show all the results through php using a sp. If you don't know to or just messing around, just simply don't post Also, when did i do any insisting saying i was right ? Wrong topic?
×
×
  • 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.