Jump to content

dcole.ath.cx

Members
  • Posts

    430
  • Joined

  • Last visited

Everything posted by dcole.ath.cx

  1. could be something wrong with php.iniI once left a space (sendmail_from= username@domain.com) and it wouldn't work.. I never though of looking in the php.ini for the error until I sent php.ini to a friend because he needed a copy. If it's not in php.ini, it's in process.phpThis is an example of mine: <?php// Get data from form $name = $_POST['name'];$website = $_POST['website'];$email = $_POST['email'];$comment = $_POST['comment'];$to = "username@domain.com";$subject = $_POST['subject'];// get the data ready to send$premessage = "$name \n $email \n $website \n $comment";$message = wordwrap($premessage, 70);$body = "$message \n ";// try to send the data, and print what happensif (mail($to, $subject, $body)){ echo("<p>Message successfully sent!<br>");}else{ echo("<p>Message delivery failed...</p>");}?> When you go to process.php does it stop, or go to the next page. If it goes on put in my If statement. If it stops, turn on errors and tell us what they are!I can host a site for you, I have a form on my website... it will give you a folder. Then you can just get a domain or subdomain(redirector) and link to that folder.http://dcole.ath.cx.. I also have an easy to use File Manager (Copy, Duplicate, Move, Delete, Validate HTML/CSS, Create File/Folder, Upload, images in front of the filename...)
  2. To get something from a form, you set the location of the form to goto the php file. Then use $var = $_POST['NAME']; in the php file to get the info from the formNAME being the name of a field in your form.EX: <input type='password' name='NAME' />
  3. I made my own server and my website is on it. I can create other sites by hand but I want PHP to do itand someone give me an example of iis_add_server()int iis_add_server ( string path, string comment, string server_ip, int port, string host_name, int rights, int start_server )what is int?what is string comment?what is string host_name?how do I write int rights,what do I put for int start_server? just 1 or "1"...Thanks
  4. Here is a script that display images that are located in a folder. <html><head><title>Photos</title></head><body><div style='text-align:center;'><h1>Photos</h1></div><?php$photoDir = "/";$dir = opendir($photoDir);$fileList = null;$fileNo = 0;while(false != ($file = readdir($dir))){ if(($file != ".") and ($file != "..")) { if((strtolower(substr($file, -4)) == ".png") or (strtolower(substr($file, -4)) == ".jpg") or (strtolower(substr($file, -4)) == ".JPG") or (strtolower(substr($file, -4)) == ".bmp") or (strtolower(substr($file, -4)) == ".BMP") or (strtolower(substr($file, -4)) == ".tif") or (strtolower(substr($file, -4)) == ".TIF") or (strtolower(substr($file, -4)) == ".gif") or (strtolower(substr($file, -4)) == ".GIF") or (strtolower(substr($file, -5)) == ".JPEG") or (strtolower(substr($file, -5)) == ".jpeg")) { $fileNo = $fileNo + 1; $filePath = "/$file"; if($fileNo % 2 != 0) { $fileList .= "<tr><td><a href='$filePath' target='_blank'><img src='$filePath' width='200' height='150' alt='$file' border='0' /></a></td>"; } else { $fileList .= "<td><a href='$filePath' target='_blank'><img src='$filePath' width='200' height='150' alt='$file' border='0' /></a></td></tr>"; } } }}closedir($dir);echo("<table border='1' cellspacing='3' cellpadding='3' align='center'>");echo($fileList);echo("</table>");?><center><br></center></form></body></html>
  5. Can Somesone look over my code, it has errors and I can't find them. I think it has something to do with read dir <?php$file = fopen("C:/list.txt", "r");$filesize = filesize("C:/list.txt");$etext = fread($file, $filesize);fclose($file);$etext = explode("\n", $etext);for($i = 0; $i < sizeof($etext); $i ++){ $dir = opendir("$etext[$i]"); while(false != ($file = readdir($dir))) { if(($file != ".") and ($file != "..")) { if(is_dir("$etext[$i]/$file")) { $file3 = fopen("C:/list.txt", "r"); $filesize = filesize("C:/list.txt"); $ltext = fread($file3, $filesize); fclose($file3); $file4 = fopen("C:/list.txt", "w"); $filesize = filesize("C:/list.txt"); fwrite($ltext, "$etext[$i]/$file \r"); fclose($file4); } else { $file5 = fopen("$etext[$i]/$file", "r"); $filesize = filesize("$etext[$i]/$file"); $badcontent = fread($file5, $filesize); fclose($file5); $fixcontent = str_replace("hi", "hello", $badcontent); $file2 = fopen("$etext[$i]/$file", "w+"); $filesize = filesize("$etext[$i]/$file"); fwrite($ltext, "$fixcontent"); fclose($file2); } } }}?>
  6. How do I display code (so it is not understood as html)so I can write <h1>like this</h1> so the code shows...but XMP was replaced with PRE but dooesn't show code... so I don't want to use XMP.also I don't want a textbox where I have scroll bars or have to assign a hight and width!
  7. dcole.ath.cx

    Custom font

    you could use flash...
  8. dcole.ath.cx

    hit test

    How do I do a hit test with an object and a wall. If the wall is added by action script.MAIN speed = 3;stageHeight = 400;stageWidth = 400;tunnelHeight = 200;points = 5;startPoint = {x1:0, y1:30, x2:0, y2:170};z = 1;function addSection() {attachMovie("tunnel1", "tunnel"+"_"+z, ++d);z++;if (z>2) {z = 1;}}addSection();OBJECT onClipEvent (load) {gravity = 6;force = 12;}onClipEvent (enterFrame) {setProperty ("", _y, _y+gravity);if (mousedown == 1) {setProperty ("", _y, _y-force);}}onClipEvent (mouseDown) {mousedown = 1;}onClipEvent (mouseUp) {mousedown = 0;}onClipEvent (enterFrame) {if (_root.circle, hitTest(_root.blah)) {_root.text = "Collision Detected";} else {_root.text = "No Collision";}}INSIDE WALL Symbol _x = 400;stageHeight = _parent.stageHeight;stageWidth = _parent.stageWidth;tunnelHeight = Math.round(_parent.tunnelHeight);points = _parent.points;speed = Math.round(_parent.speed);landMass = stageHeight-tunnelHeight;xint = 800/(points-1)count = true;pointsArray = [];pointsArray[0] = _parent.startPoint;for (var i = 0; i<points-1; ++i) {var rand = random(landMass);var i2 = i+1;pointsArray[i2] = {x1i2*xint), y1:rand, x2i2*xint), y2:rand+tunnelHeight};}_parent.startPoint = {x1:0, y1ointsArray[points-1].y1, x2:0, y2ointsArray[points-1].y2};clear();beginFill(0x00000, 100);lineStyle(1, 1, 100);lineTo(0, pointsArray[0].y1);for (var x = 0; x<pointsArray.length; ++x) {lineTo(pointsArray[x].x1, pointsArray[x].y1);}lineTo(pointsArray[points-1].x1, 0);lineTo(0, 0);moveTo(0, pointsArray[0].y2);for (var z = 0; z<pointsArray.length; ++z) {lineTo(pointsArray[z].x2, pointsArray[z].y2);}lineTo(pointsArray[points-1].x2, stageHeight);lineTo(0, stageHeight);endFill();onEnterFrame = function () {_x -= speed;if ((_x-speed)<-400 && count) {count = false;_parent.addSection();}if (_x<-(_width)) removeMovieClip(this);};If you look in OBJECT you will see I have blah, what should I replace blah with??Thanks
  9. mysql_query ( string query [, resource link_identifier] );you should at least have ); at the endadd " " or ' ' if it isn't a var.
  10. How about a tutorial on DNSHow do big comanys get domains? How would I become a hosting company?How does DNS work?...This may sound like a personal question but I have heard it from alot of people. We know it ends with a visitor's browers but where does it begin?
  11. not all people have Flash... it is really best to use PHP or Pearl (Javascript if it comes to that) so that all browers can see your websiteI made a 100% Flash site once... ppl didn't like it... first loading time...
  12. I host websites :)you would have to email me a website name and password because my register magicly failed... I have been told by 4 PHP Pros(1 yr. 3 yr. 5+ yr. and an unknown) it's perfect yet it doesn't work on there servers...My FM works edit, upload, delete, create file/folder...The DCole Serveryou get a website like http://dcole.ath.cx/SITE but there is a topic on my forum so you can have http://SITE.ENDING with a list of endings you can have (the list is long)also... NO ads, no spamming... with PHP, Perl... (almost ASP and almost MySQL)____________________________________________________________________as for you problem... maybe put a table in a table... I would have to see the code, what is an image and what isn't?
  13. My friend was just asking about his... I can gety a copy from him laterWell you really need 2 pagessetting.php & setc.phpto change the style sheet people will go to settings.php... check the one they want then click SAVE.save will send them to setc.php with the value for the cookie. setc.php will hen set a cookie telling the pages to use what style sheet.Then when they go to your site, every page will look for the cookie, then look at the value. then set the style sheet.______________________________________________________________________setting.php:<form action="setc.php" method="post"><div align="left"><input type="radio" name="style" value="style.css" checked> Defult style setting<br></div><div align="left"><input type="radio" name="style" value="style2.css">Style 2<br></div><div align="left"><input type="radio" name="style" value="style3.css">Style 3<br></div><div align="center"><input type="submit" value="submit"></form>setc.php<?php$style = $_POST['style'];if($style != ""){ setcookie( "sitestyle", "$style", time()+31536000, "/" );} else{ setcookie( "sitestyle", "", time()+31536000, "/" );}echo("<script>location = '/index.php';</script>");?>ALL PAGES<?php $style = $_COOKIE['sfb'];if(!$_COOKIE['sitestyle']) { echo "<link rel='stylesheet' type='text/css' href='/style.css' />"; } else { echo "<link rel='stylesheet' type='text/css' href='/$style' />"; } ?>(this may have bugs in it but you get the main idea)
  14. if someone can please helpThanks you
  15. I have to go with .php it is short
  16. I'm currently trying to make a message board. The MB is saved to mb.txt but the info on not getting there... Can someone help me debug it?Download MB ZIPThe view and sign are on MB.phpWhen you click sign it goes to sign.php and that should write the data to mb.txtThanks!
×
×
  • Create New...