-
Posts
422 -
Joined
-
Last visited
-
Days Won
1
Everything posted by awjudd
-
It didn't help because you didn't copy it correctly. Please re-read my previous post and you'll see the differences. ~juddster
-
Anywhere before you actually try to use $ca_id. ~juddster
-
$_SESSION['username'] = $username; You are overwriting your previous value with an empty string. ~juddster
-
No the server is not up and running, no the server isn't running on port 3406, or no phpmyadmin isn't working? Or no something entirely different? ~juddster
-
You need to provide mysqli_query the connection object that you get from mysqli_connect because of this the other errors are showing up. ~juddster
-
Is your mysql server up and running on port 3406? If yes, have you updated the phpmyadmin configuration file accordingly? ~juddster
-
What port is your MySQL server running on? Is this the port that you tell phpmyadmin? ~juddster
-
Both servers cannot run connected to the same port. Either the server you stopped failed to start up again, or you didn't restart the server after adjusting the configuration. ~juddster
-
$cfg['Servers'][$i]['port'] = '90'; That should be your MySQL server port not your web server port. ~juddster
-
Just before the auto submit is done trigger the click event for the other thing? ~juddster
-
There should be a configuration file for phpmyadmin somewhere (http://webmaster.iu.edu/tool_guide_info/phpmyadmin/phpmyadmin.shtml). Make sure that is using the correct port for your MySQL server (http://www.coderanch.com/t/298301/JDBC/java/which-port-mySQL-running) ~juddster
-
No ... registered_globals was deprecated and turned off by default for a reason. Your code should handle it, not assume the server will. ~juddster
-
It looks like you might have been previously using registered_globals. I don't see anywhere in your code where you set the variable $ca_id. You are going to need to adjust the code so that it does grab that value. $ca_id = $_GET['ca_id']; My guess is that your old host had it enabled but your new one does not. ~juddster
-
Sorry for wrong link .. skimmed through it and thought it mentioned the server's port. As for the server's port, is MySQL server running on it's default port or a different one? ~juddster
-
Has the server's port changed? http://veerasundar.com/blog/2009/01/how-to-change-the-root-password-for-mysql-in-xampp/ ~juddster
-
I believe that this is a PHP issue and not a MySQL one. Can you please provide some code where it isn't working? ~juddster
-
PHP is server side, jQuery is client side. There is no way to directly use the PHP variables in JavaScript. Indirectly, you could do something like this: <script type="text/javascript"> var foo = "<?php echo $superSpecialVariable; ?>"; </script> To assign client-side variables at run time. ~juddster
-
If your mysql server running? ~juddster
-
Accessing variables in a required folder when using AJAX
awjudd replied to rockinaway's topic in PHP Coding Help
I would try to remove the requirement of the main page being reloaded in order for the sidebar to work properly. Maybe you can extract it out into another php file which they can require? ~juddster -
Accessing variables in a required folder when using AJAX
awjudd replied to rockinaway's topic in PHP Coding Help
Are you trying to use PHP values in your JavaScript call? If yes, then you don't have access to them since JavaScript is all client-side. Your best bet would be to assign the values of your PHP variables to values in your JavaScript. <script type="text/javascript"> var foo = "<?php echo $superSpecialVariable; ?>"; </script> Or I completely misread your post ... ~juddster -
Then yes, use the session variable. You shouldn't hit the database with queries if not necessary ~juddster
-
is using htmlentities() to sanitize $_posts adequate protection?
awjudd replied to cloudll's topic in PHP Coding Help
If you are using database parameters for your query there is no need to escape them. Or if you aren't you would do something like what you have at the bottom. ~juddster -
is using htmlentities() to sanitize $_posts adequate protection?
awjudd replied to cloudll's topic in PHP Coding Help
You shouldn't be using htmlentities to prevent SQL injection. There are other functions to do that for you (i.e. mysql_real_escape_string) or better yet, use database parameters. ~juddster -
If you already have the username in a variable (i.e. $username) then why are you querying the database for it? ~juddster
-
Show value of multiple invalid input in textarea
awjudd replied to IreneLing's topic in PHP Coding Help
Either you can build an array of all of the errors and output it like you have it the first way, or just echo it as you go to get the output like you have the second way. <?php if (isset($_POST["Submit"])) { $arrLines = split(",",$_POST['cellphonenumber']); $errors = array (); foreach($arrLines as $cells) { if(!preg_match('/^[0]{1}[1]{1}[0-9]{1}[0-9]{7}?$/', $cells)) { $errors [] = $cells; } } } if ( count ( $errors ) == 0 ) { echo 'All Successful'; } else { foreach ( $errors as $error ) { echo $error; } echo ' is not a valid number.'; } ?> <form action="" name="myform" method="post"> <textarea name="cellphonenumber" rows="20" cols="100"></textarea> <input type="submit" name="Submit" /> </form> ~juddster