Jump to content

Patrick3002

Members
  • Posts

    89
  • Joined

  • Last visited

    Never

Everything posted by Patrick3002

  1. Thanks, i might look into that. I'm making it that way because thats the way it has to be for the situation at hand.
  2. this sucks, no one knows how i would do this???
  3. How does that in anyway link from run.php to vote.php? Read the post again. I need to run the javascript on vote.php FROM run.php by clicking a link or whatever else is easiest. Thanks for the try though!
  4. Hi, im going to show you an example of what i want to do, then try ang explain it. I have a page http://domain.com/run.php which when i go there i get a submit link, thats all. I have another page, http://domain.com/vote.php. When i click that submit link from /run.php i want it to perform the javascript func on /vote.php: <a href="javascript:vote( 'right' );" border="0">[sUBMIT]</a> When that is clicked on run.php: function vote(side) { document.getElementById("side_voting_on").value=side; var v = false; for (i=0; i<a.length; i++) { if (a[i]==2617072) { v = true; break; } } if (!v) { document.getElementById('vote_form').submit(); } else { location.href = "/vote.php"; } } When the submit link on run.php is clicked, i want the javascript func on vote.php to run. If anyone can help me out with this, that'd be greatly appreciated! ~Patrick
  5. Does anyone know if its possible, and how i would go about doing this: <?php include_once("vote.php?poll_id=82"); ?> Of course, php doesn't like that, but i need to do that, anyone have any ideas?? Thanks!!
  6. Heres my code: <?php include_once("config.php"); $sql="SELECT `title`, `op1`, `op2`, `op3`, `op4`, `op5`, `op6`, `op7`, `op8`, `op9`, `op10` FROM `vote` WHERE `poll_id` = '69'"; $result=mysql_query($sql); $num_rows=mysql_num_rows($result); echo "<table width=\"335\" height=\"342\" border=\"1\" cellpadding=\"0\" cellspacing=\"0\" bordercolor=\"#000000\"> <tr> <td height=\"42\" colspan=\"2\" align=\"center\" valign=\"middle\"><table width=\"95%\" height=\"80%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td align=\"left\" valign=\"middle\" bgcolor=\"#00CCFF\"><?php echo $title; ?></td> </tr> </table></td> </tr>"; $i=0; $x=0; while ($i < $num_rows) { $title=mysql_result($result,$i,"title"); $op=mysql_result($result,$i,"op1"); $op=mysql_result($result,$i,"op2"); $op=mysql_result($result,$i,"op3"); $op=mysql_result($result,$i,"op4"); $op=mysql_result($result,$i,"op5"); $op=mysql_result($result,$i,"op6"); $op=mysql_result($result,$i,"op7"); $op=mysql_result($result,$i,"op8"); $op=mysql_result($result,$i,"op9"); $op=mysql_result($result,$i,"op10"); $brdr_clr=mysql_result($result,$i,"brdr_clr"); echo "<tr> <td>$op</td> <td width=\"73\" align=\"center\" valign=\"middle\"><input name=\"$op\" type=\"radio\" value=\"radiobutton\"></td> </tr>"; $i++; $x++; } echo "</table>"; ?> Now, its only echoing the last $op var, which would be = to whatever op10 = in the db, i want it to echo w/e op1-op10 is from the db, so i guess i'd need it to automatically increase, but im not sure how i'd go about doing that. I want to echo this for each op1-op10, so it would echo that table and the first table, $op would = op1, the second table, $op2 would = op2 and so on... echo "<tr> <td>$op</td> <td width=\"73\" align=\"center\" valign=\"middle\"><input name=\"$op\" type=\"radio\" value=\"radiobutton\"></td> </tr>"; Any help is appreciated!
  7. Hi, if i remember correctly you would use: if ( !$pBy || !$lyric || !$artist || !$song ) { echo "<font color=red>[sTATUS]</font>: Be sure to fill in all of the fields."; } else { To check if: $pBy=$_POST['pBy']; $lyric=$_POST['lyric']; $artist=$_POST['artist']; $song=$_POST['song']; Are all entered in... in my case, this is incorrect. It will add to the db if the first/second field has been entered, doesn't matter about the others... Is there an alternative to check to see if all required fields have been entered? Any help is greatly appreciated, thanks!!! ~Patrick
  8. I just created a sID field for all of my songs, and then pulled the data from the DB using that sID, that way its an interger im using to pull data, rather than special characters, numbers, and letters. Thanks for the help though!
  9. That will not work... i dont understand how to use that...
  10. Hi. I have a name in my DB called: !#$ The %&*! (Fuck The Bullshit) When i click that link on my page "<a href="http://lyricdbonline.com/view.php?song=!#$%20The%20%&*!%20(Fuck%20The%20Bullshit)">http://lyricdbonline.com/view.php?song=!#$%20The%20%&*!%20(Fuck%20The%20Bullshit)</a>" It has all of those weird characters in it such as !, #, $, %, &, *... And when i click it, it doesnt display any of the data that im trying to pull from the db for that name "!#$ The %&*! (Fuck The Bullshit)" because of all of those special characters. Is there anyway that i could escape those so i could use my script on that name, such as.... <?php include_once("includes/config.php"); $song=$_GET['song']; $song = mysql_real_escape_string($song); $lTable="lyrics_01"; $glInfo="SELECT * FROM $lTable WHERE song = '$song'"; $lResult=mysql_query($glInfo); $aNum=mysql_num_rows($lResult); $aI=0; while ($aI < $aNum) { $pc=mysql_result($lResult,$aI,"pc"); $artist=mysql_result($lResult,$aI,"artist"); $pBy=mysql_result($lResult,$aI,"pBy"); $email=mysql_result($lResult,$aI,"email"); $lyric=mysql_result($lResult,$aI,"lyric"); $date=mysql_result($lResult,$aI,"date"); $scount=mysql_result($lResult,$aI,"scount"); $aI++; $scount++; } $cTotal = "UPDATE $lTable SET scount = '$scount' WHERE song = '$song'"; $cResult=mysql_query($cTotal); $song = stripslashes($song); $artist = stripslashes($artist); ?> Where "!#$ The %&*! (Fuck The Bullshit)" is $song Any help is much appreciated!
  11. My current rules: RewriteEngine On 1. RewriteRule ^([A-Za-z0-9-]+)/?$ profile.php?uname=$1 2. RewriteRule ^(usr_lyrc)/([A-Za-z0-9-]+)/?$ lyric.php?uname=$2 3. RewriteRule ^(find)/([A-Za-z0-9-]+)/?$ find.php?pc=$1 4. RewriteRule ^(find)/([A-Za-z0-9-]+)/([A-Za-z0-9]+)/?$ find.php?pc=$1&q=$2 5. RewriteRule ^(artist)/([A-Za-z0-9-]+)-([^&]+).htm$ lyric.php?pc=$2&artist=$3 [L] Rewrite rules 1 and 3 conflict with actual directorys listed in my root... ex. If a user types in http://lyricdbonline.com/patrick3002 i want it to take them to http://lyricdbonline.com/profile.php?uname=$uname Also, if i type http://lyricdbonline.com/otherstuff then i want it to take me to the otherstuff DIR on my server, not http://lyricdbonline.com/profile.php?uname=$uname Does anyone know a way around this? Help is much appreciated!
  12. I aprreciate it so much lol... in the httpd.conf there was a # before the loadmodule rewrite haha. and the allowoverride was not set to all I have fixed it and stuff is working...half way When i go to http://lyricdbonline.com/patrick3002 it does wat i want... But, when i go to http://lyricdbonline.com/b/badd it takes away all of my css and changes the dir so that when i click a link, it has http://lyricdbonline.com/b/find.php and it doesn't exist, the real link should be http://lyricdbonline.com/find.php Thanks for helping me!!
  13. Hi, right now in my .htaccess file that is located in C:\Program Files\Apache Group\Apache2\public_html along with lyric.php and all of my other files to my website. When i put this rewrite rule in my .htaccess file, what i want to happen doesn't happen. Code: RewriteEngine On RewriteRule ^([A-Za-z0-9-]+)/?$ lyric.php?uname=$1 What im trying to do is, if you type in: http://lyricdbonline.com/patrick3002 --It will simply redirect you to: http://lyricdbonline.com/lyric.php?uname=patrick3002 Any ideas?
  14. Hi, right now in my .htaccess file that is located in C:\Program Files\Apache Group\Apache2\public_html along with lyric.php and all of my other files to my website. When i put this rewrite rule in my .htaccess file, what i want to happen doesn't happen. RewriteEngine On RewriteRule ^([A-Za-z0-9-]+)/?$ lyric.php?uname=$1 What im trying to do is, if you type in: http://lyricdbonline.com/patrick3002 --It will simply redirect you to: http://lyricdbonline.com/lyric.php?uname=patrick3002 Any ideas?
  15. Hi, i was wondering if anyone could show me how i would accomplish something like.... I want my user profile links to be: lyricdbonline.com/patrick3002 instead of lyricdbonline.com/profile.php?uname=patrick3002 Does anyone know how i would go about accomplishing this? Any help is much appreciated!
  16. Awesome, that works perfect thanks alot frost!! , Patrick
  17. The case works fine outside of the function though... I'll try
  18. I was wondering if it is possible to to have a function inside of a custom created function? Heres an example: <?php function orderBy() { switch ($selorder) { case snasc: $field = "sname"; $ad = "ASC"; $ordered = "Service Name (ASC)"; break; case sndesc: $field = "sname"; $ad = "DESC"; $ordered = "Service Name (DESC)"; break; default: $field = "sname"; $ad = "ASC"; $ordered = "Service Name (ASC)"; } } ?>
  19. Something like this.... $numbers = array("1","2","3","4","5"); echo $numbers[0]; (outputs 1) echo $numbers[1]; (outputs 2) etc... But instead i can use strings in the array func... is that right?? so like this: array("$var1","$var2","$var3"); can i use vars in an array func??
  20. Ok, kewl. Is there some kind of array function that looks like this: $image[2]; That'll display the second array or something?
×
×
  • 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.