VogrothUnmaker Posted November 13, 2006 Share Posted November 13, 2006 ??? I am having trouble with my website. I have tried explaning it on many occasions but to no avail so now I will use a picture to help demonstrate my issue. I want to create something like this -> (I photoshopped this picture a lot)[IMG]http://i43.photobucket.com/albums/e385/DoomedBanana/helpmepic.png[/img]Just for clarity, I am pretty sure I am not looking for a gallery script. NO GALLERY SCRIPTS (unless it is percisely what Im looking for) If your still unsure what exactly I'm trying to accomplish, tell me and I will try to further explain it. I need you to ask me any questions of this manner so that I can help you help me. Thanks alot^.^ Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/ Share on other sites More sharing options...
The Little Guy Posted November 14, 2006 Share Posted November 14, 2006 Im not sure if it is just me, but... I don't think you even explained what the problem was that you are having. Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124175 Share on other sites More sharing options...
VogrothUnmaker Posted November 14, 2006 Author Share Posted November 14, 2006 Sry, the problem I have is that I have no Idea on how I am to make a website like this. I tried to explain it in this post http://www.phpfreaks.com/forums/index.php/topic,114065.0.html and got no where with it. Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124177 Share on other sites More sharing options...
The Little Guy Posted November 14, 2006 Share Posted November 14, 2006 [code]<?phpswitch($_GET['comicnum']){case 1: $image = '<img alt="alt text" src="Imagename1.jpg">';break;case 2: $image = '<img alt="alt text" src="Imagename2.jpg">';break;case 3: $image = '<img alt="alt text" src="Imagename3.jpg">';break;}echo $image;?>[/code] Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124178 Share on other sites More sharing options...
VogrothUnmaker Posted November 14, 2006 Author Share Posted November 14, 2006 ;D That was fast, thank ye very much. Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124180 Share on other sites More sharing options...
The Little Guy Posted November 14, 2006 Share Posted November 14, 2006 Your welcome.... Is that what you wanted? Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124184 Share on other sites More sharing options...
VogrothUnmaker Posted November 14, 2006 Author Share Posted November 14, 2006 I think so, I just have one question how do i get the buttons to scroll through em? Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124185 Share on other sites More sharing options...
solinent Posted November 14, 2006 Share Posted November 14, 2006 [quote author=VogrothUnmaker link=topic=114878.msg467547#msg467547 date=1163462809]I think so, I just have one question how do i get the buttons to scroll through em?[/quote][code]<a href="comic.php?comicnum=<?php echo $_GET['comicnum']+1; ?>"> <img src="NEXT.gif" alt="next" /> </a>[/code]For previous minus one. Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124189 Share on other sites More sharing options...
VogrothUnmaker Posted November 14, 2006 Author Share Posted November 14, 2006 Thanks!!! :D (This is the fastest moving forum I have ever been to, getting a response on the spriting forums I belong to can take days if not weeks >.>) Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124193 Share on other sites More sharing options...
solinent Posted November 14, 2006 Share Posted November 14, 2006 [quote author=VogrothUnmaker link=topic=114878.msg467555#msg467555 date=1163463341]Thanks!!! :D (This is the fastest moving forum I have ever been to, getting a response on the spriting forums I belong to can take days if not weeks >.>)[/quote]Your welcome. I'm new here also, and it's much faster than I am used to. Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124195 Share on other sites More sharing options...
VogrothUnmaker Posted November 14, 2006 Author Share Posted November 14, 2006 New Question, How would I make it so that it automatically shows the latest comic? Thanks in advance Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124245 Share on other sites More sharing options...
VogrothUnmaker Posted November 14, 2006 Author Share Posted November 14, 2006 It didnt work >.< It posted all the comics at once... What should I do? Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124255 Share on other sites More sharing options...
VogrothUnmaker Posted November 14, 2006 Author Share Posted November 14, 2006 Accident didnt mean to post this >< Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124259 Share on other sites More sharing options...
marcus Posted November 14, 2006 Share Posted November 14, 2006 You can just set[code]if(!$_GET[comicnum]){echo "latest comic";};[/code] Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124269 Share on other sites More sharing options...
VogrothUnmaker Posted November 14, 2006 Author Share Posted November 14, 2006 Wait what? I dont want to post text i want to actually post the latest comic... And what about the bigger problem, it posted all the comics at once, they appeared one after another down the page. Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124276 Share on other sites More sharing options...
trq Posted November 14, 2006 Share Posted November 14, 2006 well this depends really doesnt it. How do you define the [i]latest[i] comic? Have you got the dates they where added stored somewhere? You really should be using a database for this. Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124278 Share on other sites More sharing options...
VogrothUnmaker Posted November 14, 2006 Author Share Posted November 14, 2006 Databases are fine with me.... Just tell me how to use em. Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124281 Share on other sites More sharing options...
trq Posted November 14, 2006 Share Posted November 14, 2006 Were not here to write tutorials, theres plenty already available. Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124282 Share on other sites More sharing options...
The Little Guy Posted November 14, 2006 Share Posted November 14, 2006 Maybe it will work this way[code]<?php$comic = $_GET['comicnum'];switch($comic){case 1: $image = '<img alt="alt text" src="Imagename1.jpg">';break;case 2: $image = '<img alt="alt text" src="Imagename2.jpg">';break;case 3: $image = '<img alt="alt text" src="Imagename3.jpg">';break;}echo $image;?>[/code] Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124283 Share on other sites More sharing options...
VogrothUnmaker Posted November 14, 2006 Author Share Posted November 14, 2006 Can you direct me to a tutorial, as you said there are many and it could take a while to find the right one...thanks TLG I'll try this Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124284 Share on other sites More sharing options...
fert Posted November 14, 2006 Share Posted November 14, 2006 It depends on the database you have Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124285 Share on other sites More sharing options...
trq Posted November 14, 2006 Share Posted November 14, 2006 Ide suggest you start [url=http://hudzilla.org/phpwiki/index.php?title=Main_Page]here[/url]. Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124286 Share on other sites More sharing options...
VogrothUnmaker Posted November 14, 2006 Author Share Posted November 14, 2006 Can you tell me exactly what topic(s) I should read up on. I am a slow reader and I often have to reread things several times before I understand them, so it would be helpfull if I knew exactly what to look up instead of reading through this entire (giant manual) Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124647 Share on other sites More sharing options...
fert Posted November 14, 2006 Share Posted November 14, 2006 like i said it depends on your database, but the most common is mysqlexample:[code]$cn=@mysql_connect("host","username","password") or die(mysql_error());@mysql_select_db("name",$cn) or die(mysql_error());$result=@mysql_query("SELECT latest_comic FROM comics",$cn) or die(mysql_error());while($row=mysql_fetch_array($result)){ $latest_comic=$row[latest_comic];}echo "<img scr=\"{$latest_comic}\" alt=\"Latest comic\">";[/code] Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-124753 Share on other sites More sharing options...
VogrothUnmaker Posted November 15, 2006 Author Share Posted November 15, 2006 [color=maroon]Thorpe mentioned logging the dates the comics are entered but Im unsure of how I would go about doing that, would i use the[/color] [color=orange][i][b]DATETIME[/b][/i][/color][color=maroon] command or a [/color][color=orange][i][b]Unix Timestamp[/b][/i][/color] [color=maroon]or what? And then after that how do I declare that the comic with the latest date is the latest comic entered. Im reading the tutorial thorpe told me to but its so large and the sections that I have read have mentioned date entered fields but they never quite explain how to create and use them.[/color][hr][move]8)[size=7pt][color=green]This is turning out good so far! YAY[/color][/size]8)[/move] Link to comment https://forums.phpfreaks.com/topic/27159-variables-in-url/#findComment-125149 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.