Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About JoshEir

  • Rank
  • Birthday 05/02/1973

Profile Information

  • Gender
  • Location
  • Interests
    Programming, Server Side, C++
  • Age

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I am playing with PHPStorm and Visual Code at the same time. I finally got Visual Code working again, the program. PHPStorm won't set me back, I think it is a good price at around nine dollars a month with a month to consider. Using Visual Code for PHP and JavaScript I can run in parallel which is nice. However, I am having problem with the red JavaScript breakpoint turning to a grey outlined breakpoint after Chrome is launched. The debugger doesn't stop there. Using Chrome Developer Tools doesn't seem to be an option for me because It doesn't seem possible to access more than
  2. I am trying to find a good IDE for PHP and JavaScript. I fiddled around with Visual Code and it was very buggy. The GitHub page said over 800 open errors?!?!? Now I'm looking at PHPStorm and it reads that only PHP in a PHP page or JavaScript in a JavaScript page may be debugged. I am wondering if this is always possible to separate the code like this. Also, in the following code, what do you all think about using a XMLHttpRequest() to call this right in the beginning of the page with no button or anything. Is this bad form? It creates a dropdown list from the database. Rig
  3. Tutorials sound smart. Someone said PHP takes 6 months to learn. This is what helped me do the prepare with PDO : https://phpdelusions.net/pdo. I got it working pretty quick.
  4. Thanks for the links, I'll look at them next. This is what happened. I was quite mad from a hard to find bug with Visual Code. Something else happened with it that convinced me the only way to be is to download code that has cost. So, I was working with Sublime editor and Wamp server when the error, in question, was found. Now the reason for the the unfinished code I submitted was because I thought the foreach was failing because there was no record and what I was looking for was a way to count the rows and break if there weren't any records. I couldn't find the bug, so I decided to
  5. Oh, thanks, could you recommend what way to go that has plenty of instructions. For example, I was using PDO.
  6. Google Chrome Developer Tool causes an error when I run the following and there are not any records. I keep getting errors when I try to change it. <?php $host = 'localhost'; $user = 'root'; $pass = ''; $database = 'ecommerce'; $options = array( PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_EMULATE_PREPARES => false ); $keyword = $_GET['keyword']; $dbo = new PDO("mysql:host=$host;dbname=$database", $user, $pass, $options); $q1 = "SELECT * FROM products INNER JOIN keywords on keywords.keywordID = products.KeywordID and keywords.KeyWord1 = \"$keyword\
  7. It would be harder to read though with all the quotes, breaking and continuing, with the database data.
  8. I've been working on JSON and have found a way to send variables from the PHP to the JavaScript using AJAX and no JQuery. For an ecommerce site does it make more sense to send the variables : description, title, cost, etc. to the JavaScript page, or would it make more sense to echo the html on the PHP page? The idea, right now, is a product page for editing and deleting product. Thanks, Josh
  9. This would be neat: document.getElementById("insert").innerHTML = <?php $descriptionVar; ?>;
  10. I guess this would work: function onButtonPress() { <p> <?php echo $aVariable ?> </p> } I don't know what I was thinking, it is no replacement for AJAX.
  11. Hmm... well I found this about javascript and php together: <?php // Call PHP function from javascript with parameters function myphpfunction($x, $y){ $z=$x+$y; return 'The sum is: '.$z; } ?> <!doctype html> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> <script type="text/javascript"> alert("<?php echo myphpfunction(4,90)?>"); </script> </head> <body> </body> </html> Now it would seem that this does not refresh the page, I am wondering if it is as good as AJAX?
  12. You might not be able to put php in javascript script, but you certainly can put them on the same page. I'm wondering how to call a php on the same page with a AJAX and not JQuery. I saw this earlier and lost the link
  13. Hello, everyone. I have code that effectively calls a PHP page with AJAX (no JQuery). The PHP responds fine with an echo. Here is the javaScript that calls the PHP so refreshing the page doesn't need to be done. function deleteCategory() { var e= document.getElementById("dropDown1"); var var1 = e.options[e.selectedIndex].text; var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = alerta() { if (this.readyState == 4 && this.status == 200) { document.getElementById("insert").innerHTML = xmlhttp.responseText; } }; xmlhttp.open("GET", "deleteRow.ph
  14. My name is Joshua, am so glad to have found this site. I am using backend PHP for an ecommerce project I am working on to gain experience to help land a job. I really like PHP and the JavaScript that goes with it. Nice to be here, if there is anything I can do for you feel free to contact me.
  15. JoshEir


    Hello, I am new to this forum. I am gaining experience with different languages to get an internship. I like PHP, it is very nifty. My PHP project is an ecommerce site such as something like Amazon. What a great place to share great knowledge! JoshEir
  • 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.