cmgmyr
Members-
Posts
1,278 -
Joined
-
Last visited
Never
Everything posted by cmgmyr
-
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
-
Take a look at this: http://www.phpfreaks.com/forums/index.php/topic,133807.msg563372.html
-
[SOLVED] Display PHP Code in HTML with Limitations
cmgmyr replied to phpQuestioner's topic in PHP Coding Help
you can combine html and php, but the page has to have a .php extension -
you have to "save as webpage" then you can play around with the html
-
[SOLVED] Populating a MySQL database from an excel file
cmgmyr replied to mgs019's topic in MySQL Help
no problem, enjoy -
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
-
i see a picture
-
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.
-
[SOLVED] Populating a MySQL database from an excel file
cmgmyr replied to mgs019's topic in MySQL Help
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 -
How can we call a function from within a C++ library in PHP
cmgmyr replied to krups's topic in PHP Coding Help
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 -
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)
-
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
-
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
-
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
-
Yeah I checked that out today too...looks pretty cool
-
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
-
[SOLVED] count items in each category and subcategory
cmgmyr replied to spidermonster's topic in PHP Coding Help
yes, that is correct -
Just do what I did with mysql_real_escape_string
-
[SOLVED] MySQL returning multiple rows on single row query
cmgmyr replied to WRXHokie's topic in MySQL Help
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 -
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);
-
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']);
-
They Cant Support Scripts ? ! ? My god i need help !
cmgmyr replied to Accurax's topic in PHP Coding Help
sounds like you need to find a new host come on they don't even know what PHP is? haha -
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