PHP form action [closed] - php

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I have a simple php connection to my database, I think i did most of the process right, but when I hit the submit button it just renders my actual php file on my screen.

Make sure you are using a web server that supports PHP. It is rendering the code because PHP is not processing your code and renders it as text.
Try using another web server or install PHP on your current setup.
Also use MySQLi or PDO for your database part (it's safer and mysql_* is deprecated).

Related

Using multiple forms in php but only one of them is working [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed last year.
Improve this question
Does a single php page contain more than 2 forms? If yes, how can we use it?
Php does not support multiple form action in one form. Instead we can use mltiple submit buttons with unique names so that in php section we can redirect to any page using that button name.

HTML5 Responsive one page site with php variables in url [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
I have just built a responsive HTML5 page, and as such, it links to other parts of the page from the menu... so, I have #home, #about, etc. I also need to pass a php variable for language, so that the correct language displays on the page, so I have lang=es, lang=gb, etc.
The languages are working fine and the links are working fine, but when I combine them both, the links stop working. Either as #about?lang=es or as index.php#about?lang=es. Neither works. It just stays at the top of the page and doesn't jump.
Any clues as to why?
Thanks in advance.
Kirsty
You should pass the php params first and then html tag ID
see the example below
https://domain.extension?lang=es#about
Dont worry about php variable value, it will remain untouched, servers will handle it

Open cart footer.twig file changes not reflecting [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I am working on a site http://www.lemongrasshouse.com.au/ i am changing code inside /public_html/lemongrasshouse.com.au/catalog/view/theme/lemongrasshouse/template/common/footer.twig
but its not affecting the site.
Can anyone help me in this matter
Thanks
Somdeb
Have you also edited that twig file via the built in editor in Design > Theme Editor? If so, it will use that one (which is stored in the database) rather than the file itself.

PHP Content not loaded from MySql, but no error [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I am working on some sort of blogging platform in php with a nice material design lite frontend. However I have a page that dynamically loads the content, it works fine in the root directory, but not in my admin directory. I hope you can spot some kind of error/typo in my code, I know the error is in the menu-start file, since disabling it enables loading.
Here is the page that loads the code
and here is the menu-start page
If you need any other code, please ask
You're using relative links for include, which will mess up when you start changing directories. Use a pseudo-absolute path with DOCUMENT_ROOT. Be sure to use this for all of your includes.
<?php include $_SERVER['DOCUMENT_ROOT'].'/menu-start.php'; ?>

Is ajax call did not support php include? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
Sorry for changing the question
I'm trying to include another php file inside php, my code is like this
Ajax mysqli not working
The difference is
I change "$con = new mysqli("localhost", "root", "", "whatever");" with "include 'admin/connection.php';"
Without include it's working, but, after adding include it's keep giving me error :(
Is it just me, my code is wrong or ajax didn't support php include?
if 'admin/connection.php' contains Connection code to DB
use require require PHP instead of include
require will halt the script whereas include only emits a warning (E_WARNING) which allows the script to continue.
require('admin/connection.php');
and if your server is not connected to db how can you expect to run sql query

Categories