Boxerman Posted September 30, 2008 Share Posted September 30, 2008 Hi all! Im planning to create a big information bank containing lots of information about skate parks all over the world! whats the best way to keep track of all this and edit/add new ones and display them on the site? Quote Link to comment Share on other sites More sharing options...
ngreenwood6 Posted September 30, 2008 Share Posted September 30, 2008 I would make sure that you create alot of different tables and link them together with a common value so that incase you decide to change something later on you wont have to redo the whole site. Quote Link to comment Share on other sites More sharing options...
Boxerman Posted September 30, 2008 Author Share Posted September 30, 2008 So what you saying? is there not a script out there like where u enter the information and it adds to your site automatically and people click it... i think its ending is like parks.php?ID203 like skatepark id is 203 etc..? Quote Link to comment Share on other sites More sharing options...
Boxerman Posted September 30, 2008 Author Share Posted September 30, 2008 kinda like this.. http://www.skateparkpages.co.uk/cgi-bin/skateparkhome.asp Quote Link to comment Share on other sites More sharing options...
DarkWater Posted September 30, 2008 Share Posted September 30, 2008 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. Quote Link to comment Share on other sites More sharing options...
discomatt Posted September 30, 2008 Share Posted September 30, 2008 Not understanding or preferring something else doesn't make it 'bad' Quote Link to comment Share on other sites More sharing options...
Boxerman Posted September 30, 2008 Author Share Posted September 30, 2008 Hmm.. well basically i need to Create a database... enter all the information then on the website page.. how would i sort it out like that site has with the drop down etc... Quote Link to comment Share on other sites More sharing options...
discomatt Posted September 30, 2008 Share Posted September 30, 2008 Boxerman... my suggestion here is to learn to walk before you try to run... or hire someone to run for you Quote Link to comment Share on other sites More sharing options...
KevinM1 Posted September 30, 2008 Share Posted September 30, 2008 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. Quote Link to comment Share on other sites More sharing options...
Boxerman Posted September 30, 2008 Author Share Posted September 30, 2008 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 Quote Link to comment Share on other sites More sharing options...
KevinM1 Posted September 30, 2008 Share Posted September 30, 2008 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. Quote Link to comment Share on other sites More sharing options...
Boxerman Posted September 30, 2008 Author Share Posted September 30, 2008 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? Quote Link to comment Share on other sites More sharing options...
revraz Posted September 30, 2008 Share Posted September 30, 2008 Hard to say with the limited information you are providing about how it doesn't work. ok this is wha ti got so far it doesnt work :S wheres the error? Quote Link to comment Share on other sites More sharing options...
Boxerman Posted September 30, 2008 Author Share Posted September 30, 2008 basically it doesnt do anything.. the drop down menu displays when i click UK it doesnt work :S Quote Link to comment Share on other sites More sharing options...
Boxerman Posted September 30, 2008 Author Share Posted September 30, 2008 no it says Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\xampp\htdocs\site\getuser.php on line 24 Quote Link to comment Share on other sites More sharing options...
discomatt Posted September 30, 2008 Share Posted September 30, 2008 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 Quote Link to comment Share on other sites More sharing options...
Boxerman Posted September 30, 2008 Author Share Posted September 30, 2008 im aware.. im working on the other thing.. can anyone help? Quote Link to comment Share on other sites More sharing options...
revraz Posted September 30, 2008 Share Posted September 30, 2008 use mysql_error after your query to see why it's failing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.