Jump to content

shortj75

Members
  • Posts

    118
  • Joined

  • Last visited

    Never

Everything posted by shortj75

  1. ok i was wondering what happened to and if they changed the way to mark it thanks for the answer though
  2. can someone tell me how to mark a topic solved thanks in advance
  3. no it drops a cookie in your visitors cookie file in the home computer
  4. i have a internal mail system and maybe a few other thing at [a href=\"http://tfws.dynu.com/software/\" target=\"_blank\"]T.F.W.S Downloads [/a] just click on the php button
  5. if you do not preview it throught a web browser by typeing [a href=\"http://127.0.0.1\" target=\"_blank\"]http://127.0.0.1[/a] or your ip address or webpage name you will see the code because php only parses it through a web browser
  6. your mysql connect should work fine once you put your userid and password in [code]<? mysql_connect("localhost","userid","password") or die ("Unable to connect to MySQL server."); mysql_select_db("snipelegends") or die ("Unable to select requested database."); ?>[/code]
  7. did you configure the apachi httpd config file to listen to your ip address if not you can open you page by localhost or by [a href=\"http://127.0.0.1\" target=\"_blank\"]http://127.0.0.1[/a] and you wont beable to open it by your address
  8. if i am understanding you correctly you can go here [a href=\"http://tfws.dynu.com/software/\" target=\"_blank\"]T.F.W.S Downloads[/a] click the php button and scroll down to mini messege board
  9. I took it out of the while loop and it works right now thanks for the help
  10. this is the part of the code that is inserting twice [code]$cat=$_POST['cid']; $for=$_POST['fid']; $user=$_SESSION['user']; $date=date("n/j/y g:i:s A"); $title=$_POST['title']; $subject=$_POST['subject']; $post=$_POST['post']; $sql="INSERT into posted(forum,cat,user,date,title,subject,post)values('$for', '$cat', '$user', '$date', '$title', '$subject', '$post')"; mysql_query($sql) or die ("Could not Post");[/code]
  11. str generaly means string you friend probably mistyped it he probably meant to type str=the rest of your code because str=str=the rest of your code will cause a parser error it would actually caus an error in any scripting language
  12. sorry i forgot to remove .php from your i frame [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]<iframe id="upcomingmain" src="<? echo "gotopage($urls)";?>.php" width=302 height=225 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=yes></iframe>[/quote]with this code it would be calling for a page like this yourpage.php.php so it it wont work unless your page had 2 php extentions sorry about that try it like this [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]<iframe id="upcomingmain" src="<? echo "gotopage($urls)";?>" width=302 height=225 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=yes></iframe>[/quote] this should work if it doesnt try to change because that code should do what you want
  13. try puttin youyour if statement into a function [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] function gotopage($url){ if ($eventdate >= $systemdate) { $url = 'upcomingmain.php'; } else { $url = 'noupcoming.php'; } } ?> <iframe id="upcomingmain" src="<? echo "gotopage($url)";?>.php" width=302 height=225 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=yes></iframe>[/quote] or something along that line hope this helps it might need some tweeking but in the end it should do what you want
  14. validating is checking to make sure it is right (useing the right characters) if (!ereg("^[A-Za-z' -]{1,50}$",$value)) if(!ereg("^.+@.+\\..+$",$value)) if(!ereg("^[5]{1,1}[0-9]{15,15}$",$value)) and this is the code they are validating with so if there input doesn't match any of the characters listed the form will return false and they will get an error message something like your name contains invalid characters. i dont know if that is what you are looking for but i hope that helps
  15. do you have any code started so we can see what you are working with because no one here is gonna want to write out a long and really coplex code for someone else to use but if you have a code that is started or just needs tweeling you will get alot of help and for future reference if you have a problem post your code in your first topic and you will get helped if help is possible for the code much quicker sorry if that sounds like i am comming off rude i am not meaning to
  16. try this [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]<form method="post" action="mail.php"> <input type="text" name="subject" value="Subject goes here" /><br /> <textarea name="body">Message goes here</textarea><br /> <input type="submit" name="send" value="Send" /> </form> <pre> <?PHP if($_GET['send'] == true) { $from = "from@address.here"; $subject = $_POST['subject']; $sendto ="address@one.com, address@two.com,address@three.com"; $messege="$_POST[body] r/n Sending message to: $sendto r/n"; mail($sendto, $subject, $message, From: $from); } ?> </pre> [/quote] hopfully this helps
  17. ok try this <? $today = date("Y-m-d"); $result = mysql_query("SELECT * FROM gigs WHERE date='$today' ORDER BY date ASC"); while($myrow = mysql_fetch_array($result)) { $date = $myrow['date']; list($year, $month, $day) = split("-", $date); $date = date('M d, Y', mktime(0, 0, 0, $month, $day, $year)); echo "$date - <a href="?pg=gi&id= $myrow[id]>$myrow[headline]</a></b><br>"; } ?> hopfully this helps
  18. hey everyone i am haveing a problem inserting into my db my code works it inserts the input to the db but when it does it inserts it 2-3 times when i hit the submit button i have benn trying to figure this out for a white now and i cant figure it out and was wondering if any one can help it would be great here it the code and thanks in advance if($_POST['submit']==true){ $getforums="SELECT * from forum"; $getforums2=mysql_query($getforums) or die(mysql_error()); while($getforums3=mysql_fetch_array($getforums2)) { $cat=$_POST['cid']; $for=$_POST['fid']; $user=$_SESSION['user']; $date=date("n/j/y g:i:s A"); $title=$_POST['title']; $subject=$_POST['subject']; $post=$_POST['post']; $sql="INSERT into posted(forum,cat,user,date,title,subject,post)values('$for', '$cat', '$user', '$date', '$title', '$subject', '$post')"; mysql_query($sql) or die ("Could not Post"); mysql_query("UPDATE register set post=post ++1 where user='$_SESSION[user]'") or die("could not update posts"); } print "<center><table cellpaddin=0 cellspacing=0 width=50% class=td><th class=th>$ID<TR><TD classspecialtable>"; echo "Post Submitted <a href=viewcat.php?cid=$cat&fid=$for>back to forum</a>"; echo "</center></th></tr></td></table></center>"; }else{ $ID=$_GET['cid']; $for=$_GET['fid']; print "<center><table cellpaddin=0 cellspacing=0 width=50% class=td><th class=th>$ID<TR><TD>"; if (isset($_SESSION['user'])) { $user = $_SESSION['user']; $getuser = "SELECT * from register where user='$user'"; $getuser2 = mysql_query($getuser) or die("Could not get user info"); $getuser3 = mysql_fetch_array($getuser2); print "<table cellpadding=0 cellspacing=0 width=100%><TD class=specialtable> <form method=post action=post.php> <input type=hidden name=cid value=$ID> <input type=hidden name=fid value=$for> Title:&nbsp<input type=text name=title><BR> Subject:&nbsp<input type=text name=subject><BR> Post:<BR> <textarea name=post cols=60 rows=15></textarea><br> <input type=submit name=submit value=Post style=border-style:solid;border-color:black;border-width:1px;bgcolor:silver;color:black;> </form></th></td></table>"; print "</th></td></table>"; }}
×
×
  • 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.