Jump to content

jeremywesselman

Members
  • Posts

    154
  • Joined

  • Last visited

    Never

About jeremywesselman

  • Birthday 10/21/1982

Profile Information

  • Gender
    Male
  • Location
    Independence, KY

Contact Methods

  • Yahoo
    jeremywesselman

jeremywesselman's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. As TheFilmGod and Roopurt mentioned above, you should do work locally then deploy from your version control. But not all sites have things set up this way, and they're not really interested in setting it up this way either. Sometimes you're stuck working for a client that just wants changes or updates here and there and you have to edit on the live site. In cases like this, there are a couple options that make things pretty easy. As MadTechie mentioned above, Dreamweaver has the ability to connect directly to your FTP and allows you to edit files directly on the server and updates them when you save them. Another IDE that has this is Zend Studio. It allows you to do the same thing. Both of these programs are definitely not inexpensive. But since Zend Studio is built on Eclipse, you may be able to get this feature without having to purchase Zend Studio. NetBeans also has a plugin called RemoteFileSystem. I've used this before to do the same thing, but it is sometimes hard to configure properly and it won't let you delete the connections if you need to. Jeremy
  2. I just wanted to thank all the mods for the quick turnaround in the freelancing forum. You all are doing a great job keeping up with it. Thanks for all of your help in every forum on the site. I will be making another donation to phpfreaks very soon. Another way would be to only let the member who posted the topic originally edit and add new replies. This probably wouldn't be too difficult to implement. Just add some code to disable the reply button unless you are a mod or the topic starter. Thanks again, [!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]Jeremy[!--colorc--][/span][!--/colorc--]
  3. Thanks mods. You took care of the problem very quickly. I can understand how difficult it must be to keep up with all the posts that are being posted. A suggestion might be to get some more moderators, but that is probably up to phpfreak. Anyways, thanks for taking care of the freelancing section and all the sections for that matter. [!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]Jeremy[!--colorc--][/span][!--/colorc--]
  4. I just wanted to comment on how users are not reading the rules for posting in the freelancing section. I don't know about a lot of people, but I check phpfreaks.com often for freelancing work. About 15 - 20 times a day actually. And lately, there have been a lot of people replying in the freelancing section which is a big no no. But it seems lately that the mods aren't maintaining it like they used to. They used to edit every post with a message explaining to users that they should not post replies and that they should contact the author of the post via an email or by pm. It seems that they are not editing these posts anymore and the replies are building up. I just wanted to see what was going on and if anybody else gets aggravated by this. [!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]Jeremy[!--colorc--][/span][!--/colorc--]
  5. What "mode" are you typing the code in? There is a "Code", "Both" OR "Design". Just checking all of the facts... FYI: You'll want to be in "Code" Mode if you don't already know. [!--coloro:#990000--][span style=\"color:#990000\"][!--/coloro--]Jeremy[!--colorc--][/span][!--/colorc--]
  6. You don't need a special program to copy and paste. Jeremy
  7. Well, on your logout page or in your logout function, just have a query to delete the current userid. Here is the sql syntax you would use to delete the user "DELETE FROM table WHERE userid = user_id" Jeremy
  8. You'll need to go into your cpanel(if you have one) and add your ip address to the "access hosts" list in the mysql databases page. It should be close to the bottom. You might have to create a new username and password to access from your computer also. Jeremy
  9. First, you need to change the "name" property of your textboxes to something that describes what is in them. So, if the first textbox is "name", you will need to change "name = 'textfield'" to "name='name'". Do this for the rest of the form. Then you are going to start off by setting up the process part of the page. [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--][span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]if(isset([/span][span style=\"color:#0000BB\"]$_POST[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'Submit\'[/span][span style=\"color:#007700\"]])) { [/span][span style=\"color:#FF8000\"]//Enter form processing here [/span][span style=\"color:#007700\"]} else { [/span][span style=\"color:#FF8000\"]//Your form could go here so it doesn\'t show up when you submit it. [/span][span style=\"color:#007700\"]} [/span][span style=\"color:#0000BB\"]?>[/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] So after this, we will need to get all the values of the textboxes on your form. [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--][span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]if(isset([/span][span style=\"color:#0000BB\"]$_POST[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'Submit\'[/span][span style=\"color:#007700\"]])) { [/span][span style=\"color:#0000BB\"]$name [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]$_POST[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'name\'[/span][span style=\"color:#007700\"]]; [/span][span style=\"color:#0000BB\"]$email [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]$_POST[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'email\'[/span][span style=\"color:#007700\"]]; [/span][span style=\"color:#FF8000\"]//etc... You get the point. [/span][span style=\"color:#007700\"]} else { [/span][span style=\"color:#FF8000\"]//form [/span][span style=\"color:#007700\"]} [/span][span style=\"color:#0000BB\"]?>[/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] After you collect all of your data, go ahead and do any error checking you want on it. (Check if it is empty, correct, etc). Then comes the mail part. [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--][span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]... [/span][span style=\"color:#FF8000\"]//the mail function [/span][span style=\"color:#0000BB\"]$to [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"\" [/span][span style=\"color:#FF8000\"]//The person you are sending it to [/span][span style=\"color:#0000BB\"]$subject [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"\" [/span][span style=\"color:#FF8000\"]//The subject of the email [/span][span style=\"color:#0000BB\"]$message [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"\" [/span][span style=\"color:#FF8000\"]//The message you want to appear in the body of the email [/span][span style=\"color:#0000BB\"]$email [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"\" [/span][span style=\"color:#FF8000\"]//The person email address who is sending email [/span][span style=\"color:#0000BB\"]mail[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$to[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]$subject[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]$message[/span][span style=\"color:#007700\"], [/span][span style=\"color:#DD0000\"]\"FROM: $email\"[/span][span style=\"color:#007700\"]); ... [/span][span style=\"color:#0000BB\"]?>[/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] The mail part goes in the processing part of the script. Jeremy
  10. What you want done is very easy to do. I have looked a couple places but I have found nothing to show you exactly how to do it exactly like you want it. If you need help, email me at jeremywesselman [at] insightbb [dot] com and I could walk you through it so we don't clog the board up. Jeremy
  11. Yes, it all goes on the same page. I tested on my own server before I posted here and it works for me. Jeremy
  12. [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--][span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]if(isset([/span][span style=\"color:#0000BB\"]$_POST[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'submit\'[/span][span style=\"color:#007700\"]])) { [/span][span style=\"color:#0000BB\"]$month [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]$_POST[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'month\'[/span][span style=\"color:#007700\"]]; [/span][span style=\"color:#0000BB\"]$day [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]$_POST[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'day\'[/span][span style=\"color:#007700\"]]; [/span][span style=\"color:#0000BB\"]$year [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]$_POST[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'year\'[/span][span style=\"color:#007700\"]]; [/span][span style=\"color:#0000BB\"]$eventDate [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]$month [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#DD0000\"]\" \" [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$day [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#DD0000\"]\", \" [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$year[/span][span style=\"color:#007700\"]; echo([/span][span style=\"color:#0000BB\"]$eventDate[/span][span style=\"color:#007700\"]); } else { [/span][span style=\"color:#0000BB\"]?> [/span]<form action=\"[span style=\"color:#0000BB\"]<?=$_SERVER[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'PHP_SELF\'[/span][span style=\"color:#007700\"]][/span][span style=\"color:#0000BB\"]?>[/span]\" method=\"post\"> Enter Event Date: <select name=\"month\"> <option value=\"Jan\">Jan</option> <option value=\"Feb\">Feb</option> <option value=\"Mar\">Mar</option> <option value=\"April\">April</option> </select> <select name=\"day\"> <option value=\"1\">1</option> <option value=\"2\">2</option> <option value=\"3\">3</option> <option value=\"4\">4</option> <option value=\"5\">5</option> <option value=\"6\">6</option> <option value=\"7\">7</option> </select> <select name=\"year\"> <option value=\"2005\">2005</option> <option value=\"2006\">2006</option> </select> <input type=\"submit\" value=\"Submit\" name=\"submit\"> </form> [span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#007700\"]} [/span][span style=\"color:#0000BB\"]?>[/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] All you have to do is concatenate all of the values of the selects. You can format it however you want. Jeremy
  13. [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--][span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#FF8000\"]//Use the switch() to set up navigation [/span][span style=\"color:#007700\"]switch([/span][span style=\"color:#0000BB\"]$_GET[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'id\'[/span][span style=\"color:#007700\"]]) { case [/span][span style=\"color:#DD0000\"]\'1\'[/span][span style=\"color:#007700\"]: { include([/span][span style=\"color:#DD0000\"]\'page1.php\'[/span][span style=\"color:#007700\"]); } break; case [/span][span style=\"color:#DD0000\"]\'2\'[/span][span style=\"color:#007700\"]: { include([/span][span style=\"color:#DD0000\"]\'page2.php\'[/span][span style=\"color:#007700\"]); } break; default: { include([/span][span style=\"color:#DD0000\"]\'home.php\'[/span][span style=\"color:#007700\"]); } break; } [/span][span style=\"color:#0000BB\"]?>[/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] Then have your menu set up like "index.php?id=1" and it will load page1.php. Jeremy
  14. What do you plan on doing with the information? Are you saving it to db or mailing it to yourself? I need more info then I'll help you out. Jeremy
  15. I don't know if this is what you had in mind but this is what I got from the description above. You can see a live version here. Here is the code: [!--PHP-Head--][div class=\'phptop\']PHP[/div][div class=\'phpmain\'][!--PHP-EHead--] [span style=\"color:#0000BB\"]<?php [/span][span style=\"color:#FF8000\"]// Jeremy Wesselman @ http://jwdevelopment.cincywebsolutions.com - hollywoodwesselman@hotmail.com //enter your database info here [/span][span style=\"color:#0000BB\"]$dbHost [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"DBHOST\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$dbUser [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"DBUSER\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$dbPass [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"DBPASS\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$dbDatabase [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"DBDATABASE\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$dbTable [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"DBTABLE\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#FF8000\"]//connect to the database server, then select which db to use [/span][span style=\"color:#0000BB\"]mysql_connect[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$dbHost[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]$dbUser[/span][span style=\"color:#007700\"], [/span][span style=\"color:#0000BB\"]$dbPass[/span][span style=\"color:#007700\"]) or die([/span][span style=\"color:#DD0000\"]\"Could not connect to database server.<p>\" [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]mysql_error[/span][span style=\"color:#007700\"]()); [/span][span style=\"color:#0000BB\"]mysql_select_db[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$dbDatabase[/span][span style=\"color:#007700\"]) or die([/span][span style=\"color:#DD0000\"]\"Could not connect to database. <p>\" [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]mysql_error[/span][span style=\"color:#007700\"]()); [/span][span style=\"color:#FF8000\"]//if updating content [/span][span style=\"color:#007700\"]if(isset([/span][span style=\"color:#0000BB\"]$_POST[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'update\'[/span][span style=\"color:#007700\"]])) { [/span][span style=\"color:#FF8000\"]//assign variables [/span][span style=\"color:#0000BB\"]$content [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]$_POST[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'content\'[/span][span style=\"color:#007700\"]]; [/span][span style=\"color:#0000BB\"]$pageTitle [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]$_POST[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'pageTitle\'[/span][span style=\"color:#007700\"]]; [/span][span style=\"color:#FF8000\"]//run mysql query to update the content [/span][span style=\"color:#0000BB\"]$result [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_query[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\"UPDATE $dbTable SET content = \'$content\' WHERE pageTitle = \'$pageTitle\'\"[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#FF8000\"]//if results are successful [/span][span style=\"color:#007700\"]if([/span][span style=\"color:#0000BB\"]$result[/span][span style=\"color:#007700\"]) { echo([/span][span style=\"color:#DD0000\"]\"<font color=green>Successfully Updated.</font>\"[/span][span style=\"color:#007700\"]); echo([/span][span style=\"color:#DD0000\"]\"<p><a href=\'editPage.php\'>Edit Another Page</a>\"[/span][span style=\"color:#007700\"]); } [/span][span style=\"color:#FF8000\"]//if results aren\'t successful [/span][span style=\"color:#007700\"]else { echo([/span][span style=\"color:#DD0000\"]\"<font color=red>Updated Failed.</font>\"[/span][span style=\"color:#007700\"]); } } [/span][span style=\"color:#FF8000\"]//if not updating [/span][span style=\"color:#007700\"]else { [/span][span style=\"color:#FF8000\"]//if editing content [/span][span style=\"color:#007700\"]if (isset([/span][span style=\"color:#0000BB\"]$_POST[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'edit\'[/span][span style=\"color:#007700\"]])) { [/span][span style=\"color:#FF8000\"]//assign variables [/span][span style=\"color:#0000BB\"]$pageName [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]$_POST[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'pageTitle\'[/span][span style=\"color:#007700\"]]; [/span][span style=\"color:#FF8000\"]//declare query, run query, and get results to display [/span][span style=\"color:#0000BB\"]$query [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#DD0000\"]\"SELECT * FROM $dbTable WHERE pageTitle = \'$pageName\'\"[/span][span style=\"color:#007700\"]; [/span][span style=\"color:#0000BB\"]$res [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_query[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$query[/span][span style=\"color:#007700\"]); while([/span][span style=\"color:#0000BB\"]$row [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_fetch_array[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$res[/span][span style=\"color:#007700\"])) { echo([/span][span style=\"color:#DD0000\"]\"<form action=\" [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$_SERVER[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'PHP_SELF\'[/span][span style=\"color:#007700\"]] . [/span][span style=\"color:#DD0000\"]\" method=\'post\'>\"[/span][span style=\"color:#007700\"]); echo([/span][span style=\"color:#DD0000\"]\"ID: \" [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$row[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'id\'[/span][span style=\"color:#007700\"]] . [/span][span style=\"color:#DD0000\"]\"<br>\"[/span][span style=\"color:#007700\"]); echo([/span][span style=\"color:#DD0000\"]\"Page Title: \" [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$row[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'pageTitle\'[/span][span style=\"color:#007700\"]] . [/span][span style=\"color:#DD0000\"]\"<input type=\'hidden\' name=\'pageTitle\' value=\" [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$row[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'pageTitle\'[/span][span style=\"color:#007700\"]] . [/span][span style=\"color:#DD0000\"]\"><br>\"[/span][span style=\"color:#007700\"]); echo([/span][span style=\"color:#DD0000\"]\"<textarea rows=\'15\' cols=\'50\' name=\'content\'>\" [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$row[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'content\'[/span][span style=\"color:#007700\"]] . [/span][span style=\"color:#DD0000\"]\"</textarea><br>\"[/span][span style=\"color:#007700\"]); echo([/span][span style=\"color:#DD0000\"]\"<input type=\'submit\' value=\'Update Content\' name=\'update\'>\"[/span][span style=\"color:#007700\"]); echo([/span][span style=\"color:#DD0000\"]\"</form>\"[/span][span style=\"color:#007700\"]); } } [/span][span style=\"color:#FF8000\"]//if not editing content [/span][span style=\"color:#007700\"]else { [/span][span style=\"color:#FF8000\"]//run mysql query to pull pageTitle out of db into drop down box [/span][span style=\"color:#0000BB\"]$result [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_query[/span][span style=\"color:#007700\"]([/span][span style=\"color:#DD0000\"]\"SELECT * FROM $dbTable\"[/span][span style=\"color:#007700\"]); echo([/span][span style=\"color:#DD0000\"]\"<form action=\" [/span][span style=\"color:#007700\"]. [/span][span style=\"color:#0000BB\"]$_SERVER[/span][span style=\"color:#007700\"][[/span][span style=\"color:#DD0000\"]\'PHP_SELF\'[/span][span style=\"color:#007700\"]] . [/span][span style=\"color:#DD0000\"]\" method=\'POST\'>Select a page to edit: <select name=\'pageTitle\'>\"[/span][span style=\"color:#007700\"]); [/span][span style=\"color:#FF8000\"]//populate drop down box [/span][span style=\"color:#007700\"]while ([/span][span style=\"color:#0000BB\"]$row [/span][span style=\"color:#007700\"]= [/span][span style=\"color:#0000BB\"]mysql_fetch_row[/span][span style=\"color:#007700\"]([/span][span style=\"color:#0000BB\"]$result[/span][span style=\"color:#007700\"])) { echo([/span][span style=\"color:#DD0000\"]\"<option value=\\"[/span][span style=\"color:#0000BB\"]$row[/span][span style=\"color:#007700\"][[/span][span style=\"color:#0000BB\"]1[/span][span style=\"color:#007700\"]]&[/span][span style=\"color:#FF8000\"]#092;\">$row[1]</option>\"); [/span][span style=\"color:#007700\"]} echo([/span][span style=\"color:#DD0000\"]\"</select> <input type=\'submit\' name=\'edit\' value=\'Edit Page\'></form>\"[/span][span style=\"color:#007700\"]); } } [/span][span style=\"color:#0000BB\"]mysql_close[/span][span style=\"color:#007700\"](); [/span][span style=\"color:#0000BB\"]?> [/span] [/span][!--PHP-Foot--][/div][!--PHP-EFoot--] I hope this helps Jeremy
×
×
  • 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.