Jump to content

Muddy_Funster

Members
  • Posts

    3,372
  • Joined

  • Last visited

  • Days Won

    18

Everything posted by Muddy_Funster

  1. use your if()'s to dictate what is displayed: if(!empty($_POST['jobsite13']){ $jobsite13 = "<br><font color=#0000ff><font size=3>". Trim(stripslashes($_POST['jobsite13'])); if (empty($dp13)) { $dp13 = ''; } else {$dp13 = "</b>[". Trim(stripslashes($_POST['dp13'])) . "]"; } if (empty($city13)) { city13 = ''; } else {$city13 = "</b>[". Trim(stripslashes($_POST['dp13'])) . "]"; } if (empty($item13)) { item13 = ''; } else {$dp13 = "</b>[". Trim(stripslashes($_POST['dp13'])) . "]"; } } else{ $jobsite13 = ''; } if(($jobsite13 != '')&&($dp13 != '')&&($city13 != '')){ echo "<table><tr><td colspan=2>$jobsite13</td></tr><tr><td>DP</td><td>$dp</td></tr><tr><td>CITY</td><td>$city13</td></tr></table>; else{ echo '';}
  2. I'd go with cyber on that, it's needless bloating to the script if you are coding a form for each record. If you want it to look like a button you can use an image as the link, but a simple hyperlink rendered from the select query is, I think, the best way. you can even contitionalise the hyperlink/image to not link if the Contacted field is already set to Yes.
  3. empty is the way to go, however you are not using the if statments to remove the [] from the output. you are running the if's and then producing the [] using code that is run after them...
  4. I think your in the wrong section...
  5. Great idea....and for the people like me who surf 90%+ of the time with JS dissabled? IMO Javascript shouldn't be used for key functionality, just making things look nice and sleek now and again.
  6. so you just want to add a button per contact then? and reload the page to show changes when the button is clicked?
  7. how much freedom do you have over the backend of the system? and why in the name of {insert chosen deiety here} would you ever hold creditcard details? that's a massive ball ache from a conforming to legal standards of safe practice point of view. one dirty way would be to run a check versus [date / time]++[kids name]+[iP Address] in the registration table and change the insert to an update if a record is found to have been generated by that email address on that day, or within the last 5-10 minutes for a child with that name from that IP Address (or any combination there of).
  8. I don't have much experiance with this but I am certain that as it is a self certification you don't need the ca="" string anyway. ca is for linking to the certification authority that provided an authored cartificate on your behalf after you spent some money and they tested your connection info to make sure you were legit. in this event the certificate includes some code that looks up a remote file on the ca's systems that verifies that the certificate is for the domain that is issuing it and that it is valid. as you are self certified there is nothing in the certificate that will point to a ca server. In it's simplest form using self certification you are really just encripting the data using a PSK which is known to both the client and the server, as long as the keys and protocalls match you should be fine.
  9. ok, how is the information curently stored (database, file(TXT/CSV/XML), hard coded array etc.)? and what methods are you using to get the information from that storage to your script?
  10. what table? what exactly are you trying to do?
  11. I'm sorry.....your doing what?
  12. once youve fixed the issue PFM has pointed out could you also give us a better idea of the servers (old and new) that you are using, namely IIS/Apache version, PHP version, PHP runtime environment.
  13. eyes on your css code if it's in a linked file would be handy too.
  14. ...And that's why God created databases. What you are looking to do really should have a RDBS backend. It's all good and well running that through with a half dozen lines of data, but when you start scaling it up performing sort and reindexing operations on a multidimensional array takes up way more resource than is practical. Not to mention that using a RDBS like MySQL, Oracle or MS SQL Server you would find the task its self significantly easier. I know it's not the answer you're looking for and I'm sorry about that, but I have never atempted what you are trying to perform simply because, in my opinion, its just not the right way to do things.
  15. could I ask that you post screen shots rather than links, call me paranoid, but I don't click random links posted in forums
  16. What is going wrong and where is it going wrong? for better error checking in development you should always use something to capture any possible errors in your database queries. The easiest way is to use the OR DIE function call: mysql_query("INSERT INTO photo_india (id,photo) VALUES (".$_SESSION['id'].", '$pic') ") or die (mysql_error()); This can also be expanded on if you assign your query string to a variable before trying to execute it: $sql = "INSERT INTO photo_india (id, photo) VALUES ({$_SESSION['id']}, '$pic')"; mysql_query($sql) or die ("The query : <br>$sql<br><br> Returned the following error :<br>".mysql_error());
  17. Like I said, as you already have the name and email info in the india table it makes sense not to double up on that info (google data normalisation when you have a couple hours free). So, your photo_india table only has ID, userID and URL. Use the following replacing the PHP variables with the ones that you are using: INSERT INTO photo_india (userID, URL) VALUES ($_SESSION['userID'], '$url') to insert the info into the table. When you want to pull the name and email of the user and attach it to the image use: SELECT name, email, url FROM india LEFT OUTER JOIN photo_india ON (india.ID = photo_india.userID) where india.ID = $user_id_to_show
  18. how about changing the hour value before you concat the string? if ($rv_do_h =="00" && $rv_od_h == "00") { $rv_do_h = "24"; } $vrijeme_otvoreno = "$rv_od_h:$rv_od_min"; $vrijeme_zatvoreno = "$rv_do_h:$rv_do_min"; echo "$vrijeme_otvoreno - $vrijeme_zatvoreno <br>";[code=php:0]
  19. can we see your current SQL please? Also, you already have the name attached to the id in the users table, you do not need to store it again in the files one. How are you identifying the user that is using the upload form? are you using sessions or is the user id passed through the form as well?
  20. did you change the file name to that of your actual stylesheet? do you actualy echo out body tags to the page being displayed?
  21. also a word of advice : get the list of RESERVED WORDS that that your RDB uses and then don't use them for column, table or database names. Date is a reserved word, that's why Anon used backticks around it (well to be honest it looks as though Anon just wraps everything-and-its-dog in backticks whether it needs it or not, but that's besides the point) , this tells MySQL not to try to do anything with it. Also, as an FYI, Backticks are not single quotes and are not processed in the same way.
  22. What happens in that last query if you change the WHERE to EXCEPT WHERE Rep.Disabled = 1 ? any different?
  23. what's the chances on a sample dataset from your table?
  24. just use the path in the header: echo "<head><title>You should always have a title in the header</title><link rel=\"stylesheet\" type=\"text/css\" href=\"rcf/stylesheet.css\"></head>";
×
×
  • 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.