Jump to content

Need some help with a PHP project


xfilterx
Go to solution Solved by xfilterx,

Recommended Posts

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);
?>
Edited by xfilterx
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.