Jump to content

john_6767

Members
  • Posts

    99
  • Joined

  • Last visited

    Never

Everything posted by john_6767

  1. check your php.ini file to see what error returns you have turned on.. usually servers turn off these errors that aren't critical.. maybe someone else has more info on the eact place in php.ini? U shouldn't miss it if you search for errors in the file..
  2. or send a hidden field over so and check to see if its passed, if its not then redirect.. that way the submit button needs to be pressed, not just a link from the submit button page
  3. don't know if this helps but if you are just changing it to the current year every year you can use [code=php:0]echo date("y");[/code] to print the current year.. so no need for updates every year ;)
  4. ok, cheers guys, i just worked it out, looks like all these methods posted here will work ok i was checking the data in a html editor on screen which changes some normal spaces to   so i thought it wasn't working.. when i check the db it appears to be entered fine now, thanks!
  5. i'm trying to replace the   that i get from my html editor into real spaces, i have tried the following code with no luck, what can i do to get this to work? I have used variables in the str replace because someone mentioned that may help? [code=php:0] $contentFromPost = $_POST['proj_content']; $contentReplaceThis = " "; $contentReplaceWithThis = " "; $contentForUpdate = str_replace($contentReplaceThis, $contentReplaceWithThis, $contentFromPost); [/code]
  6. ok, i have people entering comments into my page in a basic forum style.. how do i stop them from ebtering swear words or replace 'rude' words with suitable ones? i figure there is a common script out there for this?
  7. how do i check if php if refer page is a certain is this page, and as such if page is HOME.php then do echo "you came from home.."
  8. ok, well i got it going, i re made the recordset in dreamweaver and it started to work.. mm.. anyway thanks for your help.. also i found that sometimes [code=php:0]require_once('https://www.mydomain.com/Connections/conn.php');[/code] worked and sometimes [code=php:0]require_once(../Connections/conn.php');[/code] worked.. assuming the file your working on is in https://www.mydomain.com/folder can anyone explain this so i know for next time?
  9. ok, thats the problem.. the files work if i put the code on the page, but i need to include them and they don't work by including them using: [code=php:0] require_once('https://www.mydomain.com/Connections/conn.php');[/code] the files are in the locations i am referencing..
  10. actually i got that wrong, the only one not set is connection.. which leads me to the include ([code=php:0]require_once('https://www.mydomain.com/Connections/conn.php'); [/code]) .. if i put the include code on the page it works..
  11. ok, i tried your tip and the variables all came back with no values..
  12. ok will try that now and let u know, in the mean time, is there something different that has to be done when including files on a ssl page? i just worked out that the include file for the connections doesn't seem to be working but works fine if i put the code in the page.. i am using the following code to include the connections file, [code=php:0] require_once('https://www.mydomain.com/Connections/conn.php'); [/code] and here is the code in the file [code=php:0]<?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_conn = "203.00.00.000"; $database_conn = "databasename"; $username_conn = "UserName"; $password_conn = "Password"; $conn = mysql_pconnect($hostname_connN, $username_conn, $password_conn) or trigger_error(mysql_error(),E_USER_ERROR); ?>[/code]
  13. ok, the prob is in this line i think.. i get echos displaying on screen up until this one.. [code]$rsOrderDetails = mysql_query($query_rsOrderDetails, $conn) or die(mysql_error());[/code]
  14. just found out its not the get.. its something below it in that code..
  15. basically i have a page i just put over to ssl, and now this page won't work.. the page that links to it is not on ssl and it is passing a url parameter to the ssl page.. i assume that the the ssl page isn't working because it doesn't think the passing of a url from a non secure page is safe..?? i have put a series of echos on the page to see where it breaks and have found that it breaks around here [code]$colname_rsOrderDetails = "-1"; if (isset($_GET['orderID'])) {   $colname_rsOrderDetails = (get_magic_quotes_gpc()) ? $_GET['orderID'] : addslashes($_GET['orderID']); } mysql_select_db($database_connN, $conn); $query_rsOrderDetails = sprintf("SELECT * FROM orders WHERE orderID = %s", $colname_rsOrderDetails); $rsOrderDetails = mysql_query($query_rsOrderDetails, $conn) or die(mysql_error()); $row_rsOrderDetails = mysql_fetch_assoc($rsOrderDetails); $totalRows_rsOrderDetails = mysql_num_rows($rsOrderDetails);[/code] edit: it doesn't load past here.. but worked fine on the non ssl setup
  16. ssl won't load page with $_GET paramater coming from non ssl page.. is this normal? how do i fix it? cheers
  17. how do i stop php from replacing my & with &amp;  ??? here is my variable i am using as a url.. [code]$editFormAction .= "&GP_upload=true";[/code] when i run it the & is replaced with &amp;
  18. how do i set up a cookie so it will work when on http://www.mydomain.com and also on https://www.mydomain.com ..? at the moment i have a site that works fine on http and i am putting some pages on https, this is where it broke.. I have never used a ssl before so i may be missing something vital, all i have done is put the secure pages on the https and changed the links to them to absolute? Is this that normally needs to be done, if nto what are the steps that i should take when adding ssl to some pages in my site?
  19. thanks, yep i had values, i have got it working now, it a bit dodgy but it works..
  20. ok, i am trying to do an update on an item, in my case a ball, this ball can come in one to  many sizes. I have all the fields updating but when it comes to the sizes for the ball, this information is stored into a joining table that contains the balls id i am updating as well as the size id, this allows the one to many relationship to work. Now i have the page showing the size checkboxes, they display properly as either checked or unchecked, what i am trying to do is get this information shown by the checkboxes into the database. My method to do this (which could be totally off the pace) was to - Delete from sizesball (the join table) only those that have been deselected - Now insert any newly selected sizes into sizesball - first checking if the size/ball is already in the table in which case we don't need to insert it.. hope this helps!
×
×
  • 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.