Jump to content

Dragon_Queen

New Members
  • Posts

    8
  • Joined

  • Last visited

Dragon_Queen's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. What should I rename it as? I did originally add that handler before making it more specific as php82 since I'm using php version 8.2 on the web hosting. Both ways were having the same issue...
  2. I'm using the link of the website that I'm hosting in order to access the php files. When I'm running this code in xammp localhost everything was working perfectly... I had only changed the username and password to match the database credentials of the database I uploaded to GoDaddy. I did check and ensure the username is in small letters and that the username and password matched the ones I put in the php files...
  3. Initially the file itself wasn't there but the php code still had the same issue...
  4. I actually created this file since the php files weren't working in the first place even without them. This is actually the first time I am uploading the website on the web hosting. I also did create temporary php files like you said for testing, but they don't work. Like, when I try to access them via browser it just downloads it instead of showing the output of running that php code.
  5. I did save them as .php files, as for checking whether they are being treated as php files or not how do I check that on GoDaddy? I added a handler as well to a .htaccess file that I created (Since there wasn't one by default) to treat them as php files: AddHandler application/x-httpd-ea-php82 .php The php version is set to 8.2 and the code I'm using is also compatible with php version 8.2 to the best of my knowledge.
  6. I'm using the first version... <?php ... ?>
  7. I am a beginner to php so correct me if I'm wrong, but I think if you're using if-else statements then both should be within the same php tag. Since you are trying to set a value "Des" or "Dave", you can use a single php tag in which you could create a php variable to store the value and then assign it after closing the php tag. This could also help avoid the spagetti code situation as explained by Jodunno. So to adjust the code you provided: <?php if ($_SESSION["DE_Retain"] == 1) { $value = "Des"; } else { $value = "Dave"; } ?> <input type="text" maxlength="32" size="42" name="<?=$Comment_Name ?>" value="<?=$value?>">&nbsp;&nbsp;Max 32 Characters<br><br> See if this works and if it does, do let me know as well.
  8. I'm trying to host my website on GoDaddy, and the php files of my website instead of being executed and returning the output it is returning the raw code as seen in the network tab of the browser... The files were working perfectly fine on my xammp localhost, I did whatever configurations were shown on YouTube tutorials like I uploaded the mysql database and created username and password with full priviledges and used it on the php files to connect and I made sure whatever extensions were being used on my localhost is also checked in GoDaddy... I contacted GoDaddy Support as well but they said there seems to be no issue on the server side... Does anyone have any suggestions for me to try out?
×
×
  • 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.