Jump to content

cmgmyr

Members
  • Posts

    1,278
  • Joined

  • Last visited

    Never

Everything posted by cmgmyr

  1. yeah, I saw this the other day too...I got a good laugh out of it. I think last year they did google romance or something like that which was pretty funny
  2. Take a look at this: http://www.phpfreaks.com/forums/index.php/topic,133807.msg563372.html
  3. you can combine html and php, but the page has to have a .php extension
  4. you have to "save as webpage" then you can play around with the html
  5. mysql_connect("localhost", "username", "password") or die("Could not connect to mysql"); mysql_select_db("database") or die("Could not connect to database"); this allows you to connect to a database. You get your username and password when you set your mysql and database up. hope this helps you out
  6. check out: http://ajaxpatterns.org/Drag-And-Drop http://www.cyberdummy.co.uk/test/dd.php http://blogs.ittoolbox.com/eai/software/archives/how-to-add-ajax-draganddrop-functionality-to-your-web-sites-9175 hope that gets you goin.
  7. I have a few clients that would like to easily import new data into their database...They download the current products in excel, make price changes, then upload the same excel file in the same format. Here is what I use: <?php // mysql connection script ... // tab delimited file $file = "All_Catalog_Manufacturers.xls"; // open file $handle = fopen($file, "r"); $x = 0; echo "<table border=1>"; // loop through results with fgetcsv() function while(($data = fgetcsv($handle, 1000, "\t")) !== FALSE) { // populate field vars just to make it easier to work with .. // you could access the $data[] array directly in the sql if you want $field1 = $data[0]; $field2 = $data[1]; $field3 = $data[2]; $field4 = $data[2]; // etc ... // build your sql statement $sql = "insert into table set testid='1', category='foo', field1='".$field1."', field2='".$field2."', field3='".$field3."'"; //if($x >0) $result = mysql_query($sql); if($x >0) echo "<tr><td>$field1</td><td>$field2</td><td>$field3</td></tr>"; $x++; } echo "</table>"; // close file fclose($handle); ?> ***I just have that outputting to a table, but you can just comment out the echo to the table and un-comment the mysql query. hope this helps
  8. If you are using php on a linux machine you can use the system function. http://uk2.php.net/manual/en/function.system.php Or if you are using Windows machines, you can use shell_exec function. http://uk2.php.net/shell_exec example: $Info = explode("\n", shell_exec(".\\progs\\program.exe")); Will dump the output of program.exe in folder /progs/ to $Info using next line carriage as the exploder/seperator. *From: http://www.daniweb.com/techtalkforums/thread15662.html
  9. the best thing to do is set up a static IP for the computer that you are running it on, then find out what port apache is running on. now you can go to any other computer on the intranet and type in your ip and port in a browser and it should come up: (http://192.168.0.21:80)
  10. no it's pretty easy (atleast to do the table version) once you get into CSS its a little tricky with some things but once you work with it more it becomes second nature
  11. take a look at these: http://gr0w.com/articles/code/css_stylesheet_switcher_using_php_javascript_free/ http://www.dotphp.co.uk/articles/stylesheet_switcher_php.php hope that gets you going
  12. take a look at this: http://www.eyesondesign.net/pshop/slicing/images.htm you pretty much have to slice up your images and "save for web" with html and images selected. this will output a table with all of your sliced images in it. If you want to add another step look into CSS layouts and convert the tables into CSS
  13. Yeah I checked that out today too...looks pretty cool
  14. You might want to try one more thing... - plug a computer directly into the modem and make sure you can get to the internet. - View the network details settings (IP address, Default Gateway, etc...) and take a note of DNS 1, 2, and maybe 3. - Reconnect the router and the 2 PCs to the router. - See if they are picking up the DNS IPs. If they arent you are going to have to manually configure them to what you wrote down from above
  15. Just do what I did with mysql_real_escape_string
  16. try doing: $query = "SELECT * FROM $db.person WHERE id = $personid"; $result = mysql_query($query); $count = mysql_num_rows($result); echo $count; see what that does
  17. it cuts down on SQL injection attaks to your DB. You should also use MD5 encryption for your passwords in your database. $md5_pass = md5($password);
  18. You should probably also do something like this too: $safe_username = mysql_real_escape_string($_POST['username']); $safe_password = mysql_real_escape_string($_POST['password']);
  19. sounds like you need to find a new host come on they don't even know what PHP is? haha
  20. well i started off with C++ which is a very good base to start on for programming. But C++, java, PHP are very similar. So you can pretty much take your pick. @nocturnal261 - yes I agree with you there, math is important and if you are good at it great! but i'm terrible at it haha
×
×
  • 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.