Jump to content

Spikerok

Members
  • Posts

    22
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male
  • Location
    Gold's gym

Spikerok's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. If problem with $username then use next code $username = htmlspecialchars($_POST['username']); mysql_connect("$server", "$db_user", "$db_pass") or die(mysql_error()); mysql_select_db("singlese_messages") or die(mysql_error()); mysql_query("CREATE TABLE " . $username . " ( `id` INT( 50 ) NOT NULL AUTO_INCREMENT PRIMARY KEY , `username` VARCHAR( 75 ) NOT NULL , `subject` VARCHAR( 150 ) NOT NULL , `message` TEXT NOT NULL , `gift` VARCHAR( 50 ) NOT NULL, `new` VARCHAR( 5 ) NOT NULL , `date_created` VARCHAR( 50 ) NOT NULL , `date_modified` VARCHAR( 50 ) NOT NULL )") or die(mysql_error()); mysql_close(); btw why do you need to create table for every new user?
  2. talking to you is same as talking to a brick wall.
  3. clearly to be employed by google you need to have correct education. google and other big companies do employ fresh programmers
  4. company - team work. if your team is bad, you will suck and that's happens to most people. Freelancers - most of them ( about 99% ) can't !@#$ing "correctly" program or make some thing "real" of their own. If some one saying to have seriously worked for over 1-2 years ( maybe more ) then they should be able to produce some thing like google maps in no time.
  5. talking about different coding styles.. oh yh, there are several coding styles most common are Hindu and Chinese styles ^^
  6. <?php class myclass { public function __construct() { if(isset($_POST['submit'])) { myclass::check($_POST['link']); } myclass::form(); } private function check($link) { $link = explode(".", $link); switch($link[1]) { case 'jpg': print 'good'; break; case 'gif': print 'good'; break; case 'png': print 'good'; break; default: print 'incorrect format'; } } private function form() { print "<form action=\"\" method=\"post\">"; print "Image: <input name=\"link\" type=\"text\">"; print "<input type=\"submit\" name=\"submit\" value=\"submit\">"; print "</form>"; } } new myclass(); ?>
  7. You can try using ob_start() and in some mail boxes html is disabled by default. So in some thing like SquirrelMail html might be disabled when in hotmail it will be enabled.
  8. if you want to just go through all scripts, you can include all files in order you want and run cron job on that script
  9. If timing is important: we can try storing task number and time. So, we done task 1, set task = 2 and time when task 1 was done, so set time = 13:10. Then when time is 13:15, check if 13:15 - 13:15 = 00:05, then if difference between them is 00:05 or more do next task which is 2, and increase task by 1, and set new time once it gets to task 4, change task to 1. If time not important: if you have cron job every five minutes we just store task number. here is example of procedure: task = 1.. do task 1 task = task + 1 then next time cron runs file, task = 2.. do task 2 task = task + 1 for storage we can use database or file.
  10. check my other code above, it should work. here is example on what your script should do <?php class myclass { public function __construct() { if(isset($_POST['submit'])) { myclass::result($_POST['editor']); } myclass::show(); } private function show() { print "Which text editor do you use?<br /> \n"; print "<form method=\"post\" action=\"\"> \n"; print "<input type=\"checkbox\" name=\"editor[]\" value=\"Notepad\" /> \n"; print "Notepad<br /> \n"; print "<input type=\"checkbox\" name=\"editor[]\" value=\"Scite\" /> \n"; print "Scite<br /> \n"; print "<input type=\"checkbox\" name=\"editor[]\" value=\"Crimson Editor\" /> \n"; print "Crimson Editor<br /> \n"; print "<input type=\"checkbox\" name=\"editor[]\" value=\"Dreamweaver\" /> \n"; print "Dreamweaver<br /> \n"; print "<input type=\"checkbox\" name=\"editor[]\" value=\"vim\" /> \n"; print " vim<br /> \n"; print "<input type=\"submit\" name=\"submit\" id=\"submit\" value=\"submit\" /> \n"; print "</form>\n"; } private function result($editor) { $max = count($editor); for($i = 0; $i < $max; $i++) { print $editor[$i]; print "<br>\n"; } } } new myclass(); ?> I get $_POST['editor'] and then counting them and then using loop output all variables that array editor contains
  11. well you seem to use post method in script, try print_r($_POST['delete']);
  12. because array is created before starting class and class contains variable which is used in array, array thinks that the sql string with variable ( which are undefined ) in it is just a string. Well every thing that contained in array is a string, so i have changed array slightly. $array = array('rowcount' => array( 0 => 'SELECT domain_id FROM tbl_domain WHERE domain_id =|txtDomain|Domain already exists'); new process($this->registry, $array); and in function. $felder = explode('|', $this->array['rowcount'][$i]); $sql = $felder[0]; $sql .= "'" . $this->feld[$felder[1]] . "'";
×
×
  • 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.