Jump to content

adamwhiles

Members
  • Posts

    54
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

adamwhiles's Achievements

Member

Member (2/5)

0

Reputation

  1. Wasn't sure exactly where to post this at but here is my issue. I have a directory setup where multiple developers work on a project and they all have "group" access to the folder and files(read, write, execute) so the permissions on the php files need to be 775 so they can upload and overwrite the files via FTP. The problem is that PHP files will not work with permissions of 775 and throw a internal server error unless I change it to something lower. Is there a way to overcome this for these files?
  2. I have a site that the purpose is for users to be able to submit php code for others to see or help with whatever. I am currently inserting the actual code into a mysql, I know this is not secure but I'm looking for the best way to do this. All I need it to do is store the php code, then be able to view that code w/ highlighting etc. on another page. It works for the most part as is right now, just looking for a better option than storing in a database. Also, it seems like that when the code is pulled back out of mysql the formatting(indents) are a little off, any suggestions there? BTW, this site is not live so I don't have any examples to show you. It just runs privately on my local test machine.
  3. basically I have 5 tables that look like this for monday through friday CREATE TABLE IF NOT EXISTS `monday` ( `name` varchar(60) NOT NULL, `lode` int(1) NOT NULL default '0', `slot1` int(1) NOT NULL default '0', `slot2` int(1) NOT NULL default '0', `slot3` int(1) NOT NULL default '0', `slot4` int(1) NOT NULL default '0', `slot5` int(1) NOT NULL default '0', `slot6` int(1) NOT NULL default '0', `slot7` int(1) NOT NULL default '0' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; name represent the intructors name, load represents the number of slots the instructor is booked for on that day and each slot represents a time slot for that day
  4. Thanks! It works somewhat now. Now it creates a lot of duplicate entries. Here is the whole code segment. $result = mysql_query("SELECT * FROM monday m, tuesday t, wednesday w, thursday th, friday f WHERE m.lode='7' OR t.lode='7' OR w.lode='7' OR th.lode='7' OR f.lode='7'") or die(mysql_error()); ?> <form action="test.php" name="unavailable_users" method="post"> <select name="listbox" size="3"> <? while ($row = mysql_fetch_assoc($result)) { ?> <option value="Option 1"><?echo "$row[name]"; ?> <? } ?> ?> </select> <input type="submit" name="edit_user_go" value="Make User Available" /> </form> <?
  5. I'm having an issue selecting rows across multiple tables. Basically I have tables monday, tuesday, wednesday, thursday and friday and they all have a common field named lode. The field lode is not the same for each row across the tables like a primary key, lode is different in most instances. What I need to do is search all tables and find the rows where lode is equal to 7. I tried this but figured it couldn't be that easy and it didn't work. Any ideas? $result = mysql_query("SELECT * FROM monday, tuesday, wednesday, thursday, friday WHERE lode='7'") or die(mysql_error());
  6. the text is not the problem, take a look at the image behind "// phpshack // home" its a little off in IE but fine in firefox
  7. Ok i have been working a new layout for my site and for some reason internet explorer displays it correctly but in firefox the text goes over the footer. The only problem in IE is the little strip where it says // phpshack // home is a little off and doesn't line up, but in firefox that part is perfect. Here is the link: [url=http://www.phpshack.net/testing/]http://www.phpshack.net/testing/[/url] here is my css code for the site: [code] #main { width: 800px; min-height: 600px; text-align:center; } #header { width: 792px; height: 101px; background-image:url(header.jpg); background-repeat:no-repeat; } #mid_header { width: 792px; height: 132px; background-image:url(bottom_header.jpg); background-repeat:no-repeat; } #mid_bannerad { padding-top: 20px; width: 792px; height: 80px; } #mid_strip { width: 792px; height: 29px; text-align:left; padding-left:10px; padding-top:2px; font-family:Verdana, Arial, Helvetica, sans-serif; font-size: small; font-weight:900; background-image:url(strip.jpg); background-repeat:no-repeat; } #content { min-height: 600px; } #left_nav { float: left; padding-left:10px; width: 200px; height:auto; text-align: left; border-right: dashed; border-right-color:#000000; } #right_content { text-align: left; padding-left:5px; height:auto; } #footer { width: 792px; height: 33px; background-image:url(footer.jpg); background-repeat:no-repeat; } [/code] Then my HTML code is: [code] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>phpShack // PHP Tutorials and Forums</title> <link rel="stylesheet" href="main_style.css" type="text/css" /> </head> <body> <div id="main"> <div id="header"></div> <div id="mid_header"> <div id="mid_bannerad"> <script type="text/javascript"><!-- google_ad_client = "pub-6105630547956573"; google_ad_width = 728; google_ad_height = 90; google_ad_format = "728x90_as"; google_ad_type = "image"; google_ad_channel =""; google_color_border = "336699"; google_color_bg = "FFFFFF"; google_color_link = "0000FF"; google_color_text = "000000"; google_color_url = "008000"; //--></script> <script type="text/javascript"   src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </div> </div> <div id="mid_strip">// phpShack // HOME</div> <div id="content"> <div id="left_nav"> asdasdasdasdas<br /> asdasdasdasdasd <br /> asdasdasdasdas<br /> asdasdasdasdasd <br /> asdasdasdasdas<br /> asdasdasdasdasd <br />asdasdasdasdas<br /> asdasdasdasdasd <br /> asdasdasdasdas<br /> asdasdasdasdasd <br /> asdasdasdasdas<br /> asdasdasdasdasd <br /> asdasdasdasdas<br /> asdasdasdasdasd <br />asdasdasdasdas<br /> asdasdasdasdasd <br /> asdasdasdasdas<br /> asdasdasdasdasd <br /> asdasdasdasdas<br /> asdasdasdasdasd <br /> asdasdasdasdas<br /> asdasdasdasdasd <br />asdasdasdasdas<br /> asdasdasdasdasd <br /> asdasdasdasdas<br /> asdasdasdasdasd <br /> asdasdasdasdas<br /> asdasdasdasdasd <br /> asdasdasdasdas<br /> asdasdasdasdasd <br />asdasdasdasdas<br /> asdasdasdasdasd <br /> asdasdasdasdas<br /> asdasdasdasdasd <br /> asdasdasdasdas<br /> asdasdasdasdasd <br /> asdasdasdasdas<br /> asdasdasdasdasd <br />asdasdasdasdas<br /> asdasdasdasdasd <br /> </div> <div id="right_content"> asdasdasdasda </div> </div> <div id="footer"></div> </div> </body> </html> [/code]
  8. I figured it out through a little trial and error. Thanks for you help though. Glad you like my avatar. Here is the code I used in case anyone else needs help with this. [code] highlight_string('<? if (IsSet($_POST[\'Submit\'])) { echo "The submit button was pressed"; } else { echo "The submit button was not pressed"; } ?>'); [/code]
  9. I would need to set something like this: $code = "echo \"Hello World!\";"; highlight_string($code); I'm not sure how to properly keep the " in my code from causing problems, thats where I have trouble.
  10. Well here is an example of what i have: [code] <div id="php_code_header">PHP Code Example:</div> <div id="php_code"> if (IsSet($_POST['Submit'])) { <br>echo "The submit button was pressed"; <br>} <br>else { <br>echo "The submit button was not pressed"; <br>} </div> [/code] The div's setup my box the code is contained in, and I want the rest to be highlighted. I'm not sure I understand how to go about this.
  11. I was wondering how to go about highlight example php code. I have a page where I show examples of how to use php code and I would like to highlight the php code in it, alot like phpfreaks does on their tutorial pages. I already have a box with the code in it that displays fine, I just want to color the syntax and format it a little. A point in the right direction would be much appreciated. Thanks
  12. I think the problem is that maybe my host doesn't have true type font support enabled.
  13. it is in the same directory as the script is
  14. nope that didn't work either. I don't know what is wrong with it honestly.
  15. thats what i thought, but its right there in the same dir as the script itself.
×
×
  • 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.