Jump to content

brown2005

Members
  • Posts

    942
  • Joined

  • Last visited

Everything posted by brown2005

  1. i have the table:- echo"<table width='100%' border='0' cellspacing='0' cellpadding='0'>"; echo"<tr> <td colspan='5'>1</td> </tr>"; echo"<tr> <td colspan='5'>5</td> </tr>"; echo"<tr> <td colspan='5'>5</td> </tr> "; echo"<tr> <td width='10'>&nbsp;</td> <td width='250' valign='top'>2</td> <td width='10'>&nbsp;</td> <td width='720' valign='top'>3</td> <td width='10'>&nbsp;</td> </tr>"; echo"<tr> <td colspan='5'>1</td> </tr> "; echo"</table>"; how can i put include('g.php'); where the 1 is....
  2. can i not use include('index.php?page=login'); as it doesnt work?
  3. Hi, I have an a to z list that takes the field topics_topic and prints an a to z list like:- E elephants L lions lymas that is fine but what i wanna do is instead of having lions lymas like that i want it like lions lymas in a table.. any ideas please?
  4. Hi, I had a html table row like this, which is a sex select box (female, male):- <tr> <td align="right" height="30">Sex</td> <td><?=select_sex("");?></td> </tr> how can i write this in php... i have the:- echo " <tr> <td align='right' height='30'>Sex</td> <td></td> </tr>"; but how do i put the =select_sex(""); into the empty column...
  5. can anyone tell me how to get this to work below please:- header('location: '.$config_url.'/files/url.php?id='.$random_array['blocks_id'].'');
  6. cheers hitman.. all i needed was those magic " " god im a clown... cheers for the help richard
  7. if i have the following:- header('location: 'http://www.mywebsite.co.uk/a.php''); can i do the following:- $config = 'http://www.mywebsite.co.uk'; and then put the $config bit in the header() instead of [a href=\"http://www.mywebsite.co.uk\" target=\"_blank\"]http://www.mywebsite.co.uk[/a]
  8. I have a script that uploads a file from someones computer to my server. say the file i have is 3.JPG when i upload it, i want to change the name of the file to 1.JPG or 2.JPG to conincide with the id of the person uuploading the image. any ideas please toplay: Edited title to be more meaningful.
  9. Hi i have the form below:- <table width="100%" border="0" cellpadding="0" cellspacing="0" class="form"> <form name="contact" action="buy_confirm.php" method="post"> <tr><td colspan="2">&nbsp;</td></tr> <tr><td align="right" width="40%" class="text">Name:&nbsp;&nbsp;</td><td align="left" width="60%">&nbsp;&nbsp;<input type="text" class="text" name="name" size="35"></td></tr> <tr><td colspan="2">&nbsp;</td></tr> <tr><td align="right" width="40%" class="text">Email:&nbsp;&nbsp;</td><td align="left" width="60%">&nbsp;&nbsp;<input type="text" class="text" name="email" size="35"></td></tr> <tr><td colspan="2">&nbsp;</td></tr> <tr><td align="right" width="40%" class="text">Image:&nbsp;&nbsp;</td><td align="left" width="60%">&nbsp;&nbsp;<input type="file" class="text" name="image" size="35"></td></tr> <tr><td colspan="2">&nbsp;</td></tr> <tr><td align="right" width="40%" class="text">Website:&nbsp;&nbsp;</td><td align="left" width="60%">&nbsp;&nbsp;<input type="text" class="text" name="website" size="35">&nbsp;( without the [a href=\"http://www\" target=\"_blank\"]http://www[/a]. )</td></tr> <tr><td colspan="2">&nbsp;</td></tr> <tr><td align="right" width="40%" class="text">Message Box:&nbsp;&nbsp;</td><td align="left" width="60%">&nbsp;&nbsp;<input type="text" class="text" name="message" size="35" maxlength="100">&nbsp;( 100 characters )</td></tr> <tr><td colspan="2">&nbsp;</td></tr> <tr><td align="right" width="40%" class="text">Price:&nbsp;&nbsp;</td><td align="left" width="60%">&nbsp;&nbsp;£100</td></tr> <tr><td colspan="2">&nbsp;</td></tr> <tr><td align="center" valign="top" colspan="2"><input class="text" type="submit" name="submit" value="Submit">&nbsp;&nbsp;&nbsp;&nbsp;<input class="text" type="reset" name="reset" value="Reset"></td></tr> <tr><td colspan="2">&nbsp;</td></tr> </form> </table> what i want to do is once they click submit i want the image to be uploaded onto my website in a folder called images. can any one help please?
  10. if ($_GET['id']) { $sq1 = mysql_query("SELECT COUNT(*) AS count FROM ads_hits WHERE hits = '".$_GET['id']." ".$_SERVER['REMOTE_ADDR']."'"); if (mysql_result($sql, 0, 'count') > 0) { $sql2 ="UPDATE ads_hits SET hits_count= hits_count +1 WHERE hits='".$_GET['id']." ".$_SERVER['REMOTE_ADDR']."' "; $updated=true; mysql_query($sql2); echo FINISHED; exit(); } else { $sql_2="insert into ads_hits(hits,hits_id,hits_ip,hits_count) values('".$_GET['id']." ".$_SERVER['REMOTE_ADDR']."','".$_GET['id']."','".$_SERVER['REMOTE_ADDR']."','0')"; $res=mysql_query($sql_2); echo ADDED; exit(); } } i have this code which inserts data into the database, but if the record is allready in the database it does not add 1 to the hits_count. can anyone help?
  11. hi, i have if ($_GET['id']) { $sq1 = "SELECT * FROM ads_hits WHERE hits = '".$_GET['id']." ".$_SERVER['REMOTE_ADDR']."'"; $r1 = mysql_query($sq1) or die(mysql_error()); $sql2 ="UPDATE ads_hits SET hits_count= hits_count +1 WHERE hits='".$_GET['id']." ".$_SERVER['REMOTE_ADDR']."' "; $updated=true; mysql_query($sql2); echo FINISHED; exit(); } and this adds one to the count, but now i want to be able to say if the ip and id have not had a hit then it will add the ip and id to the database and if it has 1 hit or more then it runs the query above...
×
×
  • 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.