Jump to content

cbrooks

Members
  • Posts

    36
  • Joined

  • Last visited

    Never

Everything posted by cbrooks

  1. has any one used Microsoft Translator on a site? If so, what was your opinion of it?
  2. What are the general Advantages / Disadvantages to using stored functions for selecting/inserting/updating/deleting records in you databases from your PHP applications? Speed? Security? ????
  3. I understand on the if (answer) { OK, since I'm 'Still Learning' do you mind taking a few minutes and pointing out some of the security risks? The code that I showed was just something simple to allow me to test/learn passing variables back and forth between JavaScript and PHP, not the actual code that I am using in my actual pages.
  4. OK, this is what I came up with: First the javascript function: <code> function testit(Param, id1, id2, id3){ var message ="Are you sure that you want to change the current data?\n" + "Click OK to proceed or Cancel to abort?"; answer = confirm(message); window.location.href = "tshowconfirm.php?which=" + answer + "&picked=" + Param + "&id1=" + id1 + "&id2=" + id2 + "&id3=" + id3; } </code> Next the data input: <code> <?php echo "<td><select name=\"maybe\" id=\"maybe\" onchange=\"testit(this.value, '{$user}', '{$company}', '{$ship_to_nbr}');\">"; ?> </code> and the output from tshowconfirm.php: <code> <?php $update_t_f=$_GET['which']; $selection=$_GET['picked']; $user = $_GET['id1']; $company = $_GET['id2']; $shiptonbr = $_GET['id3']; echo "Update Table : ".$update_t_f."<br />"; echo "Selection is: ".$selection."<br />"; echo "User is : ".$user."<br />"; echo "Company is : ".$company."<br />"; echo "Shipping is : ".$shiptonbr."<br />"; ?> It does work, allows me to input my data, calls the javascript code, then relays 'answer' with data to either update or save to the next php script for final action May not be the prettiest or cleanest code, but for a test it works for me.
  5. Ok, I have a bunch of pages that are working as desired. Reading/displaying info from database. Have a new form where user enters data and then on 'Submit' it digest the data and either inserts a new record or updates an older record. So what is the easiest (and best) method to comfirm that the user 'Does Really' want to update data that is already on file. My initail thought was to use a JavaScript 'confirm(message)' popup, if this is the way to go, how do you pass the return value from the 'confirm(message)' back to your PHP page?
  6. start looking at the code that starts as //for use with my FIRST list box this builds the $List1 which is what you want your page to dispaly then look at the part that starts as <!-- OK a basic form--> on the line that starts <select> delete out onchange="ajaxFunction('LBox2', this.value);" that is the ajax stuff that you don't need. so your line would look like <td><select name="list1" id="LBox1">
  7. unless you are not showing us all of the code, it looks like you are missing a mysql_query statement something like: $result = mysql_query($query) or die(mysql_error()); this statement actually does the insert/update/select action on the database.
  8. Sorry about that, try this http://www.phpfreaks.com/forums/index.php/topic,277549.0.html
  9. look at this code Dynamic DropDown PHP/AJAX. It has several complete examples using and not using MySQL. It is show how to do something else, but the code that you need is there.
  10. That is working just as expected. Thanks
  11. OK, if I understand you correctly, then if I copy the code from the pointed to topic, copy it to my site, run it as is then it should work! I select something from the first drop down and something will then appear in the second drop down allowimg me to select something from it??? If that is what is supposed to happen, then it ain't happening on my end. I tried the version that required no database and then tried the one using a database with same results. My understanding is that I select something from first drop down and it then uses that result to place items in the second drop down????
  12. OK, I got that to work and here is where I am: Just working within the code that you pointed me to: changed their first drop down so that it loads from my database table as per the origninal code that I mentioned. It works ok. Now, when I select a record from the drop down list and click on the 'Submit' button it does load the second drop down list as I require and I can select an item from it. So far so good! Now, I guess my problem now is with the <form> Once I have selected an item from each drop down, then that info needs to be passed to another program which updates another database table with the selected info. This <form> sends to $_POST to its self, so how do I get the info to the next step?
  13. OK, I see where the function is getting the info selected, but 'Just Call Me Slow' but I need you to explain how that gets me anywhere closer to filling in the second dropdown on the fly? Some I need more of a slap in the head and then a very hard push, instead of a gentle bump!!!
  14. I have a input screen where one of the inputs is selected via the following dropdown <code> $query="select customer_nbr, cust_name from web05a"; $result=pg_query($sqlconnection, $query); $rows=pg_num_rows($result); echo "<tr><td align='right'>Associated Company:</td>"; echo "<td><select name='ucompany'>"; for ($i=0;$i<$rows;$i++){ $row=pg_fetch_array($result); $cname=$row['customer_nbr']." : ".$row['cust_name']; echo "<option value='{$row['customer_nbr']}'>$cname</option>"; } echo "</select>"; </code> This dropdown works great, my problem is that I need to have a second drop down immediately following this one whery my db query would depend on the value comming from the first dropdown. my second query would be as follows: $query="select ship_nbr, ship_name, ship_line from web06a where customer_nbr=VALUE FROM THE FIRST DROPDOWN From the resulting table I would then fill in the second dropdown list Help will be appreciated.
  15. Ok, got it all working as follows: I removed the WampServer 2.0i version that I was using and installed WampServer 2.0c in it's place. I then went to the following site: [www.blog.bmedon.net] This site is in a non English language, so click on the 'Translate' Button on the top right to get it in English. and get their copies of the following to dll's php_pdo_pqsql.dll php_pqsql.dll place them into your ext directory enable php_pdo_pqsql.dll and php_pqsql.dll in your php.ini and restart your Apache server. It worked for me the first time. I never heard any info from WampServer personnel concerning this issue. ended up with the following versions of everything: Apache 2.2.8 PHP 5.2.6 MySQL 5.0.51a PostgreSQL 8.2.3
  16. In case anyone is interested problem solved as follows: I removed the WampServer 2.0i version that I was using and installed WampServer 2.0c in it's place. I then went to the following site: [www.blog.bmedon.net] This site is in a non English language, so click on the 'Translate' Button on the top right to get it in English. and get their copies of the following to dll's php_pdo_pqsql.dll php_pqsql.dll place them into your ext directory enable php_pdo_pqsql.dll and php_pqsql.dll in your php.ini and restart your Apache server. It worked for me the first time. I never heard any info from WampServer personnel concerning this issue. ended up with the following versions of everything: Apache 2.2.8 PHP 5.2.6 MySQL 5.0.51a PostgreSQL 8.2.3
  17. I understand that this might not be the place for this topic, but I'm needing help! I am currently running WampServer 2.0i (Apache 2.2.11, PHP 5.3.0, MySql 5.1.36) As installed all works great. I installed PostgreSQL 8.4 listing on port 5432. It works great outside of Apache/PHP I enabled pdo_pgsql.dll and pgsql.dll in php.ini and restarted Apache. It seems that it is not loading the .dll files as I am getting Fatal Error: undefined function pg_connect, when you try to connect to the database. Also when you look in phpinfo() under PDO drivers it only mentions mysql and sqlite. No mention anywhere about PostgreSQL. I have been looking around and it seems that this is an issue with WampServer after PHP version 5.2.5 or .6 Does anyone have any suggestions?? I really need to get this working!
  18. Yes, that was the first place I checked. Never received any type of answer from them at all.
  19. I am currently running WampServer 2.0i (Apache 2.2.11, PHP 5.3.0, MySql) As installed all works great. I installed PostgreSQL 8.4 listing on port 5432. It works great outside of Apache/PHP I enabled pdo_pgsql.dll and pgsql.dll in php.ini and restarted Apache. It seems that it is not loading the .dll files as I am getting Fatal Error: undefined function pg_connect, when you try to connect to the database. Also when you look in phpinfo() under PDO drivers it only mentions mysql and sqlite. No mention anywhere about PostgreSQL. I have been looking around and it seems that this is an issue with WampServer after PHP version 5.2.5 or .6 Does anyone have any suggestions?? I really need to get this working!
  20. I had seen this product and I am trying to get in touch with them to see if their product would work for us. thanks for sending the info!!
  21. Yes, that is what I have been told. I have found one, but don't know yet if it will work for my application. Am discussing with the developers via email now. It is a JDBC - PHP Bridge
  22. ODBC drivers are not available for this database running on a Unxi box, which is what my client is running. Only have access to JDBC drivers for the Unix box.
  23. Have a client using a SCO box operating as a Web server and DB server. The Database is not main stream (don't ask, you have not heard of it) but they do offer a JDBC driver. They offer ODBC drivers for their Windows version and it works great at another client. I need to be able to access this database using PHP. Any suggestions (not of the personal nature) will be greatly appreciated!!!
  24. I want to thank everyone that answered this query!!!!
  25. I said, Gurus, but I accept the fact that I may be the only person that does not know the answer to this question. I have a PHP application and have created several files such as: output_functions.php user_functions.php data_functions.php well, you get the picture. So, will the size of these files have any effect on the total application(say in speed or anthing else)? Should I limit the size of these files? If they get to a certain size, should I break them up into 2 or more smaller files.
×
×
  • 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.