xfilterx Posted August 21, 2013 Share Posted August 21, 2013 Hey guys, I'm new to PHP. I mean brand new. I've been an ASP.NET (VB/C#) developer for over 14 years and this is my first attempt at a PHP project. I've avoided it for a long time and now find myself in a highly-paid project that I just couldn't turn down. I'm using XAMPP as my dev framework with Visual Studio (PHP plugin installed) as my IDE. There is a mobile component to this project and I have been able to successfully connect to and pull database records out and use json_encode to retrieve the results as JSON data. So I know my connection works and everything seems ok. The other part of this is a backend admin dashboard of sorts that allows an 82 year old invididual to make changes to the underlying data. Fine. I created a folder at the root of my site called admin, created a new index.php file, added the code shown below, tested the page, and the result is a blank white page. Not knowing PHP I'm just not aware of the nuiancess of the language so I don't even know where to look. Any ideas would be very helpful. I'm sure I'll have other questions as I progress through this project. Thanks. <?php $con=mysqli_connect("127.0.0.1","root","","coatstr"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $result = mysqli_query($con,"SELECT standard_id, organization_id, item_no, standard_no, title, keywords, abstract, link FROM standards"); while($row = mysqli_fetch_array($result)) { echo $row['standard_id'] . "<br>"; echo $row['organization_id'] . "<br>"; echo $row['item_no'] . "<br>"; echo $row['standard_no'] . "<br>"; echo $row['title'] . "<br>"; echo $row['keywords'] . "<br>"; echo $row['abstract'] . "<br>"; echo $row['link'] . "<br>"; echo "<br>"; } mysqli_close($con); ?> Link to comment https://forums.phpfreaks.com/topic/281434-need-some-help-with-a-php-project/ Share on other sites More sharing options...
xfilterx Posted August 21, 2013 Author Share Posted August 21, 2013 Ummmm...it would help if I added some data to the table. Doh....please delete. Link to comment https://forums.phpfreaks.com/topic/281434-need-some-help-with-a-php-project/#findComment-1446143 Share on other sites More sharing options...
fastsol Posted August 21, 2013 Share Posted August 21, 2013 I would start by turning on error_reporting in the php.ini file so that you can see the errors the page is throwing. Link to comment https://forums.phpfreaks.com/topic/281434-need-some-help-with-a-php-project/#findComment-1446145 Share on other sites More sharing options...
xfilterx Posted August 21, 2013 Author Share Posted August 21, 2013 I would start by turning on error_reporting in the php.ini file so that you can see the errors the page is throwing. Thanks for the reply bud but I found my problem. I failed to set the $moron and $idiot variables correctly. Link to comment https://forums.phpfreaks.com/topic/281434-need-some-help-with-a-php-project/#findComment-1446147 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.