Jump to content

Recommended Posts

Except that's ASP, and everyone knows that ASP stands for "bad" (the people who made ASP weren't good at acronyms either.  Woops.)  Anyway, you'll need to write your own, not just get some "script out there like where u enter the information", because that's so ridiculous unspecific that not even my tea leaves could figure it out.  If you ARE going to write this, I'd suggest reading up on database normalization.

Link to comment
https://forums.phpfreaks.com/topic/126494-solved-best-way/#findComment-654112
Share on other sites

Not understanding or preferring something else doesn't make it 'bad' ;)

 

ASP.NET isn't too horrible.  I like how easy it is to generate form structures (drop down lists, checkboxes and radio buttons) from database resources, its calendar control, and its validation controls are okay.  And, to be honest, I'm loving C# at the moment.  But the rest is pretty 'meh.'  Especially how ASP.NET renders ids.  Makes it nearly impossible to use ids with CSS.  I can only imagine the headaches associated with trying to use JavaScript out of the box with it.  I guess that's why they strongly suggest registering client side scripts with the rest of the application, although that itself is a bit of a nightmare process too.

 

And yeah, Boxerman, what you're trying to build is a pretty big undertaking.  Certainly more complicated than I think you grasp at the moment.  My advice is to start small -- get some web hosting and start playing around.  It'll be a while before you can make a full-fledged dynamic site.

Link to comment
https://forums.phpfreaks.com/topic/126494-solved-best-way/#findComment-654131
Share on other sites

I have sites up like www.radio101.co.uk

 

etc.. im not too bad at php and mysql

 

its the fact i can do it... but dont know how...

if you get me

 

Well, the simplest way to do the skater park thing would be to:

 

1. Figure out all of the database fields you need.  Town, county/province/state/whatever, street address, name of the park, etc.

 

2. Normalize the database.  I'm not too skilled at database normalization myself, but I'm sure a Google search will yield the info you need.

 

3. Create a form for users to add new parks to the mix.  Not all that difficult, although you'd probably want to verify that the submitted park exists before adding it to the list.  You probably don't want skate parks referencing genitalia in the list, for example.

 

4. Create a search form, like the one on that site.  That's probably the easiest form to create.  The dropdowns are created by the info that's already in the DB, like so:

$query = "SELECT state IN skate_parks ORDER BY state ASC";
$result = mysql_query($query);

echo "<select name='states'>";

while($row = mysql_fetch_assoc($result))
{
   echo "<option value='{$row['state']}'>{$row['state']}</option>\n";
}

echo "</select>";

 

But yeah, that's the basic process.  There may be better ways to store such a volume of info, but this is the easiest, quickest way I can think to do it.  The key really lies in normalizing the database.  That will make it easier (possible?) to do various searches and result ordering.

Link to comment
https://forums.phpfreaks.com/topic/126494-solved-best-way/#findComment-654158
Share on other sites

ok this is wha ti got so far :(

it doesnt work :S

 

this is the getuser.php

<?php
$q=$_GET["q"];

$con = mysql_connect('localhost', 'root', '');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("skatingnation", $con);

$sql="SELECT * FROM skatepark WHERE country = '".$q."'";

$result = mysql_query($sql);

echo "<table border='1'>
<tr>
<th>Country</th>
<th>Skate Park Name</th>
<th>State</th>
<th>Postcode</th>
</tr>";

while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['country'] . "</td>";
echo "<td>" . $row['stakeparkname'] . "</td>";
echo "<td>" . $row['state'] . "</td>";
echo "<td>" . $row['postcode'] . "</td>";
echo "</tr>";
}
echo "</table>";

mysql_close($con);
?>

 

this is the form with drop down menu

<form> 
Select a country:
<select name="users" onchange="showUser(this.value)">
<option value="1">USA</option>
<option value="2">UK</option>
<option value="3">Germany</option>
</select>
</form>

<p>
<div id="txtHint"> <p> </p>
<p><b>Skate Park info will be listed here.</b></div>
</p></p>

 

 

wheres the error?

 

Link to comment
https://forums.phpfreaks.com/topic/126494-solved-best-way/#findComment-654206
Share on other sites

Warning: fsockopen() [function.fsockopen]: unable to connect to 69.162.74.14:8042 (Connection refused) in /home/radio101/public_html/config.php on line 10

Non stop! Radio Is Currently Offline

 

Awesome.

 

Also, you link to the W3C validator, and your page fails ;)

Link to comment
https://forums.phpfreaks.com/topic/126494-solved-best-way/#findComment-654228
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.