Jump to content

Zane

Administrators
  • Posts

    4,362
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Zane

  1. ...what...? so according to you, you want 99992524 to be formatted to 9999 25 24? and use the same code to change 62500 to 6 25 00 am I correct?
  2. look at the onUnLoad function for Javascript and have it just send a logout command to your login.php script, which I'm assuming you have you're logout function on that script should destroy the session for you, if you have it written that way
  3. the [code=php:0]time()[/code] function returns [quote]the current time measured in the number of seconds since the Unix Epoch (January 1 1970 00:00:00 GMT).[/quote] so if you wanted to go 60 seconds from now you'd say [code]time() + 60;[/code] lets' say you wanted to go and hour later well, an hour is 60 minutes...and you know one minute is 60 seconds so, [code=php:0]time() + (60*60)[/code] so in your case you're going [code=php:0]time() + 60 //One minute time() + (60*60) //One Hour time() + (60*60*24) //One Day time() + (60*60*24*5) //Five Days[/code] hope that helps
  4. Zane

    onClick

    if you're going to use CSS, there's no use direct linking to the document.bgcolor property just use the onClick to set the body class respectively [code]<input type="radio" name="bgcolor" onClick="document.body.class="dark">[/code]
  5. use document.write("Your HTML"); but do it line for line, or it'll end up all on one line in your code
  6. because you're using the wrong syntax do this [code]${"tab".$i++} = $row_RS['name'];[/code]
  7. well..what's not working about it...any errors.. or is it not doing what you want it to...please explain
  8. [quote author=hackerkts link=topic=99761.msg392995#msg392995 date=1152263436] He could access that code by going to the link. Am I right ? [/quote] your right...but he's wanting the button to acces it though....dynamically
  9. [code]<form method="post" name="delete_old_news" action="?act=delete">[/code] because your form is meant to POST not to GET which is what array you're looking for
  10. [code]insert into customer values ($Category, '$Sub_Category','$Business_name',$Ph, $Fax,'$email' )[/code] if you use the word values in your query it expects a list of fields to put the "values" into. simple answer...take out the word values
  11. $filepath = "somefilename.jpgd" [code]//None Regex way $extension = substr($filepath, (strrpos($filepath,".") * -1)); echo $extension; //The Regex way if(ereg(".*(\..*)", $filepath, $extension) {   echo $extension[1]; }[/code]
  12. are you doing both actions this time you first have to give $this->username a value before you run the function Like so [code]//Username $input = new check_input; $input->username = $_POST['username']; $input->username(); //Password $input->password = $_POST['password']; $input->password();[/code]
  13. how are you naming them again........? is the name so dynamic that you can't create the same ....[!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--][i]dynaminity[/i][!--colorc--][/span][!--/colorc--]....to create the validation? I hope that made sense I'm really tired
  14. [code]$error="";        if (empty($section)){         $error = "** You forgot to enter the section for the story! **<br>";     }  else if (empty($added_by)){         $error = "** Error: You forgot to who added the story! **<br>";     }  else if (empty($headline)){         $error = "** Error: You forgot to enter a headline for the story! **<br>";     }  else if (empty($byline_name)){         $error = "** Error: You forgot to enter a byline name for the story! **<br>";     }  else if (empty($published)){         $error = "** Error: You forgot to the date you wish to publish the story! **<br>";     }  else if (empty($opening)){         $error = "** Error: You forgot to the Opening Paragraph for the Indexes! **<br>";     }  else if (empty($body_text)){         $error = "** Error: You forgot to enter any body text! **<br>";}; [/code] [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]how do I get that message to appear...................IF all the fields are not filled[/quote] don't use else if just if and make $error an associative array like so [code] $error = array();     if (empty($section))         $error['section'] = "** You forgot to enter the section for the story! **<br>";     if (empty($added_by))         $error['added_by'] = "** Error: You forgot to who added the story! **<br>";     if (empty($headline))         $error['headline'] = "** Error: You forgot to enter a headline for the story! **<br>";     if (empty($byline_name))         $error['byline_name'] = "** Error: You forgot to enter a byline name for the story! **<br>";     [/code]
  15. set the require statement outside of the class, at the top of the page then just call it like you would any other Class [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]But you can use the statement extends statement to "reuse" a class:[/quote] not a good idea you might not want one class to have the properties of another only use extends when you need to .....literally extend from it for instance if you made a Car class and you decided to make a Motorcycle class also.... then you could logically EXTEND it onto CAR, maybe
  16. [!--coloro:#999999--][span style=\"color:#999999\"][!--/coloro--]Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/chris/public_html/index.php on line 199[!--colorc--][/span][!--/colorc--] Your mysql_num_rows obviously failed which, according to your code, would skip the $dates creation So you technically have no variable $dates if mysql_num_rows() failed explaining this error [!--coloro:#C0C0C0--][span style=\"color:#C0C0C0\"][!--/coloro--]Warning: in_array(): Wrong datatype for second argument in /home/chris/public_html/index.php on line 253[!--colorc--][/span][!--/colorc--] which you posted ...... many many times in a row So the key is to fix your mysql_num_rows.... check your MySQL result resource...which is $query_archives, AKA your query and make sure that your date field in your database is of the DATE/DATETIME datatype
  17. Here's some markup that may help [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] // INSERT INTO cabinrates [!--coloro:#FF9966--][span style=\"color:#FF9966\"][!--/coloro--]$num = 0; //You don't need a counter for a FOREACH[!--colorc--][/span][!--/colorc--] foreach($cabins as $size => $cost){ $query2 = "INSERT INTO cabinrates (cabinname, cabinprice, tourid) VALUES ('$size', '$cost', '$tourid')"; $addcabins = sql($query2); [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]//I don't see the point of this next line especially if you're supressing the errors, just take it out @mysql_affected_rows($addcabins);[!--colorc--][/span][!--/colorc--] //Try echo out every SQL statement that's made just to check you're doing all of them echo $query2 . "<br />\n"; [!--coloro:#FF9966--][span style=\"color:#FF9966\"][!--/coloro--]$num = $num + 1;[!--colorc--][/span][!--/colorc--] } [/quote] another idea would be to put curly braces around you're variables when you use them in the query [!--coloro:#3333FF--][span style=\"color:#3333FF\"][!--/coloro--]$query2 = "INSERT INTO cabinrates (cabinname, cabinprice, tourid) VALUES ('{$size}', '{$cost}', '{$tourid}')";[!--colorc--][/span][!--/colorc--]
  18. Does anyone know of a good tutorial on how to set up a slash username system I'd hate to find out that it's actually done by creating folders for each user but assuming that's hopefully not the case is there a tutorial on this I would think that it involves editing the 404.shtml file to send the name of the invalid directory to your PHP file.....but if that was it........the address bar would change. Any clues?
  19. [!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']UPDATE[/span] tablename SET yourfield [color=orange]=[/color] LOWER(yourfield) [!--sql2--][/div][!--sql3--]
  20. instead of echo use exec simple as that [code]exex($skin[content]);[/code]
  21. look at the exec() function [a href=\"http://www.php.net/exec\" target=\"_blank\"]http://www.php.net/exec[/a]
  22. [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] .... .... .... how deos everyone here get ahold of there photo's[/quote] was that whole post for that one question? well, you can always ask permission from someone to use their photo's for editing you don't necessarily have to buy all pics also they're a few websites out there that offer open source images so to speak I don't know any off hand just try googling around
  23. So apparently $pingtime is only an array if the ping was successful right? so set an IF statement, or my favorite a ternary statement that does this [code]echo is_array($pingtime)?"online":"offline"; [/code] note that that would only display offline or online this is a 3rd party script it's being moved there please post in the correct forum
  24. set the name of the selection box to an array like <select name="names[]"> ... </select> and put that along with your Create button in a form set the form to POST or GET to the same page then at the top of you're page check for that POST or GET value and create an array from that E.G [code]if(isset($_POST['names']))    $names = $_POST['names']; [/code]
  25. [!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']SELECT[/span] *, substring(store,1,1) [color=green]AS[/color] first_letter, [color=blue]count[/color](*) [color=green]AS[/color] store_cnt [color=green]FROM[/color] [color=orange]stores[/color] GROUP BY first_letter [color=green]ORDER BY[/color] store; [!--sql2--][/div][!--sql3--] I'm not positive but I think if you put [b]SELECT [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]*[!--colorc--][/span][!--/colorc--][/b] it just selects all the fields and ignores everything until the word FROM so try putting in all the fields you want along with the other to dynamic ones or at least trying doing just this and see what happens [!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']SELECT[/span] substring(store,1,1) [color=green]AS[/color] first_letter, [color=blue]count[/color](*) [color=green]AS[/color] store_cnt, name [color=green]FROM[/color] [color=orange]stores[/color] GROUP BY first_letter [color=green]ORDER BY[/color] store; [!--sql2--][/div][!--sql3--]
×
×
  • 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.