hi i have a script that was made up for me a while ago it was working full but now its stopped can anyone see whats going off as the infprmation from the form is not echoing through to another page although its going to database

heres database string to add to database

 $query = 'insert into events set etype = "'.$etype.'", edate = "'.$edate.'", region = "' .$region.'", pcode = "'.$pcode.'", town = "'.$town.'", title = "'.$title.'", advert ="' .$advert.'", ltm ="' .$ltm. '", user_id =' . $userid  ;

heres the sql table

CREATE TABLE IF NOT EXISTS `events` (
  `user_id` int(11) NOT NULL,
  `etype` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `edate` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `region` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `pcode` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `town` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `advert` text COLLATE utf8_unicode_ci NOT NULL,
  `ltm` varchar(255) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=MyISAM AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `events`
--

    INSERT INTO `events` (`user_id`, `etype`, `edate`, `region`, `pcode`, `town`, `title`, `advert`, `ltm`) VALUES
    (55, 'Meet at your place', '2014/11/15', 'East Midlands', 'gthd', 'ntd chc', 'gcu cj', 'hfh c juj fjng ufvj fcyvg', 'Couple');

now here to code snippet for echoing information

if anyone can help much appreicated

<?php
    $data = mysql_query($query);

        if(@mysql_num_rows($data)>0)
        {
            while($row = mysql_fetch_array($data)) 
            {
                $etype = $row['etype'];
                $edate = $row['edate'];
                $region = $row['region'];
                $pcode = $row['pcode'];
                $town = $row['town'];
                $title = $row['title'];
                $advert = $row['advert'];
                $ltm = $row['ltm'];

                echo '<b>Type:</b> '. $etype .'</br>';
                echo '<b>When:</b> '. $edate .'</br>';
                echo '<b>Country/Region:</b> '. $region .'</br>';
                echo '<b>Postcode:</b> '. $pcode .'</br>';
                echo '<b>Town:</b> '. $town  .'</br>';
                echo '<b>Title:</b> '. $title .'</br>';
                echo '<b>Description:</b> '. $advert .'</br>';
                echo '<b>Looking to meet:</b> '. $ltm .'</br>';

                echo '<hr>';
            }
        }

    ?> 

ive reinstalled this and it works if i have the following files

meetform.html
meets.php
addedmeets.php

but i need to change all to php for it to go with my template how can do do this and make it all work as ive change the meetform to meetform.php and added the following to the top of the form

<?php
include("config/db_connect.php");
include("config/ckh_session.php");
?>

and when i fill in nothing shows on addedmeets.php

By removing the error control operator @ from this line do you get an error?

if(@mysql_num_rows($data)>0)

And if affirmative, have you tried to get the error returned by the select query?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.