Jump to content

doogie63

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

doogie63's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. ran your script and this is what I get for webpage Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home2/ammotro1/public_html/ass/test.php on line 34 this is line 34 $myDate= $d["year"]."-".$d["mon"]."-".$d["mday"];
  2. here is the view.php of my script could you give me hint or clue what to look for? Do you need the config.php? It really only has info to dbase. <?php require('./config.php'); $conn = mysql_connect( $dbhost, $dbuser, $dbpass ); mysql_select_db($dbname,$conn); if($action=="post"){ if ($assname=="" || $asslocation=="" || $asscontent=="" || $name=="" || $email=="" || !isValidEmail($email)){ $msg1 = <<<ENDH <div align="center"> <center> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="373" height="30"> <tr> <td width="373" height="11" bgcolor="#0000FF"> <p align="center"><b><font color="#FFFFFF">Invalid Info</font></b></td> </tr> <tr> <td width="373" height="15" bgcolor="#FFFFFF"> <p align="center"><Font color=red>You have entered invalid information</font></td> </tr> </table> <br><p align="center">Press the back button to correct your information</p> </center> </div> ENDH; printContent($msg1); } else { $table_db = $ASS[$form]; $d = getdate (time()); $myDate= $d["year"]."-".$d["mon"]."-".$d["mday"]; $sql_query = "INSERT INTO $table_db (name, email, assname, asslocation, asscontent, publish, id, date) VALUES ('$name', '$email', '$assname', '$asslocation', '$asscontent', 'N', '', '$myDate')"; $gholi= mysql_query( $sql_query , $conn ); $msg1 = <<<ENDH <div align="center"> <center> <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="373" height="30"> <tr> <td width="373" height="11" bgcolor="#0000FF"> <p align="center"><b><font color="#FFFFFF">Submission Information</font></b></td> </tr> <tr> <td width="373" height="15" bgcolor="#FFFFFF"> <p align="center"><Font color=green>Thankyou For your submission</font></td> </tr> </table> <br><p align="center">Click here <a href="http://www.ammotroops.com/">Ammotroops</a> to go to main page</p> </center> </div> ENDH; printContent($msg1); } } else if($action=="view"){ if($start=="" || $start < 0){ $start=0; } $max=$default_max; if(($start % $max) != 0){ header("Location:$home/$view?action=view&start=0&form=$form"); } if($pg==""){ $pg=1; } $num_cat = count($ASS); if($form >= $num_cat || $form < 0 || $form=="" ){ header ("Location: $home"); exit; } $table_db = $ASS[$form]; $num_rows = mysql_num_rows(mysql_query("SELECT * FROM $table_db where publish=\"Y\"")); $remainder = ($num_rows % $max); if(($start+$max) > ($num_rows + ($max - $remainder))){ $start=0; $max = $default_max; } head($form,$Title,$formpg); $sql_select_query = "SELECT * FROM $table_db WHERE publish=\"Y\" ORDER BY date DESC LIMIT $start,$max"; //echo $sql_select_query; $select_info = mysql_query( $sql_select_query , $conn ); while( $theRow = mysql_fetch_row( $select_info )){ echo "<tr><td align=center width=\"200\" height=\"1\">$theRow[7]</td><td width=\"371\" height=\"24\" rowspan=\"4\">$theRow[4]</td></tr>"; echo "<tr><td align=center width=\"200\" height=\"1\">$theRow[2]</td></tr>"; echo "<tr><td align=center width=\"200\" height=\"1\">$theRow[3]</td></tr><tr><td height=100%> </td></tr>"; echo "</tr><tr><td width=\"555\" height=\"1\" colspan=\"2\" bgcolor=\"#E2E1D1\"> </td></tr>"; } echo "</table></div>"; $num_rows = mysql_num_rows(mysql_query("SELECT * FROM $table_db where publish=\"Y\"")); echo "Page: "; $remainder = ($num_rows % $max); $num_pg = (int)($num_rows / $max); if($remainder > 0) $num_pg = $num_pg+1; for ($i=0; $i< $num_pg; $i++) { $startVal = $i * $max; $page = $i+1; echo "\n<a href=$view?action=view&start=$startVal&max=$max&form=$form>$page</a> "; } mysql_close ($conn); foot(); } function isValidEmail($email){ if( strstr($email,'@') ) { return true; } else{ return false; } } function foot(){ $foot = <<<ENDH </center> </body> </html> ENDH; echo $foot; } function head($form,$Title,$formpg){ $head = <<<ENDH <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="Author" content="doogie"> <meta name="keywords" content="ammo, newgroups, binnews, ammo bowl, iyaayas, doogie, air force, ammo ass award, ammo dumb ass, ammo ace, ammo base"> <title>Ammo Ass www.AmmoTroops.com</title> </head> <body background="http://ass.ammotroops.com/froncoin4.jpg"> <center><a href="http://www.ammotroops.com">www.AmmoTroops.com</a> <div width="600"> <table align=center><tr><td align=center><b><font color="#FF0000"><font size="+3">$Title[$form] AWARD</font></font></b></td></tr> <tr><td align=center><a href=$formpg?form=$form>$Title[$form] Form</a></td></tr><tr><td> <br><br></td></tr></table> <table BORDER="1" COLS="2" WIDTH="577"> <tr> <td width="131" height="19" bgcolor="#E2E1D1"><center> <p><b>Date</b></p> </center></td> <td width="424" height="31" bgcolor="#E2E1D1" rowspan="3" valign="middle"> <p align="center"><b>Why</b></td> </tr> <tr> <td width="134" height="12" bgcolor="#E2E1D1"> <p align="center"><b>Name</b></td> </tr> <tr> <td width="134" height="1" bgcolor="#E2E1D1"> <p align="center"><b>Location</b></td> </tr> ENDH; echo $head; } function printContent($content){ $html = <<<ENDH <html> <head> <title>Ammo TRoops</title> </head> <body background="http://ass.ammotroops.com/froncoin4.jpg"> $content </body></html> ENDH; echo $html; } ?>
  3. I did not change my php.ini file yet with error info I did delete my php.ini file to try to break script again so I could read error.log I went to my cpanel and click error log but nothing came up about error for my php.view When I know goto url I just get blank page since global is turn off.
  4. You are right this is hard, plus im a noob. I did search on script looking for: $_ session variable I guess I need to turn off register_globals = On in my php.ini file so I will get errors and then add into my php.ini error_reporting -1
  5. I did not write the script someone wrote it for me long time ago. This is what script does http://ass.ammotroops.com/view.php?action=view&form=0 http://ass.ammotroops.com/view.php?action=view&form=1 http://ass.ammotroops.com/view.php?action=view&form=3 http://ass.ammotroops.com/view.php?action=view&form=4 and http://ass.ammotroops.com/guestbook1.php?a=B What should I look for in script to change, Im a noob but willing to learn and try to figure it out. Script also has admin where I click to post submit name, on the guestbook it send me email and I click link in email to update guestbook. Thaks for anyhelp
  6. How do I use jumi inside Joomla if the php code I want to run also needs a config.php file? I have put both files, guestbook.php and config.php into jumi/files but I get error i get same error if i past guestbook.php into jumi Warning: require(./config.php) [function.require]: failed to open stream: No such file or directory in /home2/website/public_html/components/com_jumi/files/guestbook.php on line 2 Fatal error: require() [function.require]: Failed opening required './config.php' (include_path='.:/usr/share/pear') in /home2/website/public_html/components/com_jumi/files/guestbook.php on line 2 also having trouble with this inside joomla using jumi, outside joomla not using jumi it works fine. http://ass.ammotroops.com/view.php?action=view&form=0 http://ass.ammotroops.com/view.php?action=view&form=1 http://ass.ammotroops.com/view.php?action=view&form=3 http://ass.ammotroops.com/view.php?action=view&form=4
  7. I need help with Jumi module for Joomla Can not figure out how to use code with /view.php?action=view&form=0 at end of url thanks
  8. I have script that I need register_globals = On right now I have to put php.ini into root of my webpage on webhost. but that means it turn on register_globals = On for whole site. I have tried just putting php.ini into subdomain but does not work, well script does not work. I have tried to put AddHandler application/x-httpd-php5s .php into the .htaccess in subdomain but that does not work either, script stop working. I can not get script to work if php.ini is in root of webpage webhost. What I'm I doing wrong, thanks
  9. Well everything is now working on site as far as my script goes. Now just trying to move it inside joomla using jumi module. Not having much luck but at least no matter what it will work outside joomla. Thanks for all the help.
  10. This is what I got back from Help desk of web host. Now working. http://ass.ammotroops.com/guestbook1.php?a=A http://ass.ammotroops.com/view.php?action=view&form=0 It looks like your script heavily relies on register_globals being on but it is currently set off by default. I noticed you had a php.ini file in that folder to try and turn them on but you are also using the Single INI version of our php which will only use the public_html/php.ini for all php settings. You would need to make that change in a php.ini file located in the public_html or you would need to set a different PHP type in that folder so that it will check the php.ini in that folder. To change the php type you could add "AddHandler application/x-httpd-php5 .php" into your .htaccess in that folder. I put my php.ini file in public_html and now it works, before I just had it in ass. I dont really understand what they want me to do to: "AddHandler application/x-httpd-php5 .php" into your .htaccess would I just add that line just as it reads into my .htaccess?
  11. in admin.php I have $conn1 = mysql_connect( $dbhost, $dbuser, $dbpass ); in guestbook1.php I have $conn = mysql_connect( $dbhost, $dbuser, $dbpass );
  12. http://ass.ammotroops.com/guestbook1.php?a=A guestbook1.php is using same congfig.php and it works connection to db. So I have right user name and password
  13. $conn1 = mysql_connect( $dbhost, $dbuser, $dbpass ); which in config.php gives answers. I edit it to post not to give out real user or pass, that i have the right info in config. //enter user info in here $dbhost="localhost"; $dbuser="user"; $dbpass="pass"; $dbname="doogie_ass";
  14. In the config.php I have the new database name, user, and password. Thats why http://ass.ammotroops.com/guestbook1.php?a=A works, its pulls info from config to open db to get info. I think thats what you are talking about?
  15. I think the error is talking about this part, What a good book I can start to read to learn more about php? For noob else $givenPass = $passwd; $sql_select_query = "SELECT * FROM ammopass"; $select_info = mysql_query( $sql_select_query , $conn1 ); $theRow = mysql_fetch_row( $select_info ); $currentPass = $theRow[0]; mysql_close($conn1); if ($currentPass==$givenPass) return true; else return false;
×
×
  • 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.