shadowdemon
Members-
Content Count
215 -
Joined
-
Last visited
Everything posted by shadowdemon
-
I have a game site with links to sites so people can vote for it. When the click on the link i want it to update the database and open the page at the same time. Im using a ghost page at the moment but my friend suggested a ghost page so people cant cheat and refresh it multipple times. I was wondering how to make a iframe and still have it update the daytabse and open the page in a new window without a ghost page.
-
ty for the help
-
still have the problem. I am gonna ask my friend when he logs on if he can figure it out but if you guys cant i dont think he will be able to.
-
the $stat[rank] is included in the header.php im about to try the code out still got a parse error its something to do with `','' or `';'' oh and please use the second code i posterd
-
oh ty now i no what i deleted. I say something and didnt no what it was so i deleted it so ill try that and everyone elses edit this is the new code <?php $title = "Forums"; include("header.php"); ?><?php// the Topic Listif ($view == topics) { print "<table><tr><td width=150><u><b>Topic</td><td width=100><u><b>Starter</td><td width=50><b><u>Replies</td></tr>"; $tsel = mysql_query("select * from topics2"); while ($topic = mysql_fetch_array($tsel)) { $replies = mysql_num_rows(mysql_query("select * from replies2 where topic_id=$topic[id]")); if ($sticky == yes){print "<tr><td><a href=forums2.php?topic=$topic[id]>$topic[topic]</a></td><td>$topic[starter]</td><td>$replies</td></tr>";} print "<tr><td><a href=forums2.php?topic=$topic[id]>$topic[topic]</a></td><td>$topic[starter]</td><td>$replies</td></tr>"; } print "</table>"; print "</center><form method=post action=forums2.php?action=addtopic>"; print "Add Topic:<br><input type=text name=title2 value=Title><br><textarea name=body cols=30 rows=3>Body</textarea><br><input type=submit value=\"Add Topic\"></form>";}// View Topicif ($topic) { $topicinfo = mysql_fetch_array(mysql_query("select * from topics2 where id=$topic")); if (empty ($topicinfo[id])) { print "No such topic."; include("footer2.php"); exit; } if ($stat[rank] == 'admin'){ echo "<a href="forums2.php?action=sticky">sticky the topic</a>";} if ($action == sticky){mysql_query("Update topics2 set sticky=yes where topic_id=$topic[id]"); echo "<a href="forums2.php?view=topics">back</a>";} print "<center><br><table class=td width=98% cellpadding=0 cellspacing=0><tr><td style=\"border-bottom: solid black 1px;\" bgcolor=eeeeee><b>$topicinfo[topic]</b> by $topicinfo[starter] (<a href=forums.php?view=topics>back</a>)</td></tr>"; print "<tr><td>$topicinfo[body]</td></tr></table><br>"; $rsel = mysql_query("select * from replies2 where topic_id=$topicinfo[id] order by id asc"); while ($reply = mysql_fetch_array($rsel)) { print "<center><table class=td width=98% cellpadding=0 cellspacing=0><tr><td bgcolor=eeeeee style=\"border-bottom: solid black 1px;\"><b>$reply[starter]</b> says... (<a href=forums2.php?view=topics>back</a>)</td></tr>"; print "<tr><td>$reply[body]</td></tr></table><br>"; } print "</center><form method=post action=forums2.php?reply=$topicinfo[id]>"; print "Add Reply:<br><textarea name=rep cols=30 rows=3>Body</textarea><br><input type=submit value=\"Add Reply\"></form>";}// Add Topicif ($action == addtopic) { if (empty ($title) || empty ($body)) { print "You must fill all fields."; include("footer2.php"); exit; } mysql_query("insert into topics2 (topic, body, starter) values('$title2', '$body', '$stat[user]')") or die("Could not add topic."); print "Added topic. Click <a href=forums2.php?view=topics>here</a> to go back to the topic list.";}// Add Replyif ($reply) {$exists = mysql_num_rows(mysql_query("select * from topics2 where id=$reply")); if ($exists <= 0) { print "No such topic."; include("footer2.php"); exit; } if (empty ($rep)) { print "You must fill out all fields."; include("footer2.php"); exit; }mysql_query("insert into replies2 (starter, topic_id, body) values('$stat[user]', $reply, '$rep')") or die("Could not add reply.");print "Reply added. Click <a href=forums2.php?topic=$reply>here</a>.";}?><?phpinclude("footer.php");?> i still got the parse error tho i took this exact code from a copy page with a few small changes like topics to topics2 and replies to replies2 and forums.php to forums2.php so i dont no why one has a parse error and another one doesnt
-
<?php $title = "Forums"; include("header.php"); ?><?php// the Topic Listif ($view == topics) { print "<table><tr><td width=150><u><b>Topic</td><td width=100><u><b>Starter</td><td width=50><b><u>Replies</td></tr>"; $tsel = mysql_query("select * from topics2"); while ($topic = mysql_fetch_array($tsel)) { $replies = mysql_num_rows(mysql_query("select * from replies2 where topic_id=$topic[id]")); if ($sticky == yes){print "<tr><td><a href=forums.php?topic=$topic[id]>$topic[topic]</a></td><td>$topic[starter]</td><td>$replies</td></tr>";} print "<tr><td><a href=forums.php?topic=$topic[id]>$topic[topic]</a></td><td>$topic[starter]</td><td>$replies</td></tr>"; } print "</table>"; print "</center><form method=post action=forums2.php?action=addtopic>"; print "Add Topic:<br><input type=text name=title2 value=Title><br><textarea name=body cols=30 rows=3>Body</textarea><br><input type=submit value=\"Add Topic\"></form>";}// View Topicif ($topic) { $topicinfo = mysql_fetch_array(mysql_query("select * from topics2 where id=$topic")); if (empty ($topicinfo[id])) { print "No such topic."; include("footer2.php"); exit; } if ($stat[rank] == 'admin'){ echo "<a href="forums2.php?action=sticky">sticky the topic</a>";} if ($action == sticky){mysql_query("Update topics2 set sticky=yes where topic_id=$topic[id]"); echo "<a href="forums2.php?view=topics">back</a>">}=view print "<center><br><table class=td width=98% cellpadding=0 cellspacing=0><tr><td style=\"border-bottom: solid black 1px;\" bgcolor=eeeeee><b>$topicinfo[topic]</b> by $topicinfo[starter] (<a href=forums2.php?view=topics>back</a>)</td></tr>"; print "<tr><td>$topicinfo[body]</td></tr></table><br>"; $rsel = mysql_query("select * from replies2 topic_id=$topicinfo[id] order by id asc"); while ($reply = mysql_fetch_array($rsel)) { print "<center><table class=td width=98% cellpadding=0 cellspacing=0><tr><td bgcolor=eeeeee style=\"border-bottom: solid black 1px;\"><b>$reply[starter]</b> says... (<a href=forums2.php?view=topics>back</a>)</td></tr>"; print "<tr><td>$reply[body]</td></tr></table><br>"; } print "</center><form method=post action=forums.php?reply=$topicinfo[id]>"; print "Add Reply:<br><textarea name=rep cols=30 rows=3>Body</textarea><br><input type=submit value=\"Add Reply\"></form>";}// Add Topicif ($action == addtopic) { if (empty ($title) || empty ($body)) { print "You must fill all fields."; include("footer2.php"); exit; } mysql_query("insert into topics2 (topic, body, starter) values('$title2', '$body', '$stat[user]')") or die("Could not add topic."); print "Added topic. Click <a href=forums2.php?view=topics>here</a> to go back to the topic list.";}// Add Replyif ($reply) {$exists = mysql_num_rows(mysql_query("select * from topics2 where id=$reply")); if ($exists <= 0) { print "No such topic."; include("footer2.php"); exit; } if (empty ($rep)) { print "You must fill out all fields."; include("footer2.php"); exit; }mysql_query("insert into replies2 (starter, topic_id, body) values('$stat[user]', $reply, '$rep')") or die("Could not add reply.");print "Reply added. Click <a href=forums2.php?topic=$reply>here</a>.";}?><?phpinclude("footer.php");?> Parse error: parse error, expecting `','' or `';'' in /home/www/dancha42.madpage.com/forums2.php on line 35 hopefully i wont have many moreim starting to learn to find them better, but i dont understand this parse error
-
yeah i still dont understand how to make them (im a real noob at crons)
-
How do you mnake a php cron.if you dont no what it is it is a code to make a php script happen at certain period of times automatically.
-
Well i asked a old firend of mine on another site to help and he figured it out.
-
with echo it doesnt work and with quotes it doesnt. Im getting so mad at this script. ARGGGH why wont it work.
-
no still parse error sry about taking so long boredom troubles
-
yeah without the quotes. THsi is probly the most complicated parse error ive seen. I cant figure it out
-
print 'Or you can always... <a href="city.php">go back</a>.'; like this or like this print 'Or you can always... "<a href=city.php>go back</a>".'; i checked the indexs in my php books and none said anything aboout double quotes or anything on this one in another page of my site it says print "Or you can always... <a href=battle.php>go back</a>."; is fine
-
sure no problem <?php include ("header.php"); echo "Welcome to the construction site. Randomly we will update this place with stuff you can do. Currently we are offering you to make a building where you can make trade gold for ap or platinum for ap. The cost of this project is all 10k silver wood."; if ($stat[construction] <= 1) { print 'Would you like to start the building';echo '<a href="construction.php?action=construct">construct</a>';}if ($action == construct) {print "you have started construction $stat[user]...<br><br>"; mysql_query("Update players Set construction=yes where id=stat[id] "); //a verification should be made if the player has the right amount of silver wood before making that query //else you'll end up with - numbers.. mysql_query("Update players Set silver wood = $stat[silverwood]-10000 where stat[id] "); mysql_query("Update players Set construction = stat[construction]+1 where stat[id] "); print "</table><br>"; print "Or you can always... <a href=city.php>go back</a>."; } } if ($stat[constructed] >= 2) { $prices = mysql_query("select * from market"); $pa = mysql_fetch_array($prices); $plat_price = $pa[ap]; if ($action != buy) { print "Ap isn't always a stable-priced commodity... right now its $plat_price credits an ap. How much you want?"; print "<form method=post action=construction.php?action=buy>"; print "I want <input type=text name=plat> ap. <input type=submit value=Buy>"; print "</form>"; } else { $plat = str_replace("--","", $plat); $cost = ($plat * $plat_price); if ($cost > $stat[credits] || $plat <= 0) { print "You cant afford that! (<a href=pshop.php>back</a>)"; } else { mysql_query("update players set credits=credits-$cost where id=$stat[id]"); mysql_query("update players set ap=ap+$plat where id=$stat[id]"); print "You got <b>$plat</b> ap for <b>$cost</b> credits."; } } ?> <? include ("footer.php"); ?> ignore those comments. i put those there to remind me of stuff that im gonna add.
-
fixed that earlier ill try this out ty i thought spaces dont matter in php yeah i was right spaces dont matter cause i still get Parse error: parse error in /home/www/dancha42.madpage.com/construction.php on line 19 (was 20 but then the space made it drop down one) the error is around here mysql_query("Update players Set silver wood = $stat[silverwood]-10000 where stat[id] "); mysql_query("Update players Set construction = stat[construction]+1 where stat[id] "); print "</table><br>"; print "Or you can always... <a href=city.php>go back</a>."; } } if ($stat[constructed] >= 2) but i dont see what is wrong (match this up with the code but it is around this area more specifically print "</table<br>"
-
doesnt fix the parse error but that is becuase it isnt on line 20 so you might have fixed a later parse error but i still need some help with the line 20 one
-
now i get thisParse error: parse error in /home/www/dancha42.madpage.com/construction.php on line 20i hate parse errors. im gonna try and figure it out myself but if you what to fix your suggestions are welcomed
-
<?php include ("header.php"); echo "<br>Welcome to the construction site. Randomly we will update this place with stuff you can do. Currently we are offering you to make a building where you can make trade gold for ap or platinum for ap. The cost of this project is all 10k silver wood.</br>"; if ($stat[construction] <= 1) { print 'Would you like to start the building';echo "<a href="construction.php?action=construct">construct</a> ";)if ($action == construct) { print "you have started construction $stat[user]...<br><br>"; mysql_query("Update players Set construction=yes where id=stat[id] "); //a verification should be made if the player has the right amount of silver wood before making that query //else you'll end up with - numbers.. mysql_query("Update players Set silver wood = $stat[silverwood]-10000 where stat[id] "); mysql_query("Update players Set construction = stat[construction]+1 where stat[id] "); print "</table><br>"; print "Or you can always... <a href=city.php>go back</a>."; } } if ($stat[constructed] => 2) { $prices = mysql_query("select * from market"); $pa = mysql_fetch_array($prices); $plat_price = $pa[ap]; if ($action != buy) { print "Ap isn't always a stable-priced commodity... right now its $plat_price credits an ap. How much you want?"; print "<form method=post action=construction.php?action=buy>"; print "I want <input type=text name=plat> ap. <input type=submit value=Buy>"; print "</form>"; } else { $plat = str_replace("--","", $plat); $cost = ($plat * $plat_price); if ($cost > $stat[credits] || $plat <= 0) { print "You cant afford that! (<a href=pshop.php>back</a>)"; } else { mysql_query("update players set credits=credits-$cost where id=$stat[id]"); mysql_query("update players set ap=ap+$plat where id=$stat[id]"); print "You got <b>$plat</b> ap for <b>$cost</b> credits."; } } ?> <? include ("footer.php"); ?> and the error is if thes dont show up as quotes could a mod fix it please. this is for a text based game so it may seem different. But it shouldnt matter since the parse error shouldnt interfer with it.
-
I get money and i dont mind. My parents never know what to get me for christmas. So i get like 500+ dollars from my mom 200 from dad and rest from granparents i dont mind it. ITs better then getting presents that i would throw away or loose.
-
interesting. There is to much negative space tho. TRy booking coo lbackgrounds in the white spots
-
Santa Is Coming Early! Making money on the internet...
shadowdemon replied to calkid's topic in Business Forum
First i want to say, Wow that must have took you awhile to right. Second i am a little confused on what you said. Are you trying to teach people how to make money or teach people how to make money a certain site -
Something A Jet Could Do Besides Fly
shadowdemon replied to Saint_Michael's topic in Science and Technology
That couldnt have worked because that was horrible graphics, The jet needs something to jet off of and water isnt a solid land mass that it can work on, and then it would have sunk to the bottom of the ocean before it would blast off -
Hope For Paralysis Victims? You have to read this
shadowdemon replied to semeticsister's topic in Science and Technology
then also if a wire opens you are gonna be in a lot of pain if it touches your blood. -
Modules Useful For Gaming Sites! Gaming site Modules.
shadowdemon replied to savge17's topic in Websites and Web Designing
wait i have a question wat is this site about. Do you mean like the code to games or like te program ythry used to make them or wat -
Harry Potter 7 Theories Sorry to bombard everyone with HP btw.
shadowdemon replied to wakelim's topic in General Discussion
no definatly not