Jump to content

Tasos

Members
  • Posts

    57
  • Joined

  • Last visited

Tasos's Achievements

Member

Member (2/5)

0

Reputation

  1. <?php echo '<a href="example.com/get_info.php?url='. $row['url'] . '&name='. $row['name'] .'&info='. $row['info'] .'&privat='. $row['privat'] .'" target="_blank">Edit</a> ';?>
  2. Thanks for your reply CroNiX, i made an another test in example.php so i forgot to change it to index.php. And i cant solve the problem i am for 3 hours bussy with this. Thanks again.
  3. Hello, i would like to know to how to make this script work. I get information using this link below in index.php, after i get the information i want to insert/update in database information which i don't show on the page self. index.php <?php echo '<a href="example.com?url='. $row['url'] . '&name='. $row['name'] .'&info='. $row['info'] .'&privat='. $row['privat'] .'" target="_blank">Edit</a> ';?> So like this here below i show the information. get_info.php <?php echo $_GET['name']; ?> Which works fine. So now updating the database. $ip_address = $_SERVER['REMOTE_ADDR']; // Ip address works fine $name = $_GET['name']; // not working $r_name = $_POST['$name']; // not working $r_name= 'test'; // this is working. mysql_query("insert into r_test (r_name,r_ip) values('$r_name','$ip_address')") or die(mysql_error()); So how can i get the value and insert in database, only row r_ip is updated with the ip address. I hope i explained it well Thanks in advance.
  4. Thanks for you answer, Could you give me an example, or point me to the right direction on how to do this ? I add each month more than 10 new page so it would be easy if i can use a SQL switch statement so i could copy and paste the script an let it run automatic. Thanks in advance.
  5. Hello, I don't know if this is possible. I want to make a switch between pages, lets say i have more than 100 pages and each page have a unique name.php. So what i want to do is when page equal to random-page.php SELECT * FROM `jobs` WHERE title LIKE '%news%' And for example how it should be, but i don't know what is exactly wrong here and how to fix it. $sql_q; $path=$_SERVER['PHP_SELF']; $page=basename($path); switch("$page") { case 'index.php': $sql_q = 'SELECT * FROM `jobs` WHERE `title` LIKE '%news%' LIMIT $p_num, $per_page'; break; case 'jobs.php': $sql_q = 'SELECT * FROM `jobs` WHERE `title` LIKE '%jobs%' LIMIT $p_num, $per_page'; break; case 'region.php': $sql_q = 'SELECT * FROM `jobs` WHERE `title` LIKE '%region%' LIMIT $p_num, $per_page'; break; } And here: $getquery = mysql_query("$sql_q"); Is that possible somehow ? Thanks.
  6. What i try to make i a video sharing website but simple, i was watching at a website a long time ago and i forgot wich one that is with videos also, They had at the top bottom a list like # A B C D and so on. and that is what i also want at the top bottom with all the categories i want to show. And actualy i dont know how to do that simple fast and smart, i founded a long time ago a script that allow me to echo all the tags from database but that was not nice and how i want to show it, that script shows it like this here below Ad asfs Adventure acro acrob acrobatic aer aerob aerobics and so on, so what i whas thinking is how to make it good looking with complete words and to show what i want exactly in the categories list. i hope I'm understanding Thanks in Advance.
  7. Hello there, This is the script i use right know, and i want it to become easier because i have so much categories that i want to show and it will take days to write all those categories. <?php include 'extern/connect-.php'; //***************************************************************************** // categEGORY A //***************************************************************************** $result = mysql_query("select (select count(1) FROM videos WHERE title LIKE '%Accident%') as Accident , (select count(1) FROM videos WHERE title LIKE '%Acrobatic%') as Acrobatic, (select count(1) FROM videos WHERE title LIKE '%Adorable%') as Adorable , (select count(1) FROM videos WHERE title LIKE '%Adventure%') as Adventure, "); $row = mysql_fetch_assoc($result); foreach($row as $title => $total) { echo ' <div id="categ"> <div class="a"> <a href="search.php?search='. $title . '&submit= ">'. $title.' '. $total .'</a></div></div>'; } ?> So what i was thinking is if it is possible to make .txt file and to select from it like this here below, or if something else could help make the categories faster to write and get the best performance to load the webpage... some_file.txt Accident Acrobatic Adorable Adventure <?php include 'extern/connect-.php'; $something ='some_file.txt'; //***************************************************************************** // categEGORY A //***************************************************************************** $result = mysql_query("select (select count(1) FROM videos WHERE $something ......? , echo 'categories'; ?> Any help is Appreciated Thanks in Advance
  8. Hello, I want to know how they keep the same url when page is changing, if you dont know what i mean try the link and check the browser when you wat happens when you click in a other link in the website. ( Website Link ( Normal Content ) ) http://geedmo.com/?item=LushSlider Thanks in advance.
  9. Hello, i have a question about how to change from database a row wich contains the duration of videos. I have videos with time in table row duration like this here below: Table: Duration 5:00 300 this should be like this > 3:00 < min 10:00 2000 this should be like this > 20:00 < 20 min 10000 this should be like this > 1:00:00 < 1 hour and so on. But when i echo out it show me like in the table row exactly. here is an exmple of my scrip: <?php $thumbs = $runrows ['thumbs']; $title = $runrows ['title']; $url = $runrows ['url']; $duration = $runrows ['duration']; while($runrows = mysql_fetch_assoc($getquery)) { echo '<li class="thumbcontent"><a href="'. $runrows['url'] .'" ><img src="'. $runrows['thumbs'].'" class="thumb" name="'. $runrows['title'] .'" alt="'. $runrows['title'] .'" title="'. $runrows['title'] .'" width="240" height="180" /> </a> <span class="duration">'. $runrows['duration'].'</span></li> '; } echo "<center>"; ?> And this is what a friend send me to check out but i cant figure out how to fit this code with my own code. <?php foreach (array(500, 234, 1100, 520, 1300, 10000) as $number) { echo $number, "\t"; $number = str_pad($number, 6, 0, STR_PAD_LEFT); echo ltrim($number{0}.$number{1}.':'.$number{2}.$number{3}.':'.$number{4}.$number{5}, ":0"), "\n"; } or this: foreach (['500', '234', '1100', '520', '1300', '10000'] as $number) { $time = strrev($number); $time = wordwrap($time, 2, ':', true); $time = strrev($time); echo "$number was transformed to $time\n"; } I hope i explained it well, i hope somebody can help me with a solution. Thanks in advance.
  10. Hello, i need some help to change something from database if possible. Lets say this is my the table row that i want to change. | Duration | 10000 < this is 1 hour 1:00:00 < and i want to change it to this automatic and ad this ( : ) 2000 20:00 300 3:00 is that posible ? if yes can somebody explain what i need and how i can change it direcly. Or is that possible directly from database ? Thanks in advance.
  11. Hello, i need to change the display url in the browser with httaccess This is the link in the browser: fun.php?search=&submit=search&page=1 And i want to change in to this fun/page/1 This is what i try to do, I created a .httacces file in public html with this text in it. RewriteEngine On # Rewrite all php files RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php [L] # Rewrite blog pagination RewriteRule ^fun/page/([a-zA-Z_-]+)/([0-9]?) fun.php?search=&submit=search&page=$1 [L,QSA] But it doenst work. Thanks in advance for any help.
  12. Thank you that was easy
  13. Hello i have a question, i dont know if that is possible. I want to call a external page and echo like this below. index.php <?php include 'extern/connect.php'; $title = file_get_contents('extern/title.php'); ?> <head> <title><?php echo $title; ?></title> //here i want to echo also $a from title.php </head> Title.php <?php $a ="Youtube"; $b ="Facebook"; $c ="Myspace"; $d ="Google"; ?> Is that possible ? Thanks for any help
  14. If i i change this mail("example@gmail.com",$subject,$message,"From: $from\n"); in to this mail("example@gmail.com",$subject,$message,$naam,"From: $from\n"); I dont receive any mail. So what is wrong than ?
×
×
  • 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.