Jump to content

Beedy555

New Members
  • Posts

    7
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Beedy555's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks, i have changed the database collation to UTF-8 General, and included the correct tag in pages, but still get the error
  2. Hi, i am using a php web crawler to extract adverts from various websites, these adverts are then displayed on my website however some anomalies are occurring. The encoding on the text is not correct, my Database is set to UTF_general_ci encoding, however my html files for my web are set to <meta http- equiv="Content-Type" content="text/html; charset=iso-8859-1" /> i have attached two files to explain what i mean in more detail. Will i need to set UTF-8 encoding to all my files, as when i do this the characters do not appear to display properly Thankyou [attachment deleted by admin]
  3. Hi, i am working on a project, specifically displaying user comments on a logon dashboard, on a webpage. the following code prints all comments which have been made on an advert, and works as i can see output displaying the array information: <? $obj = new Data(); checkPanelLogin2(); $ads = $obj->get("ad","cid",$_SESSION['user_id'],"=","","",""); unset( $ads['num'] ); $ads_ids = array(); $resp = array(); foreach($ads as $ad){ $r = $obj->get("ad_respuesta","aid",$ad['id'],"=","","",""); print_r( $r ); foreach( $r as $_r) $resp[] = $_r; } print_r( $resp ); ?> my question is how can i convert the contents of these array into well presented html output formatted correctly so the comments are displayed down the page at the moment it looks like the screenshot i have attached. [attachment deleted by admin]
  4. Hi, i am trying to add validation to a multi-step form which goes through three stages, specifically at the second stage, to ensure that the user cannot continue if the form fields are left blank. I have tried to create an array which lists all required fields, and then loops through to check if they have been filled out correctly, however this approach did not work. I am using three static forms, with an action named "ad.php" which goes through each stage. The form data i am working with looks like: <div id="block-type-right"> <? echo '<input type="text" name="nombre_emp"'; if( $_SESSION['add_ad_nombre_emp'] != "" ) echo ' value="'.$_SESSION['add_ad_nombre_emp'].'"'; echo '>'; ?> </div> there are several fields like this in the form i am using, and i need to ensure that they are filled out, before the user can progress to the third stage of the form. the "ad.php" code looks like: Header("Location: ".ROOT."insertar-anuncio/?step=2"); }elseif( $_POST['step'] == 2 ){ $_SESSION['add_ad_nombre_emp'] = addslashes($_POST['nombre_emp']); $_SESSION['add_ad_direccion'] = addslashes($_POST['direccion']); $_SESSION['add_ad_cp'] = addslashes($_POST['cp']); $_SESSION['add_ad_sid'] = $_POST['sid']; $_SESSION['add_ad_ssid'] = $_POST['ssid']; $_SESSION['add_ad_pid'] = $_POST['pid']; $_SESSION['add_ad_eid'] = $_POST['eid']; $_SESSION['add_ad_empleados_id'] = $_POST['empleados_id']; $_SESSION['add_ad_ebdita_id'] = $_POST['ebdita_id']; $_SESSION['add_ad_volumen_id'] = $_POST['volumen_id']; $_SESSION['add_ad_precio_id'] = $_POST['precio_id']; $_SESSION['add_ad_other_eid'] = addslashes($_POST['other_eid']); $_SESSION['add_ad_other_precio'] = addslashes($_POST['other_precio']); $_SESSION['add_ad_other_ebdita'] = addslashes($_POST['other_ebdita']); $_SESSION['add_ad_other_empleados'] = addslashes($_POST['other_empleados']); $_SESSION['add_ad_other_volumen'] = addslashes($_POST['other_volumen']); $_SESSION['add_ad_poblacion'] = addslashes($_POST['poblacion']); $_SESSION['add_ad_ano_creacion'] = $_POST['ano_creacion']; $_SESSION['add_ad_superficie'] = $_POST['superficie']; $_SESSION['add_ad_titulo_1'] = addslashes($_POST['titulo_1']); $_SESSION['add_ad_titulo_2'] = addslashes($_POST['titulo_2']); $_SESSION['add_ad_actividad'] = addslashes($_POST['actividad']); $_SESSION['add_ad_description'] = addslashes($_POST['description']); $_SESSION['add_ad_razon'] = addslashes($_POST['razon']); $_SESSION['add_ad_plan'] = $_POST['plan']; Header("Location: ".ROOT."insertar-anuncio/?step=3"); however there is not validation for each of the fields. Some guidance would be greatly appreciated. Thankyou
  5. Hi, i am creating a web application, and i would like some help/advise on how to tackle a problem. I need to make an image i have into a contact form, with four fields, which basically posts information into a database. I am not sure how i would go about doing this as i will need to make each of the fields dynamic to post the data. I have attached the image to make my point a bit clearer. thanks [attachment deleted by admin]
  6. Hello, i am having an issue when i try to go through multiple pages from a database. The database contains apartment information. I currently have it set to limit my results to 30 per page and this is working correctly, however when i try to scroll to page two like 1..2..3 i am displayed with every apartment listed in the database, and not the certain category that i would like selected. //assigning variables $SESuser_lng = $_COOKIE['SESuser_lng']; $SESuser_admlevel = $_COOKIE['SESuser_admlevel']; $id = $_GET['id']; $pgrow = $_GET['pgrow']; $msg = $_GET['msg']; $ht_filter = $_GET['ht_filter']; //sql query to retrieve result set $htfilter selects the distinct apartment categories $sqlFilter = ($ht_filter > 0 ? " WHERE p.idhotel = $ht_filter" : ""); $sql = "SELECT p.id, p.idhotel, p.nombre, p.thmb, p.archivo, h.nombre FROM prensa p LEFT JOIN hoteles h ON p.idhotel = h.id $sqlFilter ORDER BY p.nombre, h.nombre"; //DB_pager $nav = new DB_Pager('30'); $result = $nav->execute($sql, $dbcnx); //Javascript link creation <span id="display-links"><?php echo $nav->display_links(); ?></span> any help will be greatly appreciated [attachment deleted by admin]
×
×
  • 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.