-
Posts
1,041 -
Joined
-
Last visited
-
Days Won
17
Everything posted by gw1500se
-
You need to open a terminal session on the MySQL server and run it from the command line.
-
Read up on GRANT.
-
Issue to save values in database with multiple checkboxs in CRUD
gw1500se replied to AccuCORE's topic in PHP Coding Help
You can't store an array in a database as a single column. I already suggested what to do. Alternatively you can store the array in a join table where each item is a column. -
If you have PHPAdmin with admin rights then you need to check GRANTs for user 'apache'. That is likely the crux of your problem.
-
Where you are running it as a client is irrelevant. Is the MySQL server on Windows or Linux? Is the httpd server Windows or Linux? Are they the same server?
-
Issue to save values in database with multiple checkboxs in CRUD
gw1500se replied to AccuCORE's topic in PHP Coding Help
Your code is a bit confusing so I'm not sure I am following what you are trying to do. You convert $_POST["active"] to a comma separated string ($newvalues) but when you store it in the database you are binding an array ($_POST["active"]) to a column. You can't store an array per se as a column in MySQL. You should be binding $newvalues to a string column in your database. -
Are you on Linux? If so 'apache' is running the script, not you. I am referring to 'mysql' from command line.
-
But the user running the script may not. Did you check as I suggested?
-
Log in to MySQL from the command line using the same credentials as your PHP script (usually 'apache' in Linux). Then enter the following commands: USE DATABASE <your database name>; SHOW PRIVILEGES; As Barand says, you need to see the FILE privilege. If it is not there, you will need to log in as root (or have your sys admin do it) and GRANT that privilege for that database and user.
-
You have to move_uploaded_file to get it to the desired folder. However, unless I don't understand what you want to do, there is no need to move it at all. Process the file into the database as you are.
-
Warning: DOMXPath::evaluate(): Invalid expression
gw1500se replied to oach's topic in PHP Coding Help
It is the line # I am looking for which you didn't post. And post that line with the code around it. Also post any code that produces variables used. I suspect the first warning may have produced the 2nd. -
Warning: DOMXPath::evaluate(): Invalid expression
gw1500se replied to oach's topic in PHP Coding Help
What is the actual warning? -
How to loop or iterate variable in every click of button?
gw1500se replied to angelesguerra's topic in PHP Coding Help
The link points to the documentation which has examples. You can also search for hundreds of examples. Just make sure you understand the documentation first. -
How to loop or iterate variable in every click of button?
gw1500se replied to angelesguerra's topic in PHP Coding Help
PHP is stateless which means it does not remember what happened previously. To do what you want you will need to keep track of the variables using sessions. It would not be a loop at all. You would need to check and increment a $_SESSION variable on each call. -
First design the layout of how you want those panels to look and what they are to do. At that point you should have a good idea of the data you want to keep in your database and be able to create the schema. Then create the partial HTML to fulfill that design indicating the dynamic values to be generated by PHP and input by the user. Only then will you be ready to begin the PHP programming aspect and finalize the HTML pages.
-
Wordpress + Mysql Config + PHP file -> not working
gw1500se replied to Siegfried's topic in PHP Coding Help
Not the code we need. What requinix is looking for is the database query code. -
Error session variable not displaying message in another php file
gw1500se replied to Alexa's topic in PHP Coding Help
Yes. Session start must be called on each page on which you want to share data. -
Wordpress + Mysql Config + PHP file -> not working
gw1500se replied to Siegfried's topic in PHP Coding Help
Could be. Perhaps if you posted your code and any error messages you are getting might help. My clairvoyance is not working today. -
What you posted is not any error known to PHP. If you are posting a link to errors, don't. Post the errors themselves and indicate to what line numbers the errors refer.
-
Wordpress + Mysql Config + PHP file -> not working
gw1500se replied to Siegfried's topic in PHP Coding Help
By correcting the erroneous code. -
Try this: <?php echo "<iframe width=\"420\" height=\"315\" src=\"$address\">"; echo "</iframe>"; ?> I am assuming you have echo'ed $address to make sure it is what you expect.
-
Error session variable not displaying message in another php file
gw1500se replied to Alexa's topic in PHP Coding Help
I see the session start but I don't see where you set any $_SESSION variables. Where is the code that outputs the error you say is not showing up? -
It is not clear what you are trying to set. You are using '$row...' as the index for '$result'? What do you expect '$result' to look like?
-
Perhaps we have a terminology problem here. PHP does not "release" output. If you are saying the echo does not work then that is different. Looking at your OP there is no closing quote on the echo. We'd have to see all your PHP code to understand what is going on. What you have posted does not need to be done with a PHP echo. I can simply be output outside a PHP wrapper. Have you looked at the resulting source in your browser to see if something is there but not being displayed?