Jump to content

xilllly

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

xilllly's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks jcbones. Will look at those. Xilllly
  2. Thanks. Can you give some example code for that? Xilllly
  3. I'm not actually getting any errors, it just doesn't copy the values from "member" table to "report" table as I'd like it too. It used to work fine but now it doesn't for some reason. Maybe I a ' instead of a " somewhere I suspect. Xilllly
  4. Hi, I'm trying to copy some values from a table called "member" to a table called "report" when new members submit a php application form. I can't see what's wrong with it. I have attached screenshots of the 2 tables and their structure. Any help would be much appreciated. global $conn,$dal; $customerID = mysql_insert_id(); $strSQLInsert = "insert into report (appID, memberID, select_agent, agent_details, first_name, last_name, street_address, suburb, postcode) values (".$ID.", ".$ID.", '".$values["select_agent"]."', '".$values["agent_details"]."', '".$values["first_name"]."', '".$values["last_name"]."', '".$values["street_address"]."', '".$values["suburb"]."', '".$values["postcode"]."')"; db_exec($strSQLInsert,$conn); [attachment deleted by admin]
  5. After much trial & error plus a lot of research, the solution to my problem was to tell the php code to ignore the code that was calling for a database login. I tried deleting that part of the code but the php just won't work then. So by adding /* at the start of the code I wanted to be ignored and */ at the end worked like a dream. Hope this helps someone else.... Xilllly // check if logged in /* if(!@$_SESSION["UserID"] || !CheckSecurity(@$_SESSION["_".$strTableName."_OwnerID"],"Add")) { $_SESSION["MyURL"]=$_SERVER["SCRIPT_NAME"]."?".$_SERVER["QUERY_STRING"]; header("Location: login.php?message=expired"); return; } */
  6. Ok, Many thanks for you help... I'll see how I go...
  7. So I just need to delete this part below from the code? // check if logged in if(!@$_SESSION["UserID"] || !CheckSecurity(@$_SESSION["_".$strTableName."_OwnerID"],"Add")) { $_SESSION["MyURL"]=$_SERVER["SCRIPT_NAME"]."?".$_SERVER["QUERY_STRING"]; header("Location: login.php?message=expired"); return; }
  8. I had to attach code as it was over the maximum length allowed for a post of 40,000 characters apparently. Please find attached code for customer_add.php Thanks. [attachment deleted by admin]
  9. Yes that is true, however whenever I do that, I am asked by Mysql for a database user name and password before the form data is allowed to pass to the database. How can I avoid that request happening, i.e. the form data being added without any login request by Mysql? Thanks
  10. Rather than that, why don't I break my question down to its bare bones. What is the best way to use php to allow internet users to add data to a Mysql database table? Bearing in mind that the internet user shouldn't have to login or click on a guest button to do so. They just click a submit button after having filled in a form on a webpage and info is added to the database. Thanks...
  11. Members don't need to log in again. The webform only serves as a membership form. For my records I'll have their name and address and a membership number that is generated when members join. Thanks
  12. Hi, I've made a php webform which works fine. I've put that into my website so members can add their details to be become a member of my club. Again that works fine. Only issue is that when members get to the membership page (member_add.php) on my website, members are asked to login as a user. I use a Mysql database on a linux server. How do I set it up (correct php code to use) so members can add their details without having to login or be a guest, or setup a username, i.e. they just put in their details into the webform and it is added to the 'member' table automatically. No login required. Members only have access to member_add.php. After entering their details and pressing "Submit", members are sent to a thank you webpage. Only I have access to the full database. This automatic option is only needed for members to add data to the 'member' table as any other table and associated php page has a login for security reasons. Please note this question is in regard to a internet user, not a lan user. Also I need this to be a secure link to the Mysql database. Hopefully there is an answer to this? Thanks
  13. Yes revraz you are right, thats exactly what I want to happen. I have attached the other code as its rather long to be putting in this forum box. Thanks. [attachment deleted by admin]
  14. Hi, I'm trying to get a php webform to log onto the database automatically before it loads on the website page. In other words I don't want the customer having log onto the database or be a guest. I think I need the code below to do that. Question is, can I just add this code into the php file that is the webform or add the <?php ?> to it and have it above the webform php code. Also do I need to alter any other dbconnect php pages as well? Also do I need to edit the htaccess file also. function verify_code() { $connection = mysql_connect ("localhost", "fred", "kool3401") or die ('Error: ' . mysql_error()); $db = mysql_select_db ("october"); { echo "Authenticated"; } Many Thanks
×
×
  • 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.