Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~16.3K People Reached
Favorite Tags
Member Avatar for PF2G

Hi, I have a list of news that i'm getting from the DataBase: do{ $content.='<div id="square_news">'; $content.='<div id="news_banner">'; $content.='<img src="'.$SelectAllNews['ImagemNoticia'].'" />'; $content.='</div>'; $content.='<div id="square_news_title">'; $content.='<div class="news_title_h2"> '; $content.='<h2>'; $content.='<a href="news.php?news='.$SelectAllNews['IdNoticia'].'">'.$SelectAllNews['TituloNoticia'].'</a>'; $content.='</h2>'; $content.='</div>'; /************SHARE FACEBOOK************/ $title=urlencode($news['TituloNoticia']); $url=urlencode('http://mywebsite.com/news.php?news='.$news['IdNoticia']); $summary=urlencode(strip_tags($news['TextoNoticia'])); $image=urlencode('http://mywebsite.com/'.$news['ImagemSmallNoticia']); ?> <a href="http://www.facebook.com/sharer/sharer.php?s=100&p%5Btitle%5D=<?php echo $title ?>&p%5Bsummary%5D=<?php echo $summary ?>.&p%5Burl%5D=<?php echo $url ?>&p%5Bimages%5D%5B0%5D=<?php …

Member Avatar for diafol
0
609
Member Avatar for PF2G

Hi, i made this pagination system in the news list, but it's repeating the first data in every pages. So when i say i want 2 nes per page it's giving me 3 instead, because of it... if(isset($_GET['page'])){ require('config.php'); $page = $_GET["page"]; //Getting Page number $pages_query = mysql_query("SELECT COUNT(IdNoticia) FROM …

Member Avatar for GliderPilot
0
152
Member Avatar for PF2G

Hi, I'm doing a page where the user is logged with facebook and when he buys something. when the process is completed it shares a default text in my facebook timeline. I can't find that API code, can someone help me? Here's what i have: <?php include('header.php'); ?> <body> <div …

Member Avatar for AARTI SHRIVAS
0
161
Member Avatar for PF2G

Hi, i want to login with facebook and go back 1 page - window.history.back() - but only when error=1 (login.php?erro=1): This is the process_facebook.php: if($UserCount[0]){ //User is now connected, log him in login_user(true,$me['first_name'].' '.$me['last_name']); echo $_GET['erro']; /*if(isset($_GET['erro'])){ echo "<script>window.history.back();</script>"; }*/ } else{ // Insert user into Database. @mysql_query("INSERT INTO users …

Member Avatar for LastMitch
0
186
Member Avatar for PF2G

Hi, I have this date picker and what i want to do is, how many days, months and years are left from the today's date until the date i chose. <?php $secondDate = '2012-08-02'; // date i picked $currentDate = date('Y-m-d'); //current date $datechose=explode ('-',$secondDate); $todaysday=explode ('-',$currentDate); $daysleft=$datechose[2]-$todaysday[2]; ?> Thank …

Member Avatar for pritaeas
0
297
Member Avatar for PF2G

Hi, how can i know (with an alert) the value i selected, from the #layout_select: <script> $(document).ready(function() { var optarray = $("#layout_select").children('option').map(function() { return { "value": this.value, "option": "<option value='" + this.value + "'>" + this.text + "</option>" } }) $("#column_select").change(function() { $("#layout_select").children('option').remove(); var addoptarr = []; for (i = …

Member Avatar for PF2G
0
334
Member Avatar for PF2G

Hi, I'm trying to substract the hours of the time with the hours of the begining of an event, and print how many time is left. Can someone help me? //Preço Viagens $partida=$viagens['HoraPartida']; $horapartida = explode(":", $partida); echo $horapartida[0]; $horasistema = date("G"); //hora sistema $difhoras=$horasistema - $horapartida;

Member Avatar for flashhtml5
0
110
Member Avatar for PF2G

Hi, i want to crop an image that i upload, then the image appears behind a div where i drag and choose what i want and crop it. Here's what i want after the upload: the black background is the background-color of the body, the image inside the red border …

Member Avatar for PF2G
0
997
Member Avatar for PF2G

Hi, i'm doing a website where the user can add his favourite bands in his profile. But not every band is in the DB, so if the band isn't in the DB it adds the name in the column. this is what i have: if(mysql_query("INSERT INTO bandas_fav(band_fav_id_user, band_fav_id_banda) VALUES('".$_GET['iduser']."', '".$bands_name['banda_id']."')")) …

Member Avatar for minitauros
0
150
Member Avatar for PF2G

Hi, i'm using facebook like box on my website but it seems it doesn't work with localhost. I hit the like button and when i refresh the page the Like was not "accepted". Is there a problem being localhost? Thank you.

Member Avatar for Szabi Zsoldos
0
48
Member Avatar for PF2G

Hi, I'm creating a mentionInput, a textarea where i can identify people writing "@NAME" (like facebook) I have a this js file where i tell the info of the names i can identify: $(function () { $('textarea.mention').mentionsInput({ onDataRequest:function (mode, query, callback) { var data = [ { id:1, name:'Kenneth Auchenberg', …

Member Avatar for LastMitch
0
383
Member Avatar for PF2G

Hello, I did this search engine just for one table: <?php $button = $_GET ['submit']; $search = $_GET ['search']; if(strlen($search)<=1) echo "Search term too short"; else{ echo "You searched for <b>$search</b> <hr size='1'></br>"; mysql_connect("localhost","root",""); mysql_select_db("rmworshipers"); $search_exploded = explode (" ", $search); $x=1; foreach($search_exploded as $search_each) { $x++; } $constructs ="SELECT …

Member Avatar for diafol
0
143
Member Avatar for PF2G

Hi, i have this bas_facebook.php to login with facebook on my website, but it gives me error with the exception: if (!function_exists('curl_init')) { throw new Exception('Facebook needs the CURL PHP extension.'); } if (!function_exists('json_decode')) { throw new Exception('Facebook needs the JSON PHP extension.'); } /** * Thrown when an API …

Member Avatar for pritaeas
0
246
Member Avatar for PF2G

Hi, I have this popup with a Login Form (and a register form comment): div id="login" style="float:right; width:15%; padding-top:3px;"> <a href="#" class="topopup">LOGIN | REGISTAR</a> <div id="toPopup"> <div class="close"></div> <div id="popup_content"> <!--your content start--> <h2>Login</h2> <form id="login"> <table cellpadding="3" cellspacing="2"> <tr> <td> Username: </td> <td> <input type="text" name="username" id="username" /> </td> …

Member Avatar for JorgeM
0
167
Member Avatar for PF2G

Hello, i have this table events: id_evento, evento_texto, evento_banner, evento_image, evento_cartaz, evento_idioma Now i can upload the image to evento_banner and evento_image, because they're the same only changes the size (the code is "inside" the <form>): <?php if(isset($_POST['Submit'])){ //Declara um Array para armazenar a mensagem de erro $error = array(); …

Member Avatar for ndeniche
0
1K
Member Avatar for PF2G

Hi, i'm trying to do clean url's using .htaccess but i'm having problems. Here i have my .htaccess: <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^([a-z]+)\/([0-9]+)\/?$ parameter_letter_and_number.php?param=$1&param2=$2 [NC] RewriteRule ^([a-z]+)\/?$ $1.php [NC] RewriteRule ^([0-9]+)\/?$ parameter_number.php?param=$1 [NC] RewriteRule ^([0-9_]+)\/?$ parameter_number_and_underscore.php?param=$1 [NC] </IfModule> Here is my parameters page so i can test: <!DOCTYPE HTML> …

Member Avatar for NardCake
0
445
Member Avatar for PF2G

Hi, i'm trying to make a textarea (WYSIWYG Text Editor) where i write a text and i can mention people from the Database. so i found this website and it is excellent for what i want to do but how do i add a link to the person i mention? …

Member Avatar for LastMitch
0
95
Member Avatar for PF2G

Hi, i'm working on a website where i have to edit products. but first i have to select a Simulator and inside that simulator i have a several products. What i want to do is, select a Simulator on a combobox and then in other combobox appears me all products …

Member Avatar for LastMitch
0
283
Member Avatar for PF2G

Hi, i'm working on a website where i in the backoffice i can choose what table the frontoffice will see. The objective is create a checkbox in the backoffice and if checked (prod_img="yes") the frontoffice sees the table with big_images (prod_img) if the checkbox is not checked (prod_img="no") the front …

Member Avatar for LastMitch
0
156
Member Avatar for PF2G

Hi, i'm creating a image gallery, using .htaccess. And this is my first time i work with .htaccess So i have this code, and it's allright but there's just one thing...the images don't appear. What i want is if: if $clean_url[2]=='all' //ALL IMAGES if $clean_url[2]!='all' //IMAGES w/ title='$clear_url[2]' I have …

Member Avatar for Squidge
0
437
Member Avatar for PF2G

Hi, I'm developing an APP for android which requires a database, i'm using mySQL, but haven't had any luck with it's connection, this is my code: connection class: public class MySQLConnect extends Activity{ public void onCreate(Bundle savedInstanceState) { } public static void connection(String[] args ) throws Exception{ Class.forName("com.mysql.jdbc.Driver"); Connection con=(Connection) …

Member Avatar for peter_budo
0
455
Member Avatar for PF2G

Hi, I'm developing a mobile app for the first time, but i'm having trouble with the export of the app so i can test it in a iPhone. I already have the certificate and the provision file, but my certificate has the extionsion .cer and i need to have it …

0
57
Member Avatar for PF2G

Hi, I have this code that selects the value of a combobox and it inserts into a input: <?php echo '<input id="matr_input" style="margin-left:15px;margin-top:10px;" name="id_cat"></input>'; $select_images="SELECT * FROM categories WHERE id_category='"./*combobox value*/."'"; $query_images=mysql_query($select_images) or die(mysql_error()); $image=mysql_fetch_assoc($query_images); ?> <?php $nome_arquivo = $image['img_category']; $arquivo = explode('images/', $nome_arquivo); if($image['img_category']!=''){ echo '<div style="margin-left:15px;">'.$arquivo[1].'<a href="delete_category.php?id='.$image['id_category'].'"><img width="10" …

Member Avatar for diafol
0
95
Member Avatar for PF2G

Hi, I'm trying to do a list of news, but i only want today's news and news from the past what i don't want is future news(tomorrow,...). So i'm doing if the date <=$curdate, but future news appear anyway, can you help me, plz? <?php $curdate = date("d/m/Y"); $row_noticias = …

Member Avatar for diafol
0
96
Member Avatar for PF2G

Hi, i'm trying to do a table with border:1px solid #000000 But i want border between rows and columns. Can someone help me, please? Here's my table if it helps or something: <table> <thead rowspan=1> <tr> <td>Nome da Banda</td> <td>Estilo</td> <td>Atividade</td> <td>Line Up Atual</td> <td>Line Up Tour</td> <td>Ex-Membros</td> <td>Linguagem</td> </tr> …

Member Avatar for JorgeM
0
703
Member Avatar for PF2G

hi all i'm wroking on a music website. and now i'm doing a sort of contact form, where people can send the name of a band, the description of the band and the image wich can be from the user's computer or from the internet (inserting th image url). Can …

Member Avatar for PF2G
0
78
Member Avatar for PF2G

Hi, i'm using a javascript so i can do a messagebox confirmation, and then it goes to a .php where is the delete sql. But is not working: <!----------------------------------------------> <script language="JavaScript"> function confirmBox(id) { if (confirm("Tem a certeza que pretende eliminar este utilizador? ")) { location.href="remover_user.php"; } else { return …

Member Avatar for jmichae3
0
174
Member Avatar for PF2G

Hi, i'm working on a website where i select some text from DB according to the language selected: Here's where i define the language (where default = 'pt'): <?php //array $lang = array('pt', 'en'); //iniciar sessao -> array session_start(); //verificar var lang no url -> pagina.php?lang=pt if(isset($_GET['lang']) && in_array($_GET['lang'], $lang)) …

Member Avatar for diafol
0
141
Member Avatar for PF2G

Hi, i'm editing results, but i want that all info of the result i select appears in the respective textbox's, waht happens to me is that everything is blank even the first combo box: admin.php <td width="5%"> <a href="edit.php?id=<?php echo $row_cont_lang['id']; ?>">Editar</a> </td> edit.php <?PHP include 'db_connect.php'; session_start(); if (isset($_GET['id'])) …

Member Avatar for diafol
0
94
Member Avatar for PF2G

Hi, i'm trying to tell my sql no to delete if the results are 1 and that it has to be at least one user. but i can't: <!------------------------------------------> <script language="JavaScript"> function confirmBox(id) { if (confirm("Tem a certeza que pretende eliminar este registo?")) { location.href="remover_user.php?id="+id; } else { return false; …

Member Avatar for pritaeas
0
157