Jump to content

onepixel

Members
  • Posts

    18
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.saheltech.com

Profile Information

  • Gender
    Not Telling

onepixel's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Mysql is definitly the way to go if you have a small busness. It's free, found in almost all web servers and easy to use.
  2. Use $_POST global array instead with square barckets [ ] instead of parenthesis i.e $_POST['email']
  3. $query="Select ID, Username, Count(*) as Posts From Tablename Group By ID";
  4. $query2 = "select $accommID from booking group by $accommID having sum(case when ((booking_start_date < $book_start && booking_end_date < $book_end) || (booking_start_date > $book_start && booking_end_date > $book_end) then $flag = 1 else $flag = 0"; Parenthesis mismatch!! I notice that there is missing closing parenthesis for the one opening after "sum" and also the one opening after "when" Make sure the $query is well formatted first, test the script then if there still some problem, look at the logic behind the query.
  5. If I understand your question there are 2 types of memberships: level1 and level2 if the member is of level1 then after correct login s/he is redirected to [a href=\"http://booking_members_page.php/\" target=\"_blank\"]http://booking_members_page.php/[/a] and if s/he is from level 2 then the redirect will to to a different URL? If that is the case, you need to add a colum in your database that will allow to store the membership level for each member (level1 and level 1). During the login your query will have to retrieve both the membership level info and with: if($row['membership']=='level1'){ header("Location: [a href=\"http://booking_members_page1.php/");\" target=\"_blank\"]http://booking_members_page1.php/");[/a] } else if($row['membership']=='level2'){ header("Location: [a href=\"http://booking_members_page1.php/");\" target=\"_blank\"]http://booking_members_page1.php/");[/a] }
  6. [!--quoteo(post=371467:date=May 5 2006, 03:08 AM:name=pugs1501)--][div class=\'quotetop\']QUOTE(pugs1501 @ May 5 2006, 03:08 AM) [snapback]371467[/snapback][/div][div class=\'quotemain\'][!--quotec--] I was wondering if any one could help me figure out how to setup and seck to see if a start and end date which would be stored in the mysql database have been met or not. If the start date has been met and the end date has not i want it to display the data in the table if the start date has not been met or the end date has been met then the data should disapear off the screen then. [/quote] If I understand your question the data will be displayed only if the $current_date is between your $start_date and $end_date? The date in mysql database will have the format Year-Month-Day First: $current_date=date("Y-m-d"); Let's assume the columns for the start date and end date in your database table are: start_date and end_date. Your query will be something like: $query="Select field1, field2,... from Tablename where startdate<='".$currentdate."' and enddate>='".$current_date."'"; You can then extract the results as you will.
  7. You can use the FIRST CODE to display clickable categories by replacing the line: echo"<td>".$row1["category"]."</td>";$i++; by echo"<td>". "<a href=details.php?id=" . $a_result1["category"] . ">" . $a_row1["category"] . "</a>". "</td>"; $i++;
  8. Your first "if" condition if not specified;
  9. I suggest you use this line of Javascript code: document.inpage.open( SEARCH_DATA[selectedIndex][1] , SEARCH_DATA[selectedIndex][0] );
  10. onepixel

    Referencement,,

    [!--quoteo(post=369927:date=Apr 29 2006, 01:28 PM:name=GBS)--][div class=\'quotetop\']QUOTE(GBS @ Apr 29 2006, 01:28 PM) [snapback]369927[/snapback][/div][div class=\'quotemain\'][!--quotec--] Thanks for the infos,,... it's more clear to me now,, So,, the most difficult thing seems to have the site linked on some high PR site,... maybe some links/tips about,...? l8tr,, [/quote] Once your site is online, you need to start your link building campaign. 1-Submit your site to directories 2-You can also write articles related to the theme of your site and submit then to e-zines. That the best way to not only build links but also bring traffic to your site. 3-You can also use link exchange programs such as: linkmarket.net linkmetro.com linkexchanged.com link2me.com 4- Start a blog to add fresh content to your site very often. That will attract SE to come back and get your site indexed. 5- Create a sitemap (Google Site Map) and submit it to Google Tip: make sure your keywords appear in your web page title. (Tres tres important!!)
  11. [!--quoteo(post=369245:date=Apr 27 2006, 09:40 AM:name=phpORcaffine)--][div class=\'quotetop\']QUOTE(phpORcaffine @ Apr 27 2006, 09:40 AM) [snapback]369245[/snapback][/div][div class=\'quotemain\'][!--quotec--] What's the 'proper' syntax for multiple WHERE conditions? 1.) SELECT * FROM table WHERE col_1 = 'val_1' AND col_2 = 'val_2' ? 2.) SELECT * FROM table WHERE col=1 = 'val_1', col_2='val_2' ? [/quote] The first expression is the right one: SELECT * FROM table WHERE col_1 = 'val_1' AND col_2 = 'val_2' ;
  12. [!--quoteo(post=368648:date=Apr 25 2006, 05:14 PM:name=Robby)--][div class=\'quotetop\']QUOTE(Robby @ Apr 25 2006, 05:14 PM) [snapback]368648[/snapback][/div][div class=\'quotemain\'][!--quotec--] OK, So let's say I have a folder named Gallery with files (1.jpg, 2.jpg, 3.jpg, 4.jpg etc...) and I want to create a webpage where: 1). Creates a table with X row and 5 columns 2). The table's size is dependant on the files present in the folder "Gallery" 3). I want the pictures to be thumbnail size in the table 4). Each thumbnail links to original picture (1.jpg or 2.jpg etc.) 5). if step 4 is too tough then I could have a seperate folder called " Thumbnails" with files (thumb1.jpg, thumb2.jpg etc...) linking to (1.jpg, 2.jpg etc) respectively. so If I have 32 pictures in the Gallery folder then in the webpage, I'll have 32 thumbnail sized pictures in a table with 5 columns and 7 rows and the 7th row has 2 pics and the rest of row is blank. How the bleep can I do this? I'm also new to PHP (but I know C++ to give u an idea of how much knowledge I have) and maybe PHP is too tough and perhaps there is a better way, but yeah [b]I need your help!! !![/b] THANKS!!!!!! [/quote] 1- First read the folder containing your pictures to retrieve that full-size files name. Verify sure the filename does not contain the string "thumb" before storing that file name in an array. use the stripos ( $filename, 'thumb') function to make sure the returned value is FALSE function GetPictures($dir){ $picturearray=array(); if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { if(! stripos ( $file, 'thumb') ){$picturearray[]=$file; } }//end while loop closedir($dh); } } return $picturearray; }//end function No need to have two folders for the thumbnails and the full-size pictures. Just create a filter that will allow your script to know the difference. 2- Once you have that array of full picture file name, pass it to a function that can loop through to create the table string. function CreateTableString($filearray, $folderpath){ $n=count($filearray); $Str='<table width="100%" cellpadding="5" cellspacing="0" border="0"><tr>'; foreach($filearray as $k=>$file){ if($k>0 && $k%4==0){$Str.='</tr><tr>'; } $Str.='<td align="left" valign="top"><a href="'.$folderpath.'/'.$file.'"> <img src="'.$folderpath.'/thumb'.$file.'" width="80" height="80" border="0"> </a></td>'; } $r=($n%5); if($r>0){$Str.='<td colspan="'.$r.'"></td>';} $Str='</tr></table>'; return $Str; } $Folderpath='path to the folder containing your pictures'; //basolute or relative to the current PHP script $Picturearray=GetPictures($Folderpath); $TableStr=CreateTableString($Picturearray, $Folderpath); // this is your thumbnails table string Does not matter how many pictures you have. The only restriction is the correlation between the tumbnail and the full-size picture names. I hope this will helps.
  13. Your url should be : [a href=\"http://sdrgrestg.com/view.php?id=n\" target=\"_blank\"]http://sdrgrestg.com/view.php?id=n[/a] instead otherwise the variable passed will be "=n" intead of just "n" Hope this helps
  14. How about SELECT * FROM test where (test1 = 'Y' OR test 2 = 'N') AND testname = 'MINE'
  15. onepixel

    Referencement,,

    The quickest way to get your site listed in majot search engines (SE) is have as many web sites with high Page Rank (PR) link to your site. High PR site are crwaled very often by SE and they will folow a link to your web site from any other site linking back to you. Besides indexing your site faster, it can boost your web page PR. In the meantime, optimize your web pages: make them SE friendly, add good content, update regularly and add fresh content very often. If you feed SE with "fresh food" they will come back.
×
×
  • 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.